summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/kpathsea
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r--Build/source/texk/kpathsea/AUTHORS11
-rw-r--r--Build/source/texk/kpathsea/COPYING.LESSERv2502
-rw-r--r--Build/source/texk/kpathsea/ChangeLog9594
-rw-r--r--Build/source/texk/kpathsea/Makefile.am299
-rw-r--r--Build/source/texk/kpathsea/Makefile.in2465
-rw-r--r--Build/source/texk/kpathsea/NEWS399
-rw-r--r--Build/source/texk/kpathsea/PROJECTS23
-rw-r--r--Build/source/texk/kpathsea/README15
-rw-r--r--Build/source/texk/kpathsea/absolute.c96
-rw-r--r--Build/source/texk/kpathsea/absolute.h44
-rw-r--r--Build/source/texk/kpathsea/ac/kpathsea.ac11
-rw-r--r--Build/source/texk/kpathsea/ac/mktex.ac20
-rw-r--r--Build/source/texk/kpathsea/ac/withenable.ac8
-rw-r--r--Build/source/texk/kpathsea/access.c95
-rw-r--r--Build/source/texk/kpathsea/aclocal.m41178
-rw-r--r--Build/source/texk/kpathsea/atou.c28
-rw-r--r--Build/source/texk/kpathsea/bsnl.awk17
-rw-r--r--Build/source/texk/kpathsea/c-auto.in239
-rw-r--r--Build/source/texk/kpathsea/c-ctype.h85
-rw-r--r--Build/source/texk/kpathsea/c-dir.h52
-rw-r--r--Build/source/texk/kpathsea/c-errno.h27
-rw-r--r--Build/source/texk/kpathsea/c-fopen.h77
-rw-r--r--Build/source/texk/kpathsea/c-limits.h36
-rw-r--r--Build/source/texk/kpathsea/c-memstr.h63
-rw-r--r--Build/source/texk/kpathsea/c-minmax.h84
-rw-r--r--Build/source/texk/kpathsea/c-namemx.h36
-rw-r--r--Build/source/texk/kpathsea/c-pathch.h111
-rw-r--r--Build/source/texk/kpathsea/c-pathmx.h45
-rw-r--r--Build/source/texk/kpathsea/c-proto.h36
-rw-r--r--Build/source/texk/kpathsea/c-stat.h56
-rw-r--r--Build/source/texk/kpathsea/c-std.h96
-rw-r--r--Build/source/texk/kpathsea/c-unistd.h57
-rw-r--r--Build/source/texk/kpathsea/cnf-to-paths.awk61
-rw-r--r--Build/source/texk/kpathsea/cnf.c359
-rw-r--r--Build/source/texk/kpathsea/cnf.h63
-rw-r--r--Build/source/texk/kpathsea/concat.c35
-rw-r--r--Build/source/texk/kpathsea/concat3.c33
-rw-r--r--Build/source/texk/kpathsea/concatn.c72
-rw-r--r--Build/source/texk/kpathsea/concatn.h41
-rw-r--r--Build/source/texk/kpathsea/config.h235
-rwxr-xr-xBuild/source/texk/kpathsea/configure16464
-rw-r--r--Build/source/texk/kpathsea/configure.ac153
-rw-r--r--Build/source/texk/kpathsea/db.c807
-rw-r--r--Build/source/texk/kpathsea/db.h53
-rw-r--r--Build/source/texk/kpathsea/debug.c59
-rw-r--r--Build/source/texk/kpathsea/debug.h109
-rw-r--r--Build/source/texk/kpathsea/default.h37
-rw-r--r--Build/source/texk/kpathsea/dir.c146
-rw-r--r--Build/source/texk/kpathsea/doc/Makefile.am8
-rw-r--r--Build/source/texk/kpathsea/doc/Makefile.in769
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.info4017
-rw-r--r--Build/source/texk/kpathsea/doc/kpathsea.texi3931
-rw-r--r--Build/source/texk/kpathsea/doc/unixtex.texi50
-rw-r--r--Build/source/texk/kpathsea/elt-dirs.c546
-rw-r--r--Build/source/texk/kpathsea/expand.c417
-rw-r--r--Build/source/texk/kpathsea/expand.h59
-rw-r--r--Build/source/texk/kpathsea/extend-fname.c30
-rw-r--r--Build/source/texk/kpathsea/file-p.c75
-rw-r--r--Build/source/texk/kpathsea/find-suffix.c53
-rw-r--r--Build/source/texk/kpathsea/fn.c119
-rw-r--r--Build/source/texk/kpathsea/fn.h71
-rw-r--r--Build/source/texk/kpathsea/fontmap.c201
-rw-r--r--Build/source/texk/kpathsea/fontmap.h33
-rw-r--r--Build/source/texk/kpathsea/getopt.c962
-rw-r--r--Build/source/texk/kpathsea/getopt.h161
-rw-r--r--Build/source/texk/kpathsea/getopt1.c177
-rw-r--r--Build/source/texk/kpathsea/hash.c269
-rw-r--r--Build/source/texk/kpathsea/hash.h96
-rw-r--r--Build/source/texk/kpathsea/kdefault.c125
-rw-r--r--Build/source/texk/kpathsea/knj.c794
-rw-r--r--Build/source/texk/kpathsea/knj.h82
-rw-r--r--Build/source/texk/kpathsea/kpathsea.c138
-rw-r--r--Build/source/texk/kpathsea/kpathsea.pc.in11
-rw-r--r--Build/source/texk/kpathsea/kpsestat.c126
-rw-r--r--Build/source/texk/kpathsea/kpsewhich.c941
-rw-r--r--Build/source/texk/kpathsea/lib.h235
-rw-r--r--Build/source/texk/kpathsea/line.c97
-rw-r--r--Build/source/texk/kpathsea/line.h39
-rw-r--r--Build/source/texk/kpathsea/magstep.c112
-rw-r--r--Build/source/texk/kpathsea/magstep.h59
-rw-r--r--Build/source/texk/kpathsea/make-suffix.c70
-rw-r--r--Build/source/texk/kpathsea/man/Makefile.am18
-rw-r--r--Build/source/texk/kpathsea/man/Makefile.in580
-rw-r--r--Build/source/texk/kpathsea/man/kpseaccess.man66
-rw-r--r--Build/source/texk/kpathsea/man/kpsereadlink.man30
-rw-r--r--Build/source/texk/kpathsea/man/kpsestat.man51
-rw-r--r--Build/source/texk/kpathsea/man/kpsewhich.man144
-rw-r--r--Build/source/texk/kpathsea/mingw32.c458
-rw-r--r--Build/source/texk/kpathsea/mingw32.h97
-rw-r--r--Build/source/texk/kpathsea/path-elt.c146
-rw-r--r--Build/source/texk/kpathsea/pathsearch.c932
-rw-r--r--Build/source/texk/kpathsea/pathsearch.h116
-rw-r--r--Build/source/texk/kpathsea/proginit.c85
-rw-r--r--Build/source/texk/kpathsea/proginit.h48
-rw-r--r--Build/source/texk/kpathsea/progname.c793
-rw-r--r--Build/source/texk/kpathsea/progname.h70
-rw-r--r--Build/source/texk/kpathsea/putenv.c110
-rw-r--r--Build/source/texk/kpathsea/readable.c194
-rw-r--r--Build/source/texk/kpathsea/readable.h43
-rw-r--r--Build/source/texk/kpathsea/readlink.c77
-rw-r--r--Build/source/texk/kpathsea/rm-suffix.c41
-rw-r--r--Build/source/texk/kpathsea/simpletypes.h68
-rw-r--r--Build/source/texk/kpathsea/str-list.c151
-rw-r--r--Build/source/texk/kpathsea/str-list.h106
-rw-r--r--Build/source/texk/kpathsea/str-llist.c93
-rw-r--r--Build/source/texk/kpathsea/str-llist.h65
-rw-r--r--Build/source/texk/kpathsea/systypes.h28
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfline.test27
-rw-r--r--Build/source/texk/kpathsea/tests/cnfline/texmf.cnf5
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfnewline.test18
-rw-r--r--Build/source/texk/kpathsea/tests/cnfnewline/texmf.cnf1
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfnull.test23
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfprog.test23
-rw-r--r--Build/source/texk/kpathsea/tests/cnfprog/texmf.cnf13
-rwxr-xr-xBuild/source/texk/kpathsea/tests/kpseaccess.test51
-rwxr-xr-xBuild/source/texk/kpathsea/tests/kpsereadlink.test14
-rwxr-xr-xBuild/source/texk/kpathsea/tests/kpsestat.test20
-rwxr-xr-xBuild/source/texk/kpathsea/tests/kpsewhich.test35
-rw-r--r--Build/source/texk/kpathsea/tex-file.c1480
-rw-r--r--Build/source/texk/kpathsea/tex-file.h149
-rw-r--r--Build/source/texk/kpathsea/tex-glyph.c424
-rw-r--r--Build/source/texk/kpathsea/tex-glyph.h99
-rw-r--r--Build/source/texk/kpathsea/tex-hush.c52
-rw-r--r--Build/source/texk/kpathsea/tex-hush.h40
-rw-r--r--Build/source/texk/kpathsea/tex-make.c556
-rw-r--r--Build/source/texk/kpathsea/tex-make.h48
-rw-r--r--Build/source/texk/kpathsea/texmf.cnf906
-rw-r--r--Build/source/texk/kpathsea/tilde.c198
-rw-r--r--Build/source/texk/kpathsea/tilde.h34
-rw-r--r--Build/source/texk/kpathsea/types.h343
-rw-r--r--Build/source/texk/kpathsea/uppercasify.c35
-rw-r--r--Build/source/texk/kpathsea/variable.c310
-rw-r--r--Build/source/texk/kpathsea/variable.h56
-rw-r--r--Build/source/texk/kpathsea/version.ac23
-rw-r--r--Build/source/texk/kpathsea/version.c30
-rw-r--r--Build/source/texk/kpathsea/version.h36
-rw-r--r--Build/source/texk/kpathsea/win32/ChangeLog129
-rw-r--r--Build/source/texk/kpathsea/win32/Makefile.am73
-rw-r--r--Build/source/texk/kpathsea/win32/Makefile.in791
-rw-r--r--Build/source/texk/kpathsea/win32/dirutil.c78
-rw-r--r--Build/source/texk/kpathsea/win32/getdestdir.c248
-rw-r--r--Build/source/texk/kpathsea/win32/mkpaths.c95
-rw-r--r--Build/source/texk/kpathsea/win32/mktex.h54
-rw-r--r--Build/source/texk/kpathsea/win32/mktexfmt.c140
-rw-r--r--Build/source/texk/kpathsea/win32/mktexlsr.c201
-rw-r--r--Build/source/texk/kpathsea/win32/mktexmf.c374
-rw-r--r--Build/source/texk/kpathsea/win32/mktexpk.c1313
-rw-r--r--Build/source/texk/kpathsea/win32/mktextfm.c441
-rw-r--r--Build/source/texk/kpathsea/win32/mktexupd.c94
-rw-r--r--Build/source/texk/kpathsea/win32/mktexupdmain.c52
-rw-r--r--Build/source/texk/kpathsea/win32lib.c490
-rw-r--r--Build/source/texk/kpathsea/win32lib.h294
-rw-r--r--Build/source/texk/kpathsea/xbasename.c61
-rw-r--r--Build/source/texk/kpathsea/xcalloc.c35
-rw-r--r--Build/source/texk/kpathsea/xdirname.c108
-rw-r--r--Build/source/texk/kpathsea/xdirtest.c158
-rw-r--r--Build/source/texk/kpathsea/xfopen.c48
-rw-r--r--Build/source/texk/kpathsea/xfseek.c27
-rw-r--r--Build/source/texk/kpathsea/xfseeko.c26
-rw-r--r--Build/source/texk/kpathsea/xftell.c30
-rw-r--r--Build/source/texk/kpathsea/xftello.c31
-rw-r--r--Build/source/texk/kpathsea/xgetcwd.c159
-rw-r--r--Build/source/texk/kpathsea/xmalloc.c34
-rw-r--r--Build/source/texk/kpathsea/xopendir.c47
-rw-r--r--Build/source/texk/kpathsea/xopendir.h33
-rw-r--r--Build/source/texk/kpathsea/xputenv.c125
-rw-r--r--Build/source/texk/kpathsea/xrealloc.c43
-rw-r--r--Build/source/texk/kpathsea/xstat.c54
-rw-r--r--Build/source/texk/kpathsea/xstat.h45
-rw-r--r--Build/source/texk/kpathsea/xstrdup.c29
170 files changed, 65124 insertions, 0 deletions
diff --git a/Build/source/texk/kpathsea/AUTHORS b/Build/source/texk/kpathsea/AUTHORS
new file mode 100644
index 00000000000..6c6a9b16fd8
--- /dev/null
+++ b/Build/source/texk/kpathsea/AUTHORS
@@ -0,0 +1,11 @@
+Karl Berry wrote all files not otherwise marked, with help from Kathryn
+Hargreaves on some of the original versions.
+
+Thomas Esser originated most of the MakeTeX... scripts. Subsequent changes
+were made by Olaf Weber and Thomas Esser.
+
+The brace expansion code in expand.c was written by Olaf Weber, replacing
+the original code borrowed from bash.
+
+The implementation of the link trick in pathsearch.c is taken from GNU
+find, implemented by David MacKenzie from Matthew Farwell's suggestion.
diff --git a/Build/source/texk/kpathsea/COPYING.LESSERv2 b/Build/source/texk/kpathsea/COPYING.LESSERv2
new file mode 100644
index 00000000000..4362b49151d
--- /dev/null
+++ b/Build/source/texk/kpathsea/COPYING.LESSERv2
@@ -0,0 +1,502 @@
+ 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.
+
+ 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.
+
+ 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.
+
+ 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.
+
+ 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.
+
+ 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.
+
+ 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.
+
+ 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
+
+ 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.1 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/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
new file mode 100644
index 00000000000..5a0361e1ff0
--- /dev/null
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -0,0 +1,9594 @@
+2021-02-17 Karl Berry <karl@freefriends.org>
+
+ * doc/kpathsea.texi,
+ * version.ac (kpse_dev): no /dev for 6.3.3.
+ * NEWS,
+ * doc/kpathsea.texi,
+ * kpsewhich.c,
+ * texmf.cnf: copyright 2021.
+
+2020-12-05 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * knj.[ch]: Add new functions win32_fprintf(), win32_perror().
+ (Windows only)
+
+2020-10-24 Akira Kakuto <kakuto@w32tex.org>
+
+ * readable.c, knj.c: More than one adjacent directory
+ separators in filename+2 should not exist in \\?\ form of
+ absolute path.
+
+2020-08-26 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (save_size): double to 200,000. Needed with
+ long documents, tex4ht, and l3regex. Hopefully no harm in increasing.
+ https://tug.org/pipermail/tex4ht/2020q3/002710.html
+
+2020-07-05 Karl Berry <karl@freefriends.org>
+
+ * configure.ac (snprintf): two more test programs
+ also need <stdarg.h> and <stdio.h>.
+
+2020-07-04 Karl Berry <karl@freefriends.org>
+
+ * configure.ac (snprintf): #include <stdio.h> to placate
+ new arm64 Mac compiler, since apparently that's the standard
+ place for the [v]snprintf declaration. We'll see. Report from Dick.
+
+2020-06-22 Karl Berry <karl@freefriends.org>
+
+ * Makefile.am (EXTRA_DIST): add COPYING.LESSERv2.
+ * texmf.cnf (expand_depth, pk_dpi, strings_free): write a few
+ words about these parameters; see web2c/doc for more.
+
+2020-06-12 Karl Berry <karl@freefriends.org>
+
+ * tex-make.c (kpathsea_make_tex): do not emit any warnings for
+ filenames that we don't like, e.g., [Some Fnt]. Leave it up to
+ the caller. Suggestion from David Carlisle,
+ https://tug.org/pipermail/tex-k/2020-June/003214.html
+
+2020-06-06 Akira Kakuto <kakuto@w32tex.org>
+
+ * readable.c, knj.c: /../, /./, \..\, \.\ should not exist
+ in \\?\ form of absolute path.
+
+2020-04-28 Akira Kakuto <kakuto@w32tex.org>
+
+ * readable.c, knj.c: Support very long input path name,
+ longer than _MAX_PATH for Windows, if it really exists and
+ input name is given in full-absolute path in a command line.
+ (Windows only).
+
+2020-04-10 Karl Berry <karl@tug.org>
+
+ * version.ac: now 6.3.3/dev since TL'20 is released.
+
+2020-03-27 Karl Berry <karl@tug.org>
+
+ * TeX Live 2020.
+
+2020-02-29 Karl Berry <karl@freefriends.org>
+
+ * pathsearch.c: doc fix.
+
+ * doc/unixtex.texi: update urls, typos, etc.
+
+2020-01-19 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (ENSURE_NONEMPTY_STRING): new macro.
+ (read_command_line): ensure nonempty arguments to --format,
+ --safe-{in,out}-name, --var-brace-value, --var-value.
+ Empty args to the other options seem possible.
+
+ * line.c (read_line): silently drop nul (zero) bytes.
+ * tests/cnfnull.test: test for nul bytes in texmf.cnf.
+ * Makefile.am (TESTS),
+ (tests/cnfnull.test): add it.
+
+2020-01-16 Karl Berry <karl@freefriends.org>
+
+ * doc/kpathsea.texi,
+ * version.ac (kpse_dev): no /dev.
+
+2019-12-31 Akira Kakuto <kakuto@w32tex.org>
+
+ * access.c: not test x bit on Windows, because access() crashes.
+
+2019-12-29 Karl Berry <karl@tug.org>
+
+ * mktexlsr,
+ * mktexmf,
+ * mktexpk,
+ * mktextfm: remove; these will now be maintained only in
+ Master/texmf-dist/scripts/texlive, with slave copies in
+ Build/source/texk/texlive/linked_scripts as usual.
+ * Makefile.am (dist_noinst_SCRIPTS): remove, nothing left.
+ (install-exec-local): likewise remove.
+ (uninstall-local): don't uninstall the dist_noinst_SCRIPTS.
+ (bin_links): remove, now also handled in linked_scripts.
+
+ * man/Makefile.am (man_sources): remove mktex{lsr,mf,pk,tfm}.man;
+ (man1_links): remove; these man pages will now be maintained in
+ Build/source/texk/texlive/tl_scripts.
+
+2019-12-26 Karl Berry <karl@tug.org>
+
+ * Makefile.am (install-data-local): must mkdir web2cdir here.
+
+ * mktexdir,
+ * mktexnam,
+ * mktexupd,
+ * mktex.opt,
+ * mktexdir.opt,
+ * mktexnam.opt: remove; these will now be maintained
+ (if changes are needed) only in Master/texmf-dist/web2c.
+ * Makefile.am (dist_web2c_DATA, dist_web2c_SCRIPTS): remove.
+ (All this is primarily so that $Id$ expansions will not be lost;
+ the user-level mktex* scripts will happen in a few days.)
+
+ * mktex.cnf: remove this unused file.
+ * Makefile.am (EXTRA_DIST): remove it here.
+
+2019-12-22 Karl Berry <karl@freefriends.org>
+
+ * doc/kpathsea.texi (Path searching): mention translations for TL.
+ (Config files): distinguish special characters at different levels.
+ (Filename database): don't mention talking about 8.3 filenames.
+
+2019-12-16 Karl Berry <karl@freefriends.org>
+
+ * texmf.cnf (glob_str_size): increase from 20,000 to 200,000
+ for web2c/tests/bibtex-bigauth.test (q.v.).
+ (ent_str_size, max_strings.bibtex*): increase these while we're here.
+
+2019-11-03 Karl Berry <karl@tug.org>
+
+ * progname.c: remove nowadays-useless register declarations.
+ Mentioned by Doug McKenna.
+
+2019-10-10 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (LUAINPUTS.luahblatex{,-dev}): define a la other
+ LUAINPUTS.*. Report from Marcel Fabian Krueger, 10 Oct 2019 23:08:37.
+
+2019-09-04 Akira Kakuto <kakuto@w32tex.org>
+
+ * hash.c: Typo in a comment.
+
+2019-08-13 Karl Berry <karl@freefriends.org>
+
+ * cnf.c (do_line): warn about a program name qualifier which is
+ empty or contains one of our usual special characters: .{}$;:
+ since it is probably a misparsing, especially if the = is omitted.
+ Report from Johannes Kunde, 1 Aug 2019 20:57:14.
+ * Makefile.am (TESTS): new tests/cnfprog.test
+ (cnfprog.log): another target for kpsewhich.
+ (EXTRA_DIST): add tests/cnfprog/texmf.cnf.
+ * doc/kpathsea.texi (Config files): mention example of above.
+
+2019-08-09 Karl Berry <karl@freefriends.org>
+
+ * texmf.cnf (log_openout): new configuration variable, true
+ by default for all but tex and initex, to remove one technical
+ trip incompatibility. Report from David Fuchs.
+
+ * cnf.c,
+ * progname.h,
+ * tex-file.c,
+ * types.h: doc/formatting fixes.
+
+2019-08-06 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (USAGE, read_command_line): new option --cnf-line.
+ (user_cnf_lines, user_cnf_nlines): new variables to store the args.
+ (init_more): call kpathsea_cnf_line_env_progname on each line.
+
+ * cnf.h (kpathsea_cnf_line_env_progname): declare new fn.
+ * cnf.c (do_line): new argument ENV_PROGNAME,
+ to insert settings in the environment instead of the hash table.
+ (kpathsea_cnf_line_env_progname): entry point to call do_line
+ with env_progname=true.
+ (read_all_cnf): change do_line call to have env_progname=false.
+ Also, don't create cnf_hash here, instead ...
+ (kpathsea_cnf_get): ... here (if needed).
+
+ * tests/cnfline.test: new test for --cnf-line.
+ * tests/cnfline/texmf.cnf: new directory/file for cnfline.test.
+ * Makefile.am (tests),
+ (tests/cnfline.log),
+ (EXTRA_DIST): add new test.
+ * doc/kpathsea.texi (Path sources, Path searching options): doc.
+
+2019-07-26 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS, etc.): include explicit latex,
+ element at end so that files under latex/ are preferred to those
+ under latex-dev/. From Ulrike Fischer.
+
+ * texmf.cnf (TEXINPUTS.latex-dev, *-dev): new -dev format
+ names for LaTeX pre-release testing.
+
+2019-07-24 Akira Kakuto <kakuto@w32tex.org>
+
+ * texmf.cnf: Define command_line_encoding = utf-8 for
+ Windows only.
+
+2019-07-11 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.lua{,jit}hb{,la}tex): four new engines,
+ luahbtex with/without jit, with/without latex. Same path as non-hb.
+
+2019-06-02 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.harf{,la}tex): new engine.
+ Turns out we want harf{,la}tex/ directories.
+
+2019-05-05 Karl Berry <karl@tug.org>
+
+ * texmf.cnf: missed top 2018's.
+
+2019-05-03 Karl Berry <karl@tug.org>
+
+ * version.ac: 6.3.2/dev since TL'19 is released.
+
+2019-04-07 Karl Berry <karl@freefriends.org>
+
+ * TeX Live 2019.
+
+2019-03-25 Karl Berry <karl@freefriends.org>
+
+ * texmf.cnf (TEXMFDBS),
+ * doc/kpathsea.texi (ls-R): attempt to describe the lack of
+ disk searching when ls-R is present, regardless of !!, more clearly.
+ Report from Yann Salmon, tex-k thread of 27 Feb 2019 21:00:46.
+ * kpsewhich.c: doc fix.
+
+2019-02-11 Karl Berry <karl@tug.org>
+
+ * version.ac,
+ * texmf.cnf,
+ * kpsewhich.c,
+ * doc/kpathsea.texi: 6.3.1 for TL'19.
+
+2019-01-19 Karl Berry <karl@freefriends.org>
+
+ * variable.h (kpathsea_var_expand): returns string "$FOO" if FOO
+ is not defined, not the empty string; whereas ${FOO} does return
+ the empty string. Maybe not the ideal interface, but seems
+ undesirable to change now.
+ * doc/kpathsea.texi (Programming with config files),
+ (Auxiliary tasks): document this.
+ Noted by Andreas Scherer, r49726.
+
+2019-01-19 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFLOCALEDIR): define as $TEXMFMAIN/locale,
+ for cweb translations now, and hopefully more later.
+
+2018-12-30 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): make that r-mpost.
+
+2018-12-24 Andreas Scherer <https://ascherer.github.io>
+
+ * kpsewhich.c: Add missing format placeholder.
+
+2018-12-21 Karl Berry <karl@freefriends.org>
+
+ * texmf.cnf (shell_escape_commands): add rmpost.
+
+2018-12-17 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (--var-brace-value, var_to_brace_value): new option
+ and corresponding option.
+ (main): new case for it. For --var-value, go back to just variable
+ (kpathsea_var_value) expansion.
+ * doc/kpathsea.texi (Auxiliary tasks): document the new option,
+ try to explain the difference.
+ Follow-up report from jbglaw,
+ https://github.com/TeX-Live/texlive-source/issues/3.
+
+2018-12-14 Karl Berry <karl@tug.org>
+
+ * c-pathch.h (IS_KPSE_SEP): check for both : and ; only on Unix.
+ On Windows, : is the c: drive separator and must not ever be
+ a path separator.
+
+ * texmf.cnf (TEXMFDOTDIR): new variable, used instead of
+ literal "." in all search paths, so that it can be redefined as
+ ".//". Suggestion from Linas Stonys, tex-k 4 Dec 2018 10:09:35.
+
+2018-12-13 Karl Berry <karl@freefriends.org>
+
+ * c-pathch.h (IS_KPSE_SEP): new macro to check for either : or ;
+ regardless of the current system.
+ * path-elt.c (element): use it when extracting the path elements,
+ so that we'll get ~ expansion on Unix in, e.g.,
+ env FOO='/;~' ./kpsewhich --expand-braces='$FOO'
+ * kpsewhich.c (main): call kpathsea_brace_expand on the result
+ from kpathsea_var_value, so that we'll get ~ expansion in, e.g.,
+ env FOO='/:~' ./kpsewhich --var-value=FOO
+ Original report from e-kwsm (E Kawashima),
+ https://github.com/TeX-Live/texlive-source/issues/3
+
+ * NEWS,
+ * doc/kpathsea.texi (Auxiliary tasks): document that -var-value
+ now does brace expansion.
+
+2018-12-12 Karl Berry <karl@freefriends.org>
+
+ * expand.h,
+ * pathsearch.h,
+ * cnf.c: doc fixes.
+
+ * kpsewhich.c (main): show path when --show-path can't run.
+
+2018-12-11 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (main): formatting.
+
+2018-12-04 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (main) [WIN32]: #define puts kpathsea_win32_puts
+ once, instead of many #ifdefs throughout function.
+
+2018-11-23 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * elt-dirs.c, knj.c, progname.c: Support non-ascii values
+ for variables in the case of
+ command_line_encoding = utf-8 (w32 only).
+
+2018-11-12 Andreas Scherer <https://ascherer.github.io>
+
+ * tex-make.c (maketex): check return value from dup(2).
+
+2018-07-02 Karl Berry <karl@freefriends.org>
+
+ * kpsewhich.c (lookup): warn that --all is ignored with bitmap fonts.
+ (USAGE): likewise.
+ * doc/kpathsea.texi (Path searching options) <--all>: likewise.
+ Report from Werner Lember, 07 Apr 2018 12:39:34.
+
+2018-06-10 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * progname.c, types.h, knj.h: Add a variable W32_codepage.
+ * kpsewhich.c: Allow Unicode file name for pdftex in kpsewhich.
+ (Windows only)
+
+2018-05-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * kpsewhich.c: Revert. Since "command_line_encoding=utf8" is
+ not so natural for pdfTeX.
+
+2018-05-12 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * kpsewhich.c: Allow Unicode file name for pdftex in kpsewhich.
+ (Windows only)
+
+2018-04-14 Karl Berry <karl@tug.org>
+
+ * TeX Live 2018 release, kpathsea 6.3.0.
+
+2018-03-16 Karl Berry <karl@freefriends.org>
+
+ * tex-glyph.h (kpse_glyph_source_fallback_res): new enum value
+ in kpse_glyph_source_type.
+ * tex-glyph.c (kpathsea_find_glyph): use it for `source'.
+ Private report from Doug McKenna, 14 Mar 2018 19:26:12.
+
+2018-03-14 Karl Berry <karl@tug.org>
+
+ * tex-glyph.c (kpathsea_find_glyph, try_size): disentangle
+ successful searches and filling in return information.
+ Private report from Doug McKenna, 14 Mar 2018 11:51:29.
+
+2018-02-26 Karl Berry <karl@freefriends.org>
+
+ * texmf.cnf (TEXMFVAR, TEXMFCONFIG, doc): 2018.
+
+2018-02-24 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ * tex-make.c (kpathsea_make_tex): Change an error message
+ "Invalid fontname" to "Invalid filename", since
+ $ tex -fmt=-a x
+ causes
+ kpathsea:make_tex: Invalid fontname `-a.fmt', starts with '-'
+ but it is a format file.
+
+2018-02-23 Karl Berry <karl@freefriends.org>
+
+ * lib.h (LIB_START_FATAL): mention that the identifier `kpse'
+ has to be defined for this to work. (In practice, it's a local
+ variable.) Private report from Douglas McKenna, 2018/02/21.
+
+2018-02-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * xgetcwd.c: Replace LIB_FATAL2 by FATAL2.
+ Private report from Douglas McKenna, 2018/02/21.
+
+2018-02-20 Karl Berry <karl@freefriends.org>
+
+ * progname.c (expand_symlinks): make error message on unresolvable
+ symlinks less verbose.
+ (kpathsea_selfdir): exit(1) if name cannot be resolved,
+ instead of failing an assertion. Report from Enrico Gregorio,
+ http://tug.org/pipermail/tex-live/2018-February/041052.html
+
+2018-02-17 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * texmf.cnf ({TEXINPUTS,BIBINPUTS,max_strings}.upbibtex):
+ add defns for upbibtex.
+
+2018-02-10 Karl Berry <karl@freefriends.org>
+
+ * doc/kpathsea.texi (Path searching options): clarify that
+ --no-casefold-search doesn't mean the underlying (file)system
+ magically becomes case-sensitive.
+
+2018-02-07 Karl Berry <karl@freefriends.org>
+
+ * tests/kpsewhich.test: don't run --no-casefold-search with
+ "Plain.TeX", since it succeeds on case-insensitive systems
+ and fails on case-sensitive ones.
+
+2018-02-04 Karl Berry <karl@freefriends.org>
+
+ * texmf.cnf (texmf_casefold_search): new configuration value
+ for Unix, default 1. Latest thread about this longstanding issue:
+ http://tug.org/pipermail/tex-live/2017-September/040619.html
+
+ * version.ac: move to 6.3.0 since I guess this is a new
+ (compatible [enough]) interface.
+ * NEWS: mention it.
+ * doc/kpathsea.texi: document it.
+ (Casefolding search),
+ (Casefolding rationale),
+ (Casefolding examples): new nodes.
+ (Path searching options): new option [-no]-casefold-search
+ for kpsewhich.
+
+ * pathsearch.c (KPSE_CASEFOLDING_SEARCH): new compile-time macro
+ to support case-insensitive searches on case-sensitive operating
+ systems, that is, not Windows. Most other changes here are
+ conditional on it.
+
+ (print_space_list): helper fn for debugging output.
+ (readable_file_fn_type): new typedef for casefold_readable_file
+ and kpathsea_readable_file.
+ (casefold_readable_file): new fn to check for a file ignoring case.
+ (dir_list_search),
+ (dir_list_search_list): take an additional function pointer argument
+ and call it, instead of only kpathsea_readable_file. Return
+ the matched name instead of the original name. (This would have
+ caused failure before with the ENAMETOOLONG kludge; guess that
+ never actually happens.)
+ (absolute_search),
+ (path_search): also do casefolded search if enabled and requested.
+ Also free passed name in callers.
+ (kpathsea_path_search_list_generic): call absolute_search
+ instead of kpathsea_readable_file; merge returned lists;
+ also do casefolded search if enabled and requested.
+
+ (print_tab_list) [TEST]: another helper fn to print test results.
+ (test_path_search_list_generic) [TEST]: new test fn for some
+ minimal casefolding tests.
+ (main): call it, and rearrange tests.
+ (standalone-compile-command): current to current (TeX Live) reality.
+
+ * kpsewhich.c (long_options): new options [-no]-casefold-search
+ to override the default for casefolded searches.
+ (read_command_line): handle them with xputenv on texmf_casefold_search.
+
+ * tests/kpsewhich.test: do a few casefolding tests.
+
+2018-02-01 Karl Berry <karl@freefriends.org>
+
+ * lib.h (KPSE_CNF_P): new macro.
+ * tex-file.c (kpathsea_find_file_generic): use it,
+ for try_std_extension_first.
+
+2018-01-27 Karl Berry <karl@freefriends.org>
+
+ * readable.h: doc fixes.
+ * readable.c (READABLE): take (ignored) kpse arg in macro, so:
+ (kpathsea_readable_file): we can avoid #ifdefs in body.
+
+ * str-list.c (str_list_concat_elements): reformat for consistency.
+
+ * str-list.h (STR_LIST_EMPTY, STR_LIST_FIRST_ELT): new macros.
+ * kpsewhich.c,
+ * pathsearch.c,
+ * str-list.c (str_list_concat_elements): use them.
+
+2018-01-26 Karl Berry <karl@freefriends.org>
+
+ * tex-file.c (kpathsea_init_format_return_varlist): log a newline
+ before kpse_cnf_format, since this happens mid-search.
+
+2018-01-25 Karl Berry <karl@freefriends.org>
+
+ * pathsearch.c: more consistent code formatting, doc fixes.
+ No functional code changes.
+
+2018-01-17 Norbert Preining <norbert@preining.info>
+
+ * mktexlsr (treefile): use mktemp with fallback option for
+ temporary file.
+
+2018-01-16 Karl Berry <karl@freefriends.org>
+
+ * kpathsea.pc.in (Cflags): remove -I${libdir} per Debian.
+
+2018-01-14 Karl Berry <karl@tug.org>
+
+ * texmf.cnf: doc fixes.
+
+2018-01-14 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * progname.c: Use a macro instead of a function strlen() to
+ check if a string is empty or not. Report from Douglas McKenna,
+ private mail 14 Jan 2018.
+
+2018-01-05 Karl Berry <karl@freefriends.org>
+
+ * pathsearch.c (dir_list_search, dir_list_search_list): save the
+ next element to continue the loop, in case the
+ current element floats. Report from Douglas McKenna,
+ tex-k mail 4 Jan 2018 10:16:18.
+
+2017-12-27 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * xbasename.c, xdirname.c: Remove IS_KANJI test for UNC names,
+ and fix a W32 bug in xdirname.c.
+ Report by Douglas McKenna:
+ http://tug.org/pipermail/tex-k/2017-December/002840.html
+
+2017-12-09 Jiang Jiang <gzjjgod@gmail.com>
+
+ * tex-glyph.c (try_fallback_resolutions):
+ Avoid warning: taking the absolute value of unsigned type
+ 'unsigned int' has no effect [-Wabsolute-value]
+ ref. https://github.com/jjgod/texlive/commit/4cbec4c
+
+2017-12-08 Karl Berry <karl@freefriends.org>
+
+ * tex-file.c (kpathsea_init_format_return_varlist)
+ <kpse_program_text_format>, <kpse_program_binary_format>:
+ use DIR_SEP_STRING instead of hardwired /
+ Report from Douglas McKenna, tex-k 5 Dec 2017 22:27:10.
+
+2017-12-05 Karl Berry <karl@freefriends.org>
+
+ * c-minmax.h (SCHAR_MAX): decrement to the correct 127.
+ Report from Douglas McKenna, tex-k 4 Dec 2017 18:26:35.
+
+2017-11-28 Karl Berry <karl@tug.org>
+
+ * doc/unixtex.texi: no longer in ~ftp, etc.
+
+ * doc/kpathsea.texi (Fontmap): clarify that it's the last %
+ on a line that starts a comment. From Doug McKenna, personal
+ email, 21nov17.
+
+2017-11-18 Karl Berry <karl@tug.org>
+
+ * db.c (elt_in_db): protect against either argument being NULL or
+ empty. From Doug McKenna, personal mail, 17nov17.
+
+2017-11-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tex-file.c: Again use a custom kpathsea_getlongpath()
+ instead of a standard API function GetLongPathName(), since
+ the latter sometimes does not work as desired (W32 only).
+
+2017-11-09 Karl Berry <karl@freefriends.org>
+
+ * db.c (kpathsea_db_search_list): remove redundant test of `found'.
+ From Doug McKenna, personal mail, 7nov17.
+
+2017-11-03 Karl Berry <karl@freefriends.org>
+
+ * default.h: document that NULL or empty input path returns the
+ default string.
+ * kdefault.c (kpathsea_expand_default): check for empty input path.
+ From Doug McKenna, personal mail, 2nov17.
+
+ * cnf.c (do_line): do not move past a nul byte on erroneous input
+ (with a . but no program name).
+ * hash.c: doc fix.
+ From Doug McKenna, personal mail, 31oct17.
+
+2017-10-29 Karl Berry <karl@freefriends.org>
+
+ * several files: missed copyright 2017 updates.
+
+ * elt-dirs.c (do_subdir): assert must include elt_length>0
+ to guarantee the assert of elt[elt_length-1] is valid.
+ From Doug McKenna, personal mail, 29oct17.
+
+2017-10-25 Karl Berry <karl@tug.org>
+
+ * expand.c (brace_expand): do not look past the terminating
+ null with bad input like "a{\0whatever".
+ From Doug McKenna, personal mail, 23oct17.
+
+2017-09-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tex-file.c: Use a standard API function GetLongPathName()
+ instead of the custom kpathsea_getlongpath() (W32 only).
+
+2017-09-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tex-file.c: Fix to return actual file names (W32 only).
+
+2017-09-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * db.c: Fix for DOSISH systems in which _WIN32 is not defined.
+
+2017-05-03 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFAUXTREES): new variable (default value empty
+ string via empty braces), for tlmgr conf auxtrees.
+ (TEXMF): include $TEXMFAUXTREES, but don't assume it is nonempty.
+
+2017-04-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c, mingw32.c: Update texlive_gs_init() (w32 only).
+
+2017-04-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c, mingw32.c: Update texlive_gs_init() (w32 only).
+
+2017-04-14 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): add texosquery-jre8.
+
+2017-04-13 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMF, TEXMFDBS): move TEXMFLOCAL to before TEXMFSYS*,
+ so, e.g., config.ps in TEXMFLOCAL overrides TEXMFSYSCONFIG.
+ Report from Michael Shell:
+ http://tug.org/pipermail/tex-live/2016-July/039062.html
+
+2017-04-05 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * texmf.cnf: mendex requires the variable INDEXDICTIONARY.
+
+2017-03-27 Karl Berry <karl@freefriends.org>
+
+ * Makefile.am (AM_TESTS_ENVIRONMENT): use instead of TESTS_ENVIRONMENT.
+
+2017-03-18 Karl Berry <karl@tug.org>
+
+ * version.ac,
+ * NEWS,
+ * kpsewhich.c,
+ * texmf.cnf,
+ * doc/kpathsea.texi: version 6.2.3 for TL17.
+
+ * Makefile.am (nodist_kpseinclude_HEADERS): include c-auto.h here.
+ (kpseinclude_HEADERS): not here.
+ (nodist_kpselib_HEADERS): and not here; variable no longer needed.
+ Ken Brown on tldistro, 18 Mar 2017 16:50:41.
+
+2017-03-14 Karl Berry <karl@tug.org>
+
+ * Makefile.am (kpseinclude_HEADERS): add c-auto.h. Report from
+ Ken Brown on tldistro, 14 Mar 2017 12:16:56.
+
+2017-03-02 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.luajitlatex): add, same as lualatex.
+ Report from Ulrike Fischer, 2 Mar 2017 17:46:50.
+
+2016-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * xgetcwd.c: Typo. Thanks Luigi.
+
+2016-12-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * kpsestat.c: Change tex-k@mail.tug.org to tex-k@tug.org.
+
+2016-11-30 Karl Berry <karl@ks.tug.org>
+
+ * texmf.cnf (shell_escape_commands): remove mpost, due to
+ the -tex option. Oops! Report from Bruno Le Floch.
+
+2016-11-08 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tex-file.c: Add ".OTF" as a suffix of OpenType fonts.
+
+2016-11-02 Karl Berry <karl@tug.org>
+
+ * mktexdir: try a silent mkdir before a non-silent mkdir,
+ to try to work around the inevitable race condition.
+ https://bugs.debian.org/794228.
+
+2016-08-04 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (max_strings.bibtex, et al.): increase to 100,000
+ per report from Michael Perryman,
+ http://tug.org/pipermail/tex-live/2016-July/039109.html.
+
+2016-07-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * knj.c, knj.h: Avoid compiler warnings.
+
+2016-06-30 Karl Berry <karl@tug.org>
+
+ * version.ac (kpse_version): 6.2.2 => 6.2.3dev.
+
+2016-06-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * kpsewhich.c: Remove unnecessary w32 changes,
+
+2016-06-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * config.h, db.c, elt-dirs.c, expand.c, find-suffix.c, hash.c, knj.c,
+ knj.h, kpsewhich.c, make-suffix.c, path-elt.c, progname.c, readable.c,
+ tilde.c, types.h, variable.c, win32lib.c, win32lib.h, xbasename.c,
+ xdirname.c, xdirtest.c, xgetcwd.c: Eliminate global and static
+ variables (w32 only).
+
+2016-05-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tex-file.c: Fix a bug that TEXMFOUTPUT does not work (w32 only).
+ See http://tug.org/pipermail/tex-k/2016-May/002719.html.
+
+2016-05-20 Karl Berry <karl@tug.org>
+
+ * Version 6.2.2 for TeX Live 2016.
+
+2016-05-13 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (RISINPUTS, BLTXMLINPUTS): $TEXMF/biber
+ rather than $TEXMF/bibtex.
+
+2016-02-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ *knj.c: Disable unnecessary warning (w32 only).
+
+2016-04-06 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFVAR, TEXMFCONFIG): 2016.
+ (shell_escape_commands): add gregorio, fingers crossed.
+
+ * cnf.c (do_line): do not keep checking ISSPACE beyond
+ end of string. (Can crash on lines without spaces.)
+ Return error string if problems.
+ * kpathsea_cnf_get: give warning, with line number,
+ if do_line returns a message.
+
+2016-02-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * texmf.cnf: Typo.
+
+2016-04-06 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c, et al.: copyright 2016.
+
+2016-03-06 Karl Berry <karl@tug.org>
+
+ * version.ac: remove /dev for start of 2016 builds.
+
+2016-02-27 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+
+ * kpsewhich.c: Allow Unicode file name for upmendex in kpsewhich.
+ (Windows only)
+
+2016-02-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.[ch], mingw32.[ch]: Define a function
+ double win32_floor (double x), since floor is defined in cpascal.h.
+
+2015-12-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.h: Update (w32 only).
+
+2015-10-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpsewhich.c (USAGE): Say "list shown by -help-formats".
+
+2015-07-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Better dependencies for 'make check'.
+
+2015-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Define WEB2CVERSION for WIN32 programs.
+
+2015-06-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.ac: Update version number 6.2.1 => 6.2.2dev.
+ * configure.ac: Drop test for isascii (now in KPSE_COMMON).
+
+2015-05-21 Karl Berry <karl@tug.org>
+
+ * TL'15.
+
+2015-05-03 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c: copyright 2015.
+ * doc/kpathsea.texi (version, month-year): now 6.2.1, May 2015.
+ (Auxiliary tasks): add --help-formats, sort.
+ (Supported file formats): add bltxml, clua, ris.
+ * NEWS: mention --help-formats.
+
+2015-05-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * file-p.c: Implement same_file_p () for windows.
+
+2015-04-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Test if isascii is declared.
+ * c-ctype.h: Correctly define isascii, if not declared.
+
+2015-04-14 Norbert Preining <norbert@preining.info>
+
+ * mktexlsr (treefile): switch back to hard-coded path, as
+ indeed it seems there are several systems without support for
+ mktemp --tmpdir, just mktemp. TL2015 pretest emails.
+
+2015-04-12 Karl Berry <karl@tug.org>
+
+ * texmf.cnf: update for TL'15.
+ (shell_escape_commands): include extractbb, fingers crossed.
+
+2015-04-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.ac: 6.2.1 (without the dev) for 2015 pretest.
+
+2015-03-25 Karl Berry <karl@tug.org>
+
+ * mktexlsr (treefile): use shell mktemp; patch from Debian
+ via tlbuild mail from Norbert, 6 Mar 2015 09:13:06.
+ Per Nelson Beebe, the program is available on a wide variety of
+ systems nowadays, excluding only SGI IRIX MIPS, which we have
+ not built binaries for in several years.
+ (tlbuild reply, 6 Mar 2015 06:22:21)
+
+2015-03-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, kpathsea.pc.in: Install <kpathsea/c-auto.h> under
+ ${libdir}.
+
+2015-03-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Drop checks for strcasecmp, strtol, and strstr.
+ * lib.h: Drop the strstr() prototype.
+ * Makefile.am: No need to distribute the replacement functions.
+
+2014-12-13 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * texmf.cnf: Sync with master which is changed by Norbert.
+
+2014-12-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am [kpathsea.h]: Improved output for silent rules.
+
+2014-12-05 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (help_formats): new fn for new option --help-formats.
+ (help_message): split off code from here.
+ (USAGE): document it.
+ (read_command_line): recognize it.
+ Suggestion from Julian Gilbey, tex-k 4 Dec 2014 13:34:23.
+
+2014-10-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * db.c (db_names): Use initialized non-const strings to avoid warning.
+
+2014-10-19 Karl Berry <karl@tug.org>
+
+ * db.c (db_names): list DB_NAME_LC first, and list both always,
+ dropping WIN32 conditional.
+ (init_db): check at runtime if ls-R and ls-R are same_file_p,
+ and only read one on any system, not just hardwiring Windows.
+ Output debugging lines. Basic patch from Adam Maxwell
+ (since MacOSX now uses a case-preserving filesystem).
+
+ * db.c (DB_HASH_SIZE): increase per current texmf-dist/ls-R.
+
+2014-10-17 Karl Berry <karl@tug.org>
+
+ * line.c (getc, FLOCKFILE, FUNLOCKFILE): #define to getc_unlocked, etc.
+ (get_line): call them, so we lock once per call instead of
+ once per character read. Change from Adam Maxwell <amaxwell@mac.com>.
+ https://email.esm.psu.edu/pipermail/macosx-tex/2014-October/053026.html
+
+2014-09-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (TEX.upmpost): Added.
+
+2014-08-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * knj.c (win32_fputs): Drop unused variables.
+
+2014-08-22 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * knj.c: Update fsyscp_popen().
+
+2014-08-22 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.[ch], c-std.h, config.h: Add a new function win32_vfprintf()
+ (Windows only)
+
+2014-07-22 Karl Berry <karl@tug.org>
+
+ * tex-file.h,
+ * tex-file.c (kpathsea_init_format_return_varlist): new fn
+ to expose list of environment/config variable names considered.
+ * kpsewhich.c (help_message): use it.
+
+2014-07-18 Karl Berry <karl@tug.org>
+
+ * mktex.opt: don't basename-ify the program name, that's
+ potentially useful information.
+
+ * mktexdir,
+ * mktexlsr,
+ * mktexmf,
+ * mktexnam,
+ * mktexpk,
+ * mktextfm,
+ * mktexupd: prepend to PATH via a simple method for Unix
+ (but leave the complicated DOS version in mktexlsr).
+
+2014-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-make.c, win32lib.c: Replace the deprecated spawnvp() by
+ _spawnvp(), they differ for 64-bit MinGW.
+
+2014-07-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * debug.c, hash.c, knj.c, tex-make.c: [WIN64] Avoid cast from
+ pointer to integer of different size.
+
+2014-06-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.h: Require WINVER >= 0x0500.
+
+2014-06-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: Fix a potential bug (w32 only).
+
+2014-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-ctype.h: Avoid useless char subscript warnings.
+
+2014-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (kpathsea.h): Drop c-auto.h, c-ctype.h, c-errno.h,
+ and more from the list of files; they are included via others.
+ * version.ac: Update version number 6.2.0 => 6.2.1dev.
+
+2014-05-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: Update win32_popen() (w32 only).
+
+2014-05-05 Karl Berry <karl@tug.org>
+
+ * doc/kpathsea.texi,
+ * doc/unixtex.texi,
+ * README,
+ * PROJECTS: omit old information about building and installing;
+ general updates (though plenty more could be done).
+
+ * BUGS,
+ * doc/bugs.texi,
+ * doc/hier.texi,
+ * doc/install.texi: remove.
+ * Makefile.am,
+ * doc/Makefile.am: update accordingly.
+
+2014-04-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (normal_headers): Add simpletypes.h.
+ * simpletypes.h: Don't '#include <kpathsea/simpletypes.h>'.
+
+2014-04-29 Karl Berry <karl@tug.org>
+
+ * simpletypes.h: new file, defining just boolean, string, address, etc.
+ * pathsearch.h: restore #include of str-llist.h before types.h,
+ as it should be.
+ * str-llist.h: #include simpletypes.h instead of types.h.
+ * types.h: #include simpletypes.h.
+
+2014-04-22 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (guess_input_kanji_encoding): set to 1,
+ per Akira and Norbert.
+
+2014-04-17 Karl Berry <karl@tug.org>
+
+ * version.ac: 6.2.0 (without the dev) for 2014 pretest.
+ * NEWS,
+ * texmf.cnf,
+ * kpsewhich.c: 2014.
+
+ * texmf.cnf (TEXINPUTS.pdfx{latex,mex,tex}): this engine has
+ not existed for a long time. Remove.
+ (TEXINPUTS.luajittex): same as .luatex.
+
+2014-04-09 Karl Berry <karl@tug.org>
+
+ * pathsearch.h: with deep regret, #include types.h before
+ str-llist.h, since otherwise str_llist_type is not defined
+ in its use within types.h and a simple #include
+ <kpathsea/pathsearch.h> fails. Reported by Norman Gray,
+ tex-k 14 Apr 2013 12:23:50,
+ http://tug.org/pipermail/tex-k/2013-April/002496.html
+
+2014-04-09 Luigi Scarso <luigi.scarso@gmail.com>
+
+ * mingw32.h [MinGW64]: Avoid warning due to redefining popen.
+
+2014-03-21 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac, getopt.h: Revert previous change.
+ Cygwin system getopt() is incompatible with the GNU version.
+
+2014-03-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac: Use Cygwin system getopt().
+ * getopt.h: Avoid to redeclare the getopt API.
+
+2014-02-08 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.[ch]: Add a new function win32_putc().
+ (Windows only)
+
+2014-01-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * kpsewhich.c : [WIN32 only] progname should be kpse->program_name
+ since progname can be NULL.
+
+2014-01-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * knj.c: Drop unused variable (avoid warning).
+
+2014-01-25 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.[ch]: Add a new function win32_getc(), win32_ungetc(),
+ win32_fputs(), and win32_puts(). (Windows only)
+ * kpsewhich.c, pathsearch.c, line.c:
+ Allow Unicode file name in kpsewhich. (Windows only)
+ * knj.c: Fix typo in error message. (Windows only)
+
+2014-01-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * knj.c: Add #include <wchar.h> as required for MinGW32.
+ Cast arg3 of fsyscp_spawnvp() to avoid warning.
+
+2014-01-14 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * knj.[ch]: Add new functions fsyscp_spawnvp(), and fsyscp_system().
+ (Windows only)
+
+2014-01-13 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.[ch]: Add a new function fsyscp_popen(). (Windows only)
+
+2014-01-08 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.c: Allow encoding name "" for non-utf8 command line.
+ Warn if unknown encoding. (Windows only)
+
+2014-01-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * knj.c: Keep non-utf8 command line. Avoid compiler warnings.
+
+2014-01-01 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.c, knj.h: Use cast for ASCII string conversion
+ from char to wchar_t. (Windows only)
+
+2013-12-31 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * knj.h: Remove #include <kpathsea/types.h> because Visual Studio 2010
+ cannot compile Kpathsea.
+
+2013-12-31 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.c, knj.h: Add new functions fsyscp_fopen() and
+ get_command_line_args_utf8() (Windows only)
+ * progname.c: Refine initialization for KANJI (Windows only)
+
+2013-12-03 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * elt-dirs.c, knj.c, knj.h, progname.c, readable.c: Support KANJI
+ file name in (e)upTeX and XeTeX on Windows.
+
+2013-09-22 Karl Berry <karl@tug.org>
+
+ * mktexlsr: output normal msgs to stdout, not stderr.
+ Suggestion from Scott Kostyshak, tex-live mail 29 Jun 2013 04:42:10.
+
+2013-08-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac (AH_TOP): Simplify the generation of c-auto.h.
+
+2013-08-14 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c, mingw32.c (texlive_gs_init()): Fix a bug. 'n' and 'f' can
+ be drive letters.
+
+2013-08-12 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c, mingw32.c (texlive_gs_init()): Do nothing if
+ TEXLIVE_WINDOWS_EXTERNAL_GS is defined and its value is not
+ '0', 'n', or 'f'.
+
+2013-08-07 Karl Berry <karl@tug.org>
+
+ * line.c (read_line): only at EOF if loc==0, i.e., do not ignore a
+ non-terminated last "line" of a file; distressingly common on Windows.
+ * Makefile.am (TESTS): add cnfnewline.test;
+ move all *.test to tests/ subdir.
+ (EXTRA_DIST): add tests/cnfnewline/texmf.cnf, a file without a
+ final newline.
+
+ * kpsewhich.test: also check that we can read the environment
+ variable that we set.
+
+2013-07-07 TANAKA Takuji <KXD02663@nifty.ne.jp>
+
+ * knj.c and progname.c: Generalize the method to avoid the 0x5c problem
+ in path names to the cases CP936 (simplified Chinese) and CP950
+ (traditional Chinese) on Windows system.
+
+2013-07-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Use ../../am/rebuild.am.
+
+2013-07-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, man/Makefile.am:
+ Moved Makefile fragments to ../../am/.
+
+2013-07-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-memstr.h: Drop mapping of BSD => SYSV/ANSI string functions.
+
+2013-06-25 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (guess_input_kanji_encoding): config variable,
+ off by default. Per Akira.
+
+2013-06-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * config.h: Remove definition of EXEEXT, comes from c-auto.h.
+
+2013-06-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * config.h: define EXEEXT if DOSISH is defined.
+
+ * win32lib.c: Unify two win32lib.c's in w32 sources.
+
+ * progname.c, texmf.cnf: Define SELFAUTOGRANDPARENT to give a
+ robust TEXMFLOCAL.
+
+2013-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: New conditional have_EXEEXT.
+ * Makefile.am (libkpathsea_la_CPPFLAGS): Define EXEEXT for
+ systems with a non-vanishing executable extension.
+ * progname.[ch]: New function kpse_program_basename().
+ * version.ac: Update version number 6.1.1 => 6.2.0dev.
+
+ Adapt kpathsea headers to C++.
+ * absolute.h, cnf.h, concatn.h, config.h, debug.h, expand.h,
+ hash.h, knj.h, lib.h, line.h, magstep.h, mingw32.h,
+ pathsearch.h, proginit.h, progname.h, readable.h, str-list.h,
+ str-llist.h, tex-file.h, tex-glyph.h, tex-hush.h, tex-make.h,
+ types.h, variable.h, version.h, win32lib.h: When compiling C++
+ surround all declarations by 'extern "C" {' ... '}'.
+
+2013-06-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * cnf.c, kpsewhich.c: Drop redundant <kpathsea/progname.h>
+ (in <kpathsea/config.h>).
+
+2013-06-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * xrealloc.c: Drop redundant extern (in <kpathsea/config.h>).
+
+2013-06-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (*_la_LDFLAGS): Add -bindir for MinGW DLL.
+
+ * win32lib.h.mugica (removed): Unused and unmaintained.
+ * Makefile.am: Adapt.
+
+2013-05-30 Karl Berry <karl@tug.org>
+
+ * Version 6.1.1 for TeX Live 2013.
+
+2013-04-15 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.lamed): there is no lamed directory and
+ never has been, as far as I can tell, so don't look in it.
+
+ * texmf.cnf (TEXMFCACHE): new variable for lualatex font cache;
+ same value as ConTeXt MkIV's variable of the same name in
+ texmfcnf.lua.
+
+2013-04-10 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFCNF): still look in texmf/ subdirs after all;
+ needed for non-TL ConTeXt and likely others. Report from
+ Mojca/Hans.
+
+2013-04-05 Karl Berry <karl@tug.org>
+
+ * other files: 2013 in copyright year list.
+
+ * kpsewhich.c,
+ * NEWS,
+ * version.ac: 6.1.1 and 2013 to prepare for TL'13 pretest.
+
+ * texmf.cnf (TEXMFCNF): likewise prepare to use texmf-dist instead
+ of texmf. From Akira.
+
+2013-04-03 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFMAIN): make it the same as $TEXMFDIST,
+ and do not use it. That is, as of TL 2013, everything will be in
+ texmf-dist, not split between texmf and texmf-dist. See the
+ thread including
+ http://tug.org/mailman/htdig/tex-live/2013-January/032888.html.
+
+ Also change 2012 to 2013.
+
+2013-03-26 Karl Berry <karl@tug.org>
+
+ * tex-make.c (kpathsea_make_tex): specify fn name in warnings
+ about invalid fontnames.
+
+2013-03-14 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (save_size): increase to 100000 (from 50000),
+ for perldoc-all.texi (http://www.gnu.org/software/perl/manual).
+
+2013-02-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (web2cdir): Change texmf => texmf-dist.
+
+2013-01-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Use KPSE_COND_MINGW32.
+
+2013-01-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * progname.c, types.h, win32lib.c, win32lib.h: Simplify win32_popen.
+
+2012-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (kpathsea.h): Enable silent rules.
+
+2012-12-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Resolve remaining const related problems.
+ * db.[ch] (kpathsea_db_search_list): Make arg3 non-const.
+ * pathsearch.[ch] (kpathsea_path_search_list_generic,
+ dir_list_search_list): Make arg3 non-const.
+ * tex-file.c: Remove casts 'string*' => 'const_string*'.
+ * readable.[ch] (kpathsea_readable_file): Make arg non-const.
+ Include code to truncate too-long filename components.
+
+ * truncate.[ch] (kpathsea_truncate_filename): Files removed.
+ * Makefile.am: Drop truncate.c and truncate.h.
+
+2012-12-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Somewhat disentangle path search functions.
+ * db.c (kpathsea_init_db):
+ Directly call kpathsea_path_search_list_generic()
+ instead of the kpathsea_all_path_search_list() wrapper.
+ * pathsearch.c: Rename the static function search_list() into
+ the non-static kpathsea_path_search_list_generic() and drop
+ the former kpathsea_path_search_list_generic() wrapper.
+ * pathsearch.[ch]: Drop the now unused *_path_search_list().
+
+2012-12-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Resolve some const related problems.
+ * str-list.[ch]: Add cstr_list_type and cstr_list_add() for
+ const strings. Define [c]str_list_init() as static inline.
+ * kpathsea.c: Move definition of KPATHSEA_CAN_FREE from here ...
+ * hash.h: ... to here.
+ * hash.[ch]: Define hash_free() only if KPATHSEA_CAN_FREE!=0.
+ (hash_lookup): Change return type 'string*' => 'const_string*'.
+ * cnf.[ch] (kpathsea_cnf_get, kpse_cnf_get):
+ Change return type 'string*' => 'const_string*'.
+ * dir.c (kpathsea_dir_links): Adapt.
+ * rm-suffix.c (remove_suffix): Adapt.
+ * db.c, fontmap.c: Remove casts 'string*' => 'const_string*'.
+
+2012-12-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c: Remove look_for_cmd().
+
+2012-12-10 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: remove look_for_cmd().
+
+2012-12-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (look_for_cmd): Do not compute unused value.
+ * win32lib.c (look_for_cmd, kpathsea_win32_popen): Same.
+
+2012-11-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf: Increase main_memory, font_mem_size, hash_extra,
+ and pool_size.
+
+2012-11-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Avoid use of deprecated INCLUDES.
+
+2012-10-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c: use stat in static int is_dir ().
+
+2012-10-02 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: use stat in static int is_dir ().
+
+2012-10-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: remove _osver since it is obsolete.
+
+2012-09-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.h: remove definition of mkdir.
+ * c-proto.h: introduce NO_KPSE_DLL as in getopt.h.
+
+2012-08-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-std.h: Define M_PI if not defined by <math.h> (old MSVC).
+
+2012-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Use ../am/bin_links.am.
+
+2012-08-02 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.h: remove definition of pipe.
+
+2012-08-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Bail out for a badly broken snprintf()
+ (hopefully this will not happen).
+ Check if we need (v)snprintf wrapper functions.
+ * config.h: If needed, declare (v)snprintf wrapper functions.
+ * progname.c (kpathsea_set_program_name): Check snprintf sanity.
+
+2012-07-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Add AC_CHECK_SIZEOF([long]).
+ * types.h: #include <inttypes.h> and <stdint.h> if they exist.
+ If necessary #define PRId64 & Co.
+
+2012-07-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getopt.c [WIN32 && ! __CYGWIN__]: Use __CYGWIN__ instead of
+ __CYGWIN32__ which is deprecated and may be removed.
+ Mail from Ken Brown <kbrow1i@gmail.com>, Tue, 24 Jul 2012.
+
+2012-07-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.h (win32_popen): Static inline wrapper for _popen()
+ to use always binary mode.
+
+2012-07-23 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: rewrite kpathsea_win32_popen to use always binary
+ mode.
+
+2012-07-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (libkpathsea_la_SOURCES): Skip compilation of
+ xfseeko.c and xftello.c for MSVC.
+ * win32lib.h: Drop xfseeko() and xftello() prototypes, they will
+ subsequently be defined in lib.h.
+
+2012-07-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.ac: Update version number 6.1.0 => 6.1.1dev.
+
+2012-05-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: rewrite win32_system.
+
+2012-05-22 Karl Berry <karl@tug.org>
+
+ * mktexmf: test $name for csso12*, not $rootname.
+ From Debian via Norbert, 21 May 2012 10:11:08.
+
+2012-05-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * cnf.[ch]: Add KPSEDLL to kpathsea_cnf_get(), and reintroduce
+ kpse_cnf_get().
+ * Makefile.am: Do install cnf.h.
+
+2012-05-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (rebuild): Depend on 'all-am' instead of 'all' to
+ avoid an infinite loop.
+
+2012-05-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * win32lib.[ch]: Copyright 2012.
+
+2012-05-05 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: rewrite xftell64 for W32.
+
+2012-05-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: rewrite xftell64 and xfseek64 for W32.
+
+2012-04-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c: further rewrite win32_system().
+
+2012-04-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (rebuild): Touch libkpathsea.la to avoid an
+ infinite loop when only mingw32.h or win32lib.h is changed.
+
+2012-04-23 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.h, win32lib.c: rewrite win32_system().
+
+2012-04-17 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * texmf.cnf: erase "ptexgeneric".
+
+2012-04-16 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFCNF): spell out every directory explicitly,
+ so we can include $SELFAUTOPARENT/../texmf-local/web2c.
+
+2012-04-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * cnf.[ch]: Drop KPSEDLL from kpathsea_cnf_get(), and remove
+ kpse_cnf_get().
+ * db.h: Drop KPSEDLL from kpathsea_db_insert().
+ * Makefile.am: Do not install cnf.h.
+ * mingw32.h: Add a copyright statement.
+
+ * configure.ac: Subst tex_live_version from ../../version.ac
+ as WEB2CVERSION for WIN32 programs.
+
+2012-04-09 Karl Berry <karl@tug.org>
+
+ * getopt.h (getopt) [!__cplusplus]: do not declare when compiling
+ with C++, since g++ 4.7.0 introduced an incompatible declaration.
+ http://bugs.debian.org/667392
+
+ * c-std.h (popen, pclose) [!VMS]: remove these decls to avoid
+ conflicts, hoping they are now always in the system libraries.
+ http://bugs.debian.org/64524
+
+2012-04-07 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (glob_str_size): increase from 5000 to 20000 per Akira,
+ 06 Apr 2012 10:25:18.
+
+2012-04-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-unistd.h: Declare getopt() (via <kpathsea/getopt.h>) only
+ for Mingw and Cygwin; for other systems using the GNU C library
+ g++-4.7 might choke on incompatible exception specifications.
+
+2012-03-11 Karl Berry <karl@tug.org>
+
+ * *.c: prepend kpathsea: to warnings.
+
+2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Avoid 'the address of X will always evaluate as true' warnings.
+ * lib.h (STREQ): Test '(s) != NULL' instead of '(s)'.
+ Gcc >=4.3 produces identical code but -Wall yields no warning.
+
+2012-03-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-unistd.h: Declare getopt() (via <kpathsea/getopt.h>) but
+ not getopt_long().
+
+ * getopt.h: With __need_getopt declare only getopt() but not
+ getopt_long() (with 'struct option').
+
+ * getopt.[ch]: Drop pre-ANSI C non-prototype declarations.
+
+2012-02-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-unistd.h [CYGWIN]: Explicitly #include <kpathsea/getopt.h>
+ such that <getopt.h> from Cygwin will be skipped.
+
+2012-02-27 Ken Brown <kbrow1i@gmail.com>
+
+ * getopt.h: Cygwin requires getopt() prototype.
+
+2011-12-22 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEX.pmpost, TEXINPUTS.(e)up(la)tex): new definitions,
+ from Norbert.
+
+2011-12-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Replace ${prefix}/texmf => $(datarootdir)/texmf.
+
+2011-10-27 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (FONTCONFIG_*): doc+formatting fix.
+
+2011-10-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.c, win32lib.h: use const char * in system() and popen().
+
+2011-09-30 Karl Berry <karl@tug.org>
+
+ * types.h (kpse_{ris,bltxml}_format): new types.
+ * tex-file.c ({RIS,BLTXML}_ENVS): new defines.
+ (kpse_init_format): initialize them.
+ * texmf.cnf ({RIS,BLTXML}INPUTS): new definitions.
+ Request from Phil Kime, tex-k 25 Sep 2011 16:46:07.
+
+2011-08-28 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (LUAINPUTS.lualatex, LUAINPUTS.dvilualatex): new defns.
+ (LUAINPUTS): duplicate value of TEXINPUTS.luatex, instead
+ of using $TEXINPUTS.
+ Report from Herbert Voss, 15 Aug 2011 23:53:45,
+ among others.
+
+2011-08-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.ac: Update version number 6.0.2dev => 6.1.0dev.
+
+2011-08-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (SUBDIRS): Add win32 to build C programs from
+ Akira's W32TeX as WIN32 replacements for the shell scripts.
+
+2011-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * progname.c (fix_selfdir): Simplified to not modify arg.
+ (remove_dots): Somewhat clarify the code (suggested by Karl).
+ * progname.h [WIN32]: Don't declare {kpathsea,kpse)_selfdir().
+
+ * progname.c [TEST]: Update and extend the test program.
+ * Makefile.am (progname-test): Add rules to build the standalone
+ test program.
+
+2011-08-08 Karl Berry <karl@tug.org>
+
+ * cnf-to-paths.awk: preserve values starting with /,
+ so distro maintainers can edit texmf.cnf with absolute
+ paths and not have them replaced with /nonesuch.
+ Suggestion from Norbert.
+
+2011-08-05 Karl Berry <karl@tug.org>
+
+ * dir.c,
+ * getopt.c,
+ * hash.h,
+ * pathsearch.h,
+ * progname.h,
+ * truncate.h: copyright 2011.
+
+2011-08-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * cnf.c, fontmap.c: Do not #include <kpathsea/recorder.h>.
+ * Makefile.am (kpseinclude_HEADERS): Remove recorder.h.
+ * recorder.h (removed): Empty file.
+
+ * Makefile.am: Do not install kpathsea internal headers.
+
+ * xdirtest.c: Additional test data.
+
+2011-08-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * xbasename.c: Test for 2-Byte Kanji (CP 932, SJIS) codes and
+ for Unc names.
+ * xdirname.c: Test for 2-Byte Kanji (CP 932, SJIS) codes and
+ slashify the result.
+
+ * xdirtest.c (new): Standalone program to test xdirname() and
+ xbasename(), based on code moved to here ...
+ * xdirname.c [TEST]: ... from here.
+
+2011-08-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * db.c (db_build): No need to slashify lines from db_file.
+
+2011-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.[ch] (dostounix_filename): Remove unused function.
+ (texlive_gs_init): New function copied from win32lib.[ch].
+
+2011-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * db.c (ignore_dir_p, db_build, match),
+ kpsewhich.c (subdir_match): Slashify and test for 2-Byte Kanji
+ (CP 932, SJIS) codes.
+
+2011-08-03 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.h: #include <direct.h> for _getcwd.
+
+2011-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Unexport kpathsea internal functions, remove unused ones.
+ * db.[ch] (kpse_db_insert, kpse_init_db, kpse_db_search,
+ kpse_db_search_list): All removed.
+ * default.h (kpathsea_expand_default): Internal use only.
+ * default.h, kdefault.c (kpse_expand_default): Removed.
+ * elt-dirs.c (kpse_normalize_path, kpse_element_dirs): Removed.
+ * expand.[ch] (kpathsea_expand): Internal use only.
+ (kpse_expand): Removed.
+ * fn.h (fn_init, fn_copy0, fn_free, fn_1grow, fn_grow,
+ fn_str_grow, fn_shrink_to): ALL internal use only.
+ * hash.h (hash_insert_normalized): Internal use only.
+ * path-elt.c (kpse_path_element): Removed.
+ * pathsearch.[ch] (kpathsea_path_element, kpathsea_element_dirs,
+ kpathsea_path_search_list, kpathsea_path_search_list_generic,
+ kpathsea_all_path_search_list): Internal use only.
+ (kpse_path_element, kpse_filename_component,
+ kpse_normalize_path, kpse_element_dirs, kpse_path_search_list,
+ kpse_path_search_list_generic, kpse_all_path_search_list):
+ Removed.
+ * fontmap.h, tilde.h, truncate.h, xstat.h: Whole files internal
+ use only.
+
+2011-08-02 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * win32lib.h: follow mingw32.h for boolean and move definitions
+ for win32 functions from lib.h.
+ * win32lib.c: change definitions of xfseek64 and xftell64 to match
+ with xfseeko and xftello.
+
+2011-08-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * elt-dirs.c (dir_list_add, do_subdir, expand_elt): Replace
+ IS_DIR_SEP by IS_DIR_SEP_CH.
+
+ * getopt.h: Add (non-ANSI) declaration for getopt().
+ * mingw32.h: #define off_t as off64_t for ftello64 and fseeko64.
+
+2011-08-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * win32lib.h.mugica: Renamed from win32lib.h.
+ * win32lib.[ch]: New files, yet to be filled in.
+
+ * knj.c (is_cp932_system): No KPSEDLL in knj.c, only in knj.h.
+
+2011-07-31 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * c-pathch.h: IS_DIR_SEP_CH macro to be used with `slashified'
+ filenames without need to test for 2-Byte Kanji codes.
+
+ * elt-dirs.c (kpathsea_normalize_path): Slashify, reformulate,
+ and test for 2-Byte Kanji (CP 932, SJIS) codes.
+ (kpathsea_element_dirs): First call kpathsea_normalize_path()
+ which might modify `elt' and then test for cached answer.
+
+ * progname.c: Make sure SELFAUTO* is not just / only for WIN32.
+
+2011-07-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dir.c (kpathsea_dir_p, dir_p), lib.h: Unconstify string parms.
+ * elt-dirs.c (dir_list_add, checked_dir_list_add, do_subdir,
+ expand_elt): Unconstify string parms and local vars.
+ * progname.c (kpathsea_selfdir): Don't uselessly initialize ret.
+
+ * mingw32.c: #include <kpathsea/c-pathch.h>.
+ * mingw32.h [IS_DIR_SEP, IS_DEVICE_SEP, IS_UNC_NAME]: Do not
+ duplicate them here, use definitions from c-pathch.h.
+
+2011-07-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tilde.c [WIN32]: Use kpathsea_getpwnam().
+
+2011-07-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * db.c, find-suffix.c, xbasename.c:
+ Reformulate and test for 2-Byte Kanji (CP 932, SJIS) codes.
+
+ * expand.c, make-suffix.c, tilde.c: Slashify, reformulate,
+ and test for 2-Byte Kanji (CP 932, SJIS) codes.
+
+ * progname.c: Make sure SELFAUTO{LOC,DIR,PARENT} is not just /.
+
+ * types.h (kpathsea_instance): Merge TL and W32TeX.
+
+2011-07-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * progname.c (kpathsea_set_program_name): Merge TL and W32TeX.
+
+2011-07-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ More diffs between TeX Live and W32TeX.
+ * knj.[ch]: New files from Akira's W32TeX.
+ * progname.c (kpathsea_set_program_name): Set is_cp932_system.
+ * Makefile.am, config.h: Adapt.
+
+ * db.c, expand.c, hash, path-elt.c, tilde.c, truncate.c,
+ variable.c, xdirname.c, xgetcwd.c:
+ Test for 2-Byte Kanji (CP 932, SJIS) codes.
+
+ * db.c (kpathsea_db_search, kpathsea_db_search_list),
+ tex-file.c (kpathsea_set_suffixes_va_list, init_maketex):
+ Cast arg to `void *' because MSVC warns for a `const_string *'
+ arg when expecting `void *'.
+
+ * config.h, db.c, hash.c: #define and use TRANSFORM.
+
+2011-07-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Minor changes to reduce diffs between TeX Live and W32TeX.
+ * c-ctype.h [WIN32]: Never #define isascii.
+ * c-fopen.h: Always write text files with Unix line endings.
+ * tex-glyph.c (bitmap_specs) [WIN32]: Add DOS_BITMAP_SPEC.
+ * win32lib.h: #define strncasecmp as _strnicmp.
+ * readable.c: Replace #elif WIN32 => #elif defined (WIN32).
+ * magstep.c, pathsearch.h, xftell.c: Adjust whitespace.
+
+2011-07-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpathsea.c, progname.c, tex-file.c, types.h:
+ Drop #if defined(__MINGW32__) already implied by defined(WIN32).
+
+ * kpathsea.c (kpathsea_finish): Free suffixlist.
+
+2011-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.ac: New file defining the kpathsea version.
+ Update version number 6.0.1 => 6.0.2dev.
+ * configure.ac: Adapt. Use KPSE_LT_VERSION.
+
+2011-07-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ac/web2c.ac renamed into ac/mktex.ac.
+ * ac/withenable.ac, configure.ac: web2c.ac => mktex.ac.
+ * configure.ac: KPSE_WEB2C_PREPARE => KPSE_MKTEX_PREPARE.
+
+2011-06-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-make.c [WIN32]: Do not #include <kpathsea/win32lib.h>
+ from here (already done from config.h).
+
+2011-06-28 Karl Berry <karl@tug.org>
+
+ * mktexlsr: need to shift when arg is not a directory.
+ Found by Luigi Scarso, tex-k mail 28 Jun 2011 00:21:14.
+
+2011-06-19 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (OPENTYPEFONTS): a duplicate entry was created :(.
+
+2011-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * progname.c (remove_dots): Correctly handle dir="/foo/../bar".
+
+2011-06-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Reduce memory leaks.
+
+ * types.h (kpse_format_info_type): Declare path as non-const.
+ * tex-file.c (init_path): Free old value of path when assigning
+ a new value.
+
+ * progname.c (kpathsea_selfdir): Free strings no longer used.
+
+ * kpsewhich.c (lookup): Free string no longer used.
+
+2011-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fontmap.c (kpathsea_fontmap_lookup), kpsewhich.c (find_dpi),
+ progname.c (kpathsea_set_program_name): Allow find_suffix() to
+ return a const string.
+
+ * find-suffix.c, lib.h: Declare find_suffix() as const.
+ * find-suffix.c: Explain that NAME+(find_suffix(NAME)-NAME) is
+ equivalent to find_suffix(NAME) but not necessarily const.
+
+ * progname.c (remove_dots): Somewhat reorganize (initialize
+ ret as `NULL' instead of `(string)""').
+
+2011-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-glyph.c (try_size, try_fontmap, kpathsea_find_glyph),
+ tex-glyph.h (kpse_glyph_file_type): Declare font name as const.
+
+2011-06-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * xgetcwd.c: Fix #include directives (depend on GETCWD_FORKS).
+ (xgetcwd): The returned string may be long lived, so malloc()
+ only as needed.
+ Do not print path when getcwd(path, size) or getwd(path) fail,
+ the contents is undefined.
+
+2011-06-13 Manuel P\'egour\'e-Gonnard <mpg@elzevir.fr>
+
+ * db.c (match): ensure that we are at a dir separator in
+ the filename before checking for being at the final component.
+ (We were erroneously matching "foobar" to "foo" in some cases.)
+ Report from Manuel, tex-k mail 12 Jun 2011 21:29:55.
+
+2011-06-10 Karl Berry <karl@tug.org>
+
+ * configure.ac (AC_PROG_AWK): new test.
+ * Makefile.am (stamp-paths): use $(AWK).
+ This is to avoid broken Solaris /usr/bin/awk, which does
+ not have sub().
+ Report from Ettore Aldrovandi, 8 Jun 2011 23:36:44.
+
+2011-06-09 Karl Berry <karl@tug.org>
+
+ * mktexlsr: write directory args to a file and read them back,
+ so we can support spaces (though not newlines) in the directory names.
+ Reword some error messages.
+
+2011-06-08 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * hash.c: leave original letter cases also on win32.
+
+2011-06-06 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.context): No trailing comma, per Taco.
+
+2011-06-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (normalize_filename): Use memmove() instead of
+ memcpy() for overlapping objects.
+
+2011-05-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * texmf.cnf: add "shell_escape.initex = f" and
+ "parse_first_line.initex = f", since we have initex in TL 2011.
+ Otherwise the banner of initex is "This is TeXk, ..."
+
+2011-05-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * extend-fname.c: Remove the `generic const warning'.
+ * readable.c, rm-suffix.c: Adjust the `generic const warning'.
+
+2011-05-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * db.c (kpathsea_db_search): Add `free (dir_part)'.
+ (kpathsea_db_search{,_list}): Declare a few strings as const.
+ (kpathsea_db_insert): Use pointer arith to avoid const warning.
+
+2011-05-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (EXTRA_DIST): Add the new cnf-to-paths.awk script.
+
+2011-05-24 Karl Berry <karl@tug.org>
+
+ * tex-file.c (TRUETYPE_SUFFIXES): add .dfont.
+ Request from Dohyun Kim, 23 May 2011 16:09:03.
+ * doc/kpathsea.texi (Supported file formats): mention it.
+
+2011-05-23 Karl Berry <karl@tug.org>
+
+ * cnf-to-paths.awk: new awk script.
+ * Makefile.am (stamp-paths): use it instead of the inline sed.
+ Also, change the generated paths.h so that all non-SELFAUTO paths
+ become a constant string "/nonesuch". That way, if the definitions
+ change, the binaries don't all uselessly change with them.
+
+2011-05-22 Karl Berry <karl@tug.org>
+
+ * texmf.cnf: doc fixes.
+
+2011-05-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * absolute.c: Partially revert the minor rewrite.
+
+2011-05-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * absolute.c: Minor rewrite.
+
+ * NEWS, progname.[ch]: Finally remove kpse_set_progname
+ (deprecated since 1998).
+
+2011-05-06 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.eplatex): no longer needed per Akira.
+ (platex will always use eptex.)
+
+2011-05-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpsewhich.c (find_format): Drop unused variable 'try_len'.
+
+2011-04-28 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (try_suffix): new fn, checking entire string for
+ format names.
+ (TRY_SUFFIX): change macro to just call the fn.
+ Report from Philipp Stephani, tex-live mail 25 Apr 2011 16:38:47.
+
+ * NEWS,
+ * kpsewhich.c (read_command_line),
+ * doc/kpathsea.texi,
+ * texmf.cnf: 2011.
+
+2011-04-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Update version number 6.0.1dev => 6.0.1.
+
+2011-04-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (TEXEDIT): Document Unix and Windows defaults.
+
+ * tex-file.c (executable_filep): Avoid using strcpy() for
+ overlapping strings.
+
+2011-03-22 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.eptex, TEXINPUTS.eplatex): define,
+ same as .p(la)tex. From Akira.
+
+2011-03-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * types.h: Rename the variables program_invocation_name and
+ program_invocation_short_name into kpse_invocation_name and
+ kpse_invocation_short_name repectively, (1) in order to avoid
+ conflicts with /usr/include/sys/errno.h from Cygwin, and (2)
+ because they are not the same as those from the GNU C library.
+
+ Problem reported by Ken Brown <kbrow1i@gmail.com>.
+
+2011-03-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * lib.h, xftell.c (xftell): Change return type from unsigned to
+ signed and use ftell() instead of ftello().
+
+2011-03-01 Karl Berry <karl@tug.org>
+
+ * texmf.cnf: be more explicit that all trees, including TEXMFHOME,
+ must follow the TDS.
+
+2011-03-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.[ch]: Drop win32_system(); this was a workaround for a
+ bug in system() under Win9x.
+
+2011-03-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * man/{kpsewhich,mktexlsr,mktexmf,mktexpk,mktextfm}.man: Drop
+ useless '.rb' macros.
+ * man/{kpseaccess,kpsereadlink,kpsestat}.man: The same.
+ Also remove `additional' from `following additional options'.
+
+2011-02-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.in.orig, common.ac.orig, withenable.ac: Remove
+ ancient files.
+ * Makefile.am (EXTRA_DIST): Adapt.
+
+2011-02-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * man/Makefile.am: Use ../am/man1_links.am for manpage links.
+
+2011-02-02 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFROOT): new variable, $SELFAUTOPARENT by default,
+ to minimize redistributors' patches with a new Perl updmap.
+
+2011-01-06 Karl Berry <karl@tug.org>
+
+ * tex-file.c (LUA_SUFFIXES): add .tlu,
+ luatex mail from t34www, 6 Jan 2011 22:04:45.
+
+2011-01-01 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL): doc fixes.
+
+2010-12-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (install-exec-hook): Check symlink creation.
+ * man/Makefile.am (install-data-hook): The same.
+
+2010-12-24 Karl Berry <karl@tug.org>
+
+ * Makefile.am (stamp-paths): ensure that grep is not completely
+ broken, e.g., from GREP_OPTIONS, in which case we'd generate a
+ useless paths.h.
+
+2010-12-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am [WIN32]: Skip mktex{lsr,mf,pk,tfm} shell scripts
+ and texhash->mktexlsr symlink.
+
+2010-12-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-make.c (maketex): Factor out common WIN32 & Unix code.
+ [WIN32]: Avoid compiler warnings.
+
+2010-12-01 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * tex-make.c (maketex): [WIN32] spawnvp(_P_NOWAIT, ...) and pipe.
+
+2010-11-29 Karl Berry <karl@tug.org>
+
+ * doc/kpathsea.texi (Brace expansion): no longer derived from Bash.
+
+2010-11-27 Taco Hoekwater <taco@elvenkind.com>
+
+ * db.c (kpathsea_db_search_list): one return list for everything,
+ else kpsewhich --all plain returns nothing, even though
+ kpsewhich plain works. Report from Paul Isambert,
+ 25 Nov 2010 19:09:21.
+
+2010-11-27 Karl Berry <karl@tug.org>
+
+ * kpsewhich.test: test this.
+
+2010-11-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-glyph.c (try_format): Drop unused params fontname and dpi;
+ mention the use of $KPATHSEA_{NAME,DPI} from environment.
+
+2010-11-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Update version number to 6.0.1dev.
+
+2010-11-10 Mathias Kende <mathias@kende.fr>
+
+ * tex-file.c (kpathsea_set_suffixes_va_list): new fn.
+ (kpse_set_suffixes, kpathsea_set_suffixes): call it.
+ Avoids passing variable argument list, which is not portable.
+ http://bugs.debian.org/602566.
+
+2010-11-07 Karl Berry <karl@tug.org>
+
+ * cnf.c (do_line): remove trailing comment and preceding
+ whitespace, so they do not appear as part of the value.
+ From Akira.
+ * doc/kpathsea.texi (Config files): document this.
+ * texmf.cnf: doc fixes.
+
+2010-10-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (libkpathsea_la_LDFLAGS): Add -no-undefined.
+
+2010-09-24 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TTFONTS): also read opentype//.
+ (OPENTYPEFONTS): also read truetype//.
+ Because common practice is to use .ttf/.ttc for TrueType-flavored
+ OpenType fonts (and .otf only for PostScript-flavored OpenType).
+
+2010-09-18 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (DVIPDFMXINPUTS): do not include ., so attackers
+ cannot create a dvipdfmx.cfg with, e.g., xetex.
+ Report from Heiko, 16 Sep 2010 22:32:25.
+
+2010-09-09 Karl Berry <karl@tug.org>
+
+ * mktexlsr (vc_dirs): remove CVS and RCS from the list,
+ for compatibility with the corresponding change on Windows,
+ made so that rcs/rcs.sty is not ignored.
+
+2010-06-13 Karl Berry <karl@tug.org>
+
+ * doc/unixtex.texi: reduce to current reality.
+
+2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getopt.h [NO_KPSE_DLL]: Allow use of this file for chktex.
+ From Karl Berry, 9 Jun 2010 15:36:44.
+
+2010-06-06 Karl Berry <karl@tug.org>
+
+ * getopt.h (getopt) [! __STDC__]: remove decl since AIX/Solaris
+ compilers complain (vvv, tlbuild 07 Jun 2010 01:30:47).
+
+2010-06-04 Karl Berry <karl@tug.org>
+
+ * configure.ac (kpse_lib_devel): empty for TeX Live 2010
+ (pretest 2, maybe final).
+
+2010-05-30 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): turns out fc-list is not
+ needed after all.
+
+2010-05-30 Manuel P\'egouri\'e-Gonnard <mpg@elzevir.fr>
+
+ * texmf.cnf: relax LUAINPUTS not to require and extra "lua"
+ subdirectory for modules in texmfscripts.
+ * texmf.cnf: enlarge trie_size to fit with latest hyph-utf8 release.
+
+2010-05-27 Karl Berry <karl@tug.org>
+
+ * getopt.h (getopt) [!__GNU_LIBRARY__]: do not declare at all.
+ Previous conditional on __cplusplus did not work with Sun CC.
+ Maybe all systems we compile on have getopt now? We'll see.
+
+2010-05-25 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): include fc-list for
+ the luaotfload font cache.
+
+2010-05-24 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (font_mem_size): doc fix.
+
+2010-05-21 Karl Berry <karl@tug.org>
+
+ * mktexpk: help msg, mention map files in error.
+
+2010-05-20 Karl Berry <karl@tug.org>
+
+ * mktexdir,
+ * mktexupd,
+ * mktex.opt,
+ * mktexnam.opt: systematize header comments.
+
+2010-05-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpseaccess.test: Allow for unexpected test results.
+
+2010-05-18 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape): set to p. Trying restricted shells again.
+ (shell_escape_commands): bibtex, bibtex8,
+ kpsewhich, makeindex, repstopdf. Don't plan to add anything
+ else for TL'10.
+
+ * NEWS,
+ * kpsewhich.c (read_command_line),
+ * texmf.cnf (TEXMFCONFIG, TEXMFVAR): 2010.
+
+2010-05-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * access.c: Adapt comment to facts.
+ * man/kpseaccess.man: Adapt to facts.
+
+2010-05-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ *absolute.c, c-fopen.h, c-stat.h, config.h, debug.h, dir.c,
+ elt-dirs.c, expand.c, getopt.c, getopt.h, getopt1.c, hash.c,
+ kpsewhich.c, lib.h, mingw32.c, path-elt.c, pathsearch.c,
+ progname.c, putenv.c, readable.c, strcasecmp.c, strstr.c,
+ strtol.c, tex-file.c, tex-glyph.h,
+ types.h, win32lib.h: untabify.
+
+2010-05-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpseaccess.test, kpsereadlink.test, kpsestat.test,
+ kpsewhich.test: New shell scripts to test the programs.
+ * configure.ac (LT_OBJDIR): AC_SUBST for kpsereadlink.test.
+ * Makefile.am (TESTS, TESTS_ENVIRONMENT): Add the tests.
+
+2010-05-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ *absolute.c: avoid late declaration. add support of UNC names (WIN32).
+ *db.c: try ls-R only on WIN32.
+ *debug.c: avoid late declaration.
+ *elt-dirs.c: remove trailing whitespace.
+ *lib.h: add variables in prototype.
+ *pathsearch.c, tex-file.c: remove some spaces.
+ *tex-glyph.c: add some spaces.
+
+2010-05-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ *absolute.c, access.c, atou.c, c-ctype.h, c-pathch.h, c-std.h, cnf.c,
+ concatn.c, config.h, db.c, db.h, debug.h, default.h, dir.c,
+ elt-dirs.c, expand.c, extend-fname.c, find-suffix.c, fn.c,
+ fontmap.c, getopt.c, kpathsea.c, kpsestat.c, kpsewhich.c, lib.h,
+ line.c, magstep.c, magstep.h, make-suffix.c, mingw32.c, mingw32.h,
+ path-elt.c, pathsearch.c, pathsearch.h, proginit.c, proginit.h,
+ progname.c, readable.c, readable.h, readlink.c, rm-suffix.c,
+ str-list.c, str-llist.c, strstr.c, tex-file.c, tex-glyph.c,
+ tex-glyph.h, tex-hush.c, tex-make.c, tex-make.h, truncate.c,
+ uppercasify.c, variable.h, version.c, win32lib.h, xbasename.c,
+ xcalloc.c, xdirname.c, xfopen.c, xftell.c, xftello.c, xgetcwd.c,
+ xopendir.c, xrealloc.c, xstat.c: remove trailing spaces.
+
+2010-05-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-fopen.h [SET_BINARY]: Add cast to void.
+
+2010-05-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * progname.c (kpathsea_set_program_name): Drop superfluous cast.
+
+ * extend-fname.c, lib.h: Change return type of extend_filename()
+ from 'string' to 'const_string'.
+ * fontmap.[ch]: Change return type of kpathsea_fontmap_lookup()
+ from 'string *' to 'const_string *', drop kpse_fontmap_lookup.
+ * tex-file.c (target_fontmaps), tex-glyph.c (try_fontmap): Adjust.
+
+2010-04-27 Manuel P\'egouri\'e-Gonnard <mpg@elzevir.fr>
+
+ * texmf.cnf: - s/pdf(lua(la)?tex)/dvi\1/
+ - add luatex before generic (for generic package specific to luatex) and
+ similarly for xetex.
+
+2010-04-22 Karl Berry <karl@tug.org>
+
+ * doc/kpathsea.texi,
+ * doc/bugs.texi: Avoid over/underfull boxes.
+
+2010-04-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (max_strings.pbibtex): New defn.
+
+2010-04-15 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (format_abbr_type): new type.
+ (format_abbrs): new array.
+ (format_abbr): new fn to use them.
+ (find_format): call it.
+
+ (help_message): new fn, including the abbreviations.
+
+2010-04-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (EXTRA_DIST): Add bsnl.awk.
+
+2010-04-11 Karl Berry <karl@tug.org>
+
+ * texmf.cnf ({TEXINPUTS,BIBINPUTS}.{ptex,platex,pbibtex}): new defns.
+
+2010-04-11 Javier Mugica <javier@digi21.eu>
+
+ * getopt.c, getopt1.c: ANSIfy all fns.
+
+2010-04-10 Karl Berry <karl@tug.org>
+
+ * progname.c (c-pathmx.h): #include unconditionally.
+ * c-pathmx.h (PATH_MAX) [MAX_PATH]: #define PATH_MAX as MAX_PATH
+ for Windows.
+ * win32lib.h: include io.h, fcntl.h, direct.h.
+ From Javier Mugica, 9 Apr 2010 22:04:46.
+
+2010-04-09 Karl Berry <karl@tug.org>
+
+ * types.h: doc fixes.
+
+2010-04-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * man/kpseaccess.man, man/kpsestat.man, man/mktexpk.man,
+ man/mktextfm.man: Uniform manpage formatting: bold for literals,
+ italic for variable items, roman for meta items.
+
+2010-04-05 Karl Berry <karl@tug.org>
+
+ * progname.h: doc fix.
+
+2010-04-04 Karl Berry <karl@tug.org>
+
+ * bsnl.awk: tiny awk program to eliminate \-newline sequences.
+ * Makefile.am (stamp-paths): call it.
+ * texmf.cnf (TEXMF_RESTRICTED_SCRIPTS): use \-newline again.
+
+2010-03-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * lib.h, xcalloc.c, xmalloc.c, xrealloc.c: Change type of size
+ arguments of xcalloc(), xmalloc, and xrealloc() from unsigned
+ to size_t (incompatible change of ABI).
+
+ Update version numbers to 6.0.0.
+
+2010-03-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (TEXMF_RESTRICTED_SCRIPTS): The make rules used to
+ create paths.h can't handle backslash-newline (FIXME?).
+
+2010-03-24 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFSCRIPTS): progname before engine, for consistency,
+ and because the former is more specific.
+ (TEXMF_RESTRICTED_SCRIPTS): new definition, for the w32 wrapper.
+
+ (TEXMFDBS): reorder in file to be next to TEXMF, to make the
+ relationship more apparent. No change in definition.
+
+2010-03-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (ent_str_size, glob_str_size): New for size of
+ BibTeX (entry and global) strings.
+
+2010-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (BIBTEX_CSFILE): Default codepage and sort order
+ file for BibTeX8.
+ (max_strings): Also for BibTeX8 and BibTeXU.
+
+2010-03-18 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXDOCS): remove .; better for texdoc not
+ to be confused by files randomly in the current directory.
+
+2010-03-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf: Append '.mf' to Metafont specific parameters.
+ Add 'max_strings.bibtex', also for hash_size and hash_prime.
+
+2010-03-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf: Append '.gftype' to GFtype specific parameters.
+ * progname.h: Remove kpse_set_progname from exported API.
+ Deprecated since 1998. Kept in library for Versions 5.x.y.
+
+2010-03-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * xrealloc.c (xrealloc): Allocate 1 byte if passed size 0.
+ * xcalloc.c (xcalloc): Use 1 if passed nelem 0 or elsize 0.
+
+2010-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (line_length, max_rows, max_cols): GFtype parameters
+ settable at runtime (used to be fixed values in gftype.ch).
+
+2010-03-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * texmf.cnf (screen_width, screen_depth): Increase Metafont
+ screen size (used to be fixed values in mf.ch).
+
+2010-03-01 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TW_LIBPATH, TW_INIPATH): TeXworks config/settings.
+
+2010-02-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (dostounix_filename): Reactivate as extern KPSEDLL,
+ used for gsftopk.
+
+2010-02-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dir.c (kpathsea_dir_p), tex-make.c (maketex): [WIN32]: Cast
+ the result of GetLastError() to int (may be or is DWORD).
+ * tex-make.c (kpathsea_make_tex) [WIN32]: Avoid initialized ret.
+ * mingw32.c (look_for_cmd): Declare suffixes and s as const.
+
+ * config.h [WIN32]: Ensure that __STDC__ is #defined.
+ #include <kpathsea/win32lib.h>, not <win32lib.h>.
+ Diffs from Akira, 11 Feb 2010 11:03:39.
+
+ * strstr.c (str): Add empty statement after label at the end of
+ a block. From Javier Mugica, 23 Feb 2010 12:25:55.
+
+ * mingw32.c (win32_get_long_filename): Declare extern KPSEDLL.
+
+2010-02-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (win32_system): Declare as non-static, for web2c.
+ * mingw32.h (win32_system): Declare as extern KPSEDLL.
+
+ * c-proto.h, getopt.h (KPSE_DLL): Automatically #define for
+ native WIN32 but not for MinGW32.
+
+2010-02-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * absolute.c (kpathsea_absolute_p): Unused param.
+ * truncate.[ch] (kpse_truncate_filename): Removed.
+
+2010-02-15 Karl Berry <karl@tug.org>
+
+ * tex-make.c [DJGPP]: change conditionals to __DJGPP__ for
+ consistency.
+
+ * progname.c (<kpathsea/mingw32.h>) [__MINGW32__]: remove
+ #include, it's redundant with kpathsea/config.h.
+ (<kpathsea/c-pathmx.h>) [__DJGPP__]: change conditional from DJGPP.
+ Suggestion from Javier Mugica, 13 Feb 2010 20:46:12.
+
+2010-02-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * variable.c (kpathsea_var_value, expand): Treat strings
+ returned by getenv() and kpathsea_cnf_get() as const.
+ Replace kpathsea_var_expand() plus kpathsea_tilde_expand() by
+ kpathsea_expand() and include expand.h instead of tilde.h.
+
+ * tilde.[ch] (kpathsea_tilde_expand): Now used only in expand.c
+ by kpathsea_expand(). Declare string param as non-const.
+ (kpse_tilde_expand): Removed.
+
+ * hash.[ch]: Adjust comments and remove trailing whitespace.
+
+2010-02-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * xopendir.c [WIN32]: Define neither xopendir nor xclosedir.
+ * mingw32.[ch], progname.c: Remove set_home_warning().
+ From Akira.
+
+ * xopendir.[ch] (xopendir): Declare string param as const.
+ Declare prototypes if and only if functions are defined.
+
+ * kdefault.c, tex-file.h, xputenv.c:
+ Formatting, trailing whitespace.
+
+2010-02-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dir.c (kpathsea_dir_p), elt-dirs.c (kpathsea_normalize_path),
+ pathsearch.c (log_search, search, search_list),
+ tex-file.c (kpathsea_find_file_generic):
+ Add '#ifdef KPSE_DEBUG' to allow compilation with '-DNO_DEBUG'.
+
+ * dir.c (kpathsea_dir_p): Replace kpse_normalize_path() by
+ kpathsea_normalize_path().
+
+2010-02-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * db.h (kpathsea_init_db, kpse_init_db, kpathsea_db_search,
+ kpse_db_search, kpathsea_db_search_list, kpse_db_search_list),
+ * fontmap.h (kpathsea_fontmap_lookup, kpse_fontmap_lookup),
+ * getopt.h (_getopt_internal),
+ * hash.h (hash_print, hash_free),
+ * mingw32.h (init_user_info, set_home_warning,
+ win32_get_long_filename, look_for_cmd, quote_args),
+ * pathsearch.h (kpathsea_filename_component,
+ kpse_filename_component, kpathsea_normalize_path,
+ kpse_normalize_path),
+ * str-list.h (str_list_init, str_list_concat, str_list_free,
+ * str_list_concat_elements, str_list_uniqify),
+ * str-llist.h (str_llist_add, str_llist_float),
+ * tex-file.h (kpathsea_init_fallback_resolutions,
+ kpse_init_fallback_resolutions),
+ * tilde.h (kpathsea_tilde_expand, kpse_tilde_expand),
+ * truncate.h (kpathsea_truncate_filename,
+ kpse_truncate_filename),
+ * xopendir.h (xopendir, xclosedir),
+ * xstat.h (xstat, xlstat): Declare prototypes only within
+ libkpathsea.
+
+2010-02-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (get_home_directory, _parse_root,
+ normalize_filename, dostounix_filename, unixtodos_filename,
+ crlf_to_lf, parse_cmdline, build_cmdline, win32_system):
+ Declare as static.
+ (dostounix_filename, crlf_to_lf): Drop unused functions.
+ (win32_system): Drop unused code for look_for_cmd() with 3 args.
+ * mingw32.h: Remove decl of get_home_directory(), add
+ quote_args(), use explicit 'extern'.
+ * tex-make.c (maketex): Drop nested extern decl of quote_args().
+
+ * tex-make.h ({kpathsea,kpse}_make_tex),
+ str-list.h (str_list_add): need KPSEDLL (from Akira).
+
+2010-02-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (look_for_cmd): remove unused variable new_cmd,
+ declare p and q as const and remove cast.
+
+2010-02-07 Taco Hoekwater <taco@elvenkind.com>
+
+ * mingw32.c (look_for_cmd): remove unused variable new,
+ clean up preprocessor conditionals.
+ Report by Hib Eris, tex-k 3 Feb 2010 12:11:42.
+
+2010-02-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (kpseinclude_HEADERS): Add win32lib.h.
+
+2010-02-01 Karl Berry <karl@tug.org>
+
+ * strstr.c,
+ * strcasecmp.c,
+ * getopt.c,
+ * getopt.h,
+ * getopt1.c: remove all redefinitions of const.
+
+2010-01-31 Javier Mugica <javier@digi21.eu>
+
+ Support compilation with MSVC 7.1:
+ * config.h (win32lib.h) [_WIN32 && !__MINGW32__]: include.
+ (__STDC__) [WIN32]: do not define ourselves.
+ * getopt.h (__STDC__): do not define ourselves. Instead, define
+ const.
+ * c-stat.h (oldnames.h) [WIN32]: is gone.
+ * c-ctype.h (isascii): no oldnames.h here either.
+ * win32lib.h: reinstate.
+
+2010-01-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * xputenv.c (kpathsea_xputenv): Don't use value of XRETALLOC(),
+ XRETALLOC(addr, n, t) already assigns the new pointer to addr.
+
+2010-01-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-make.c (maketex): Replace kpse_readable_file(fn) by
+ kpathsea_readable_file(kpse,fn) also for WIN32.
+
+2010-01-11 Taco Hoekwater <taco@metapost.org>
+
+ * types.h (kpse_clua_format): new type.
+ (kpse_def, kpse_def_inst): need KPSEDLL (from Akira).
+ * tex-file.c (CLUA_ENVS): new define.
+ (kpse_init_format): initialize it.
+ * texmf.cnf (CLUAINPUTS): new definition.
+ This implies using, e.g., bin/i386-linux/lib/luatex/lua/*.so
+ in TL.
+
+2010-01-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c: Add alt_suffix ".pl" for kpse_opl_format and
+ ".vpl" for kpse_ovp_format (for C version of opl2ofm/ovp2ovf).
+
+2009-12-24 Karl Berry <karl@tug.org>
+
+ * HIER, INSTALL, README.CONFIGURE: remove, stale.
+ * Makefile.am (EXTRA_DIST): change accordingly.
+ * README, PROJECTS,
+ access.c, readlink.c,
+ mktex.opt, mktexdir, mktexdir.opt, mktexmf, mktexnam,
+ mktexnam.opt, mktextfm, mktexupd: doc/email updates.
+
+2009-12-21 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (find_format): had forgotten to increment the loop
+ variable, hence the hang. From Akira.
+
+2009-12-20 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (find_format): restore checking of kpse_fmt_format
+ last, since a hang was reported by Angelo Graziosi,
+ http://tug.org/pipermail/tlbuild/2009q4/001222.html.
+
+2009-12-17 Karl Berry <karl@tug.org>
+
+ * c-proto.h (KPSE_DLL) [WIN32]: #define in this case, per Akira.
+
+2009-12-15 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (-safe-in-name, -safe-out-name): new options.
+ * doc/kpathsea.texi: document them.
+ * tex-file.c (kpathsea_name_ok): introduce silent argument;
+ change callers.
+ * tex-file.h (kpathsea_{in,out}_name_ok_silent): declare these,
+ now used in kpsewhich.
+
+2009-12-14 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (separator): remove never-used variable/option.
+
+ * kpsewhich.c (find_format): remove rearrangement of checking
+ kpse_fmt_format last, since it doesn't have any special extensions
+ now (what were they?).
+
+2009-12-11 Alexander Cherepanov <cherepan@mccme.ru>
+
+ * tex-file.c (kpathsea_name_ok): correct check for /../ so that
+ "file..txt" is still allowed.
+ tlsec mail, 05 Dec 2009 12:33:35.
+
+2009-12-05 Karl Berry <karl@tug.org>
+
+ Suggested/reported by Daniel Luecking, 16 Nov 2009 11:58:00:
+
+ * kpsewhich.c (init_more): split out lengthier initializations
+ to own fn. Initialize all mktex programs to false, so that
+ cnf/env settings such as MKTEXPK=1 don't apply to kpsewhich.
+ (read_command_line) <--[no-]mktex>: set must_exist, since
+ otherwise the mktex program is never called.
+ * doc/kpathsea.texi (Path searching options): minimally describe this.
+
+2009-12-04 Karl Berry <karl@tug.org>
+
+ * tex-file.c (kpathsea_name_ok): not_ok if /..foobar.
+ Report/patches from Alexander and Akira.
+
+2009-12-03 Karl Berry <karl@tug.org>
+
+ * absolute.c, * absolute.h, * cnf.c, * db.c, * dir.c, * elt-dirs.c,
+ * expand.c, * kdefault.c, * kpsewhich.c, * lib.h, * magstep.h,
+ * pathsearch.c, * pathsearch.h, * proginit.c, * progname.c,
+ * readable.h, * tex-file.c, * tex-file.h, * tex-glyph.c, * tex-glyph.h,
+ * tex-make.c, * types.h, * xputenv.c: formatting/doc fixes.
+
+2009-12-01 Karl Berry <karl@tug.org>
+
+ * tex-file.c (kpathsea_name_ok): formatting, doc fixes, start
+ error message on a new line.
+
+2009-12-01 Alexander Cherepanov <cherepan@mccme.ru>
+
+ * BUGS,
+ * doc/bugs.texi: typo fix.
+
+2009-11-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c (target_fontmaps, target_asis_name,
+ target_suffixed_names, kpathsea_find_file_generic):
+ Revised handling of const to avoid warnings.
+
+2009-11-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c (kpathsea_out_name_ok): Also disallow writing files
+ in dotted directories.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
+
+2009-11-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * types.h (kpathsea_instance): For W32/Mingw/Cygwin declare
+ suffixlist, listing the executable file suffixes.
+ * progname.c (kpathsea_set_program_name): Build suffixlist.
+ * tex-file.c (kpathsea_out_name_ok): Use suffixlist.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
+
+ * kpathsea.c: Remove obsolete initializer.
+ (kpathsea_finish): Destroy suffixlist (not yet used).
+
+2009-11-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c (kpathsea_out_name_ok): Allow writing of .pl files.
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
+
+2009-11-13 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c (kpathsea_out_name_ok): On Windows disallow writing
+ to executable files (.com, .exe, .bat, etc).
+ From Akira Kakuto <kakuto@fuk.kindai.ac.jp>.
+
+2009-11-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * doc/kpathsea.texi (Calling sequence): Document the new
+ functions kpathsea_out_name_ok and kpathsea_in_name_ok.
+ Recommend Automake in addition to Autoconf; update URL for both.
+
+2009-10-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file[ch] ({kpathsea,kpse}_{in,out}_name_ok): New fuctions
+ renamed and moved from ../web2c/lib/texmfmp.c to here.
+
+ Update version numbers to 5.1.0.
+
+2009-10-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (bin_links, install-exec-hook, uninstall-hook),
+ man/Makefile.am (man1_links, install-data-hook, uninstall-hook):
+ Moved handling of texhash symlinks from ../tetex/ to here.
+
+2009-10-20 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape): doc fixes to discourage shell_escape=p.
+
+2009-10-19 Manuel P\'egouri\'e-Gonnard <mpg@elzevir.fr>
+
+ * texmf.cnf: set shell_escape back to 'f': 'p' is broken on Unix.
+
+2009-10-15 Manuel P\'egouri\'e-Gonnard <mpg@elzevir.fr>
+
+ * texmf.cnf (shell_escape_commands): add repstopdf, a version of
+ epstopdf with restrictions intended to make it safer.
+ Remove bibtex & makeindex for now, they don't respect openout_any.
+
+2009-10-13 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): remove the ps-to-pdf programs
+ for now, they don't respect openout_any.
+
+2009-10-09 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXDOC): omit now-unneeded man for texdoc (from mpg).
+
+2009-09-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c: Add .vf to regcognized suffixes for kpse_ovf_format.
+
+2009-09-21 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): remove pygmentize, as intended.
+
+2009-09-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * lib.h (xfseek, xfseeko, xftell, xftello), xfseek.c, xfseeko.c,
+ xftell.c, xftello.c: Constify string param filename.
+
+2009-09-03 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (find_format): remove dvipdfmx.cfg, since there is
+ no special path for it, and add texglyphlist.txt.
+
+2009-08-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.[ch] (kpathsea_version_string, kpathsea_bug_address):
+ Constify these strings.
+
+2009-08-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * tex-file.c (TRY_ENV): remove unused macro.
+
+2009-08-15 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): remove many more,
+ mail from Heiko, 14 Aug 2009 07:58:02 et al.
+
+2009-07-23 Karl Berry <karl@tug.org>
+
+ * mktexlsr: update help msg.
+
+ * texmf.cnf (shell_escape_commands): remove tex programs (too
+ dangerous?), add other indexing programs, change pdfcrop to
+ rpdfcrop, convert to imgconvert.
+
+2009-07-22 Taco Hoekwater <taco@metapost.org>
+
+ * texmf.cnf (sizes): fix some documentation strings for MetaPost,
+ which nowadays uses and needs just a handful of the array size
+ variables.
+
+2009-07-07 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (MAKEMPX): remove, this causes btex..etex to fail
+ in current mpost.
+
+2009-07-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (kpathsea.h): simplify, no more grep.
+
+2009-06-30 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (kpathsea.h): avoid GNU grep specific code.
+
+2009-06-30 Karl Berry <karl@tug.org>
+
+ * variable.c (expand): make boolean, to return whether there
+ actually was a variable that got expanded.
+ (kpathsea_var_expand): if no variable was expanded, insert the
+ unexpanded $foo in the result, so we can read variable names with
+ dollar signs. Bug report from Gerben Wierda.
+
+2009-06-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * version.h (new): header file for definitions in version.c.
+ * version.c: #include <kpathsea/version.h>.
+ * Makefile.am: add version.h.
+
+ * kpsewhich.c: #include <kpathsea/version.h>.
+
+2009-06-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * concatn.[ch], tex-file.[ch]: use ANSI C function declarations
+ and prototypes instead of PVAR?[CH] macros.
+ #include <stdarg.h>, not #include <kpathsea/c-vararg.h>.
+
+ * c-vararg.h (removed): no longer used.
+ * kpathsea.h (removed): no longer distributed.
+ * Makefile.am: remove c-vararg.h, rebuild kpathsea.h.
+
+ * c-proto.h: assume HAVE_PROTOTYPES, remove AA, P?[CH] macros.
+
+2009-06-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getopt.c (_getopt_internal):
+ explicit braces to avoid ambiguous 'else'.
+
+2009-06-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: enable compiler warnings.
+ * kpathsea.c (KPATHSEA_CAN_FREE): disable not yet used code.
+ (str_llist_free, cache_free): declare as static, not yet used.
+ (kpathsea_finish): avoid warning about not yet used variables.
+ * tex-glyph.c (try_size): avoid uninitialized warning.
+ * mingw32.c: avoid unused static variable.
+
+2009-06-15 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.jadetex,pdfjadetex): search latex, not plain.
+ Thus we find the latex fonttext.cfg before cslatex's, and thus
+ we can build the format using latex.ltx, and thus
+ we can avoid & in fmtutil.cnf, and thus
+ we can avoid painful infinite loops on failure, or something.
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=427562
+
+2009-06-10 Karl Berry <karl@tug.org>
+
+ * ac/web2c.ac (mktexfmt): default to yes.
+
+2009-06-02 Karl Berry <karl@tug.org>
+
+ * types.h (kpse_file_format_type): add kpse_mlbib_format,
+ kpse_mlbst_format for Jean-Michel Hufflen and MlBibTeX.
+ * texmf.cnf (MLBIBINPUTS, MLBSTINPUTS): define default paths.
+ * tex-file.c (kpathsea_init_format): initialize them.
+ * doc/kpathsea.texi: document this.
+
+2009-06-01 Karl Berry <karl@tug.org>
+
+ * Update version numbers to 5.0.0.
+
+ * kpsewhich.c (lookup): translate ; to : in user_path,
+ for consistency. Also do path expansions as promised in the
+ documentation. Report from Tomek T.
+
+2009-05-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * absolute.c, hash.c: Avoid C99isms (variable declaration not at
+ the beginning of a block).
+ From Vladimir Volovich.
+
+2009-05-12 Karl Berry <karl@tug.org>
+
+ * tex-file.c (kpathsea_init_format): set suffix_search_only
+ for sfd, otf, and lig. Output binmode value for debugging.
+
+2009-05-11 Karl Berry <karl@tug.org>
+
+ * Makefile.am (paths.h): depend on stamp-paths, instead of
+ recursively invoking it. Else it does not get invoked once it is
+ created.
+
+2009-05-11 Karl Berry <karl@tug.org>
+
+ * types.h (kpse_file_format_type): add kpse_fea_format,
+ kpse_cid_format for Hans/Taco.
+ * texmf.cnf: define default paths (fonts/fea// and fonts/cid//).
+ * tex-file.c (kpathsea_init_format): initialize them.
+ Also, for kpse_enc_format, set suffix_search_only=true.
+ * doc/kpathsea.texi: document this.
+
+2009-04-18 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): add fc-match, request
+ from Elie Roux, 17 Apr 2009 17:22:55.
+
+2009-04-05 Taco Hoekwater <taco@elvenkind.com>
+
+ * doc/kpathsea.texi,
+ * doc/bugs.texi: updates for new reentrant API, mostly for
+ kpse->debug replacing the global kpathsea_debug.
+
+2009-04-02 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * config.h: For __MINGW32__ temporarily define eof as macro
+ while including <unistd.h>.
+
+ From Taco Hoekwater <taco@elvenkind.com>.
+
+2009-03-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpathsea.c: Do not use initializer for kpse_def_inst (FIXME:
+ to be completely removed).
+
+2009-03-17 Taco Hoekwater <taco@luatex.org>
+
+ * types.h: Define kpse_debug_hash_lookup_int.
+
+2009-03-17 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * c-std.h, getopt.h: Avoid non-prototype declarations for C++.
+
+2009-03-16 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * db.c, debug.c, debug.h, dir.c, elt-dirs.c, hash.c, pathsearch.c,
+ progname.c, tex-file.c, variable.c:
+ Rename KPSE_DEBUG_P into KPATHSEA_DEBUG_P (using kpse->debug)
+ Define KPSE_DEBUG_SET and KPSE_DEBUG_P (using kpathsea_debug)
+ compatible with old API.
+
+2009-03-12 Taco Hoekwater <taco@luatex.org>
+
+ New Kpathsea API: Make libkpathsea reenterable.
+
+ * extend-fname.c, file-p.c, xftello.c, make-suffix.c, xcalloc.c,
+ line.c, readlink.c, concat3.c, line.h, str-llist.c, kpsestat.c,
+ xmalloc.c, str-llist.h, xbasename.c, xfseeko.c, xgetcwd.c,
+ concat.c, xstat.h, atou.c, rm-suffix.c, str-list.c,
+ find-suffix.c, hash.c, xfseek.c, debug.c, str-list.h, hash.h,
+ xopendir.c, uppercasify.c, debug.h, xopendir.h, xftell.c,
+ xfopen.c, access.c, fn.c, xdirname.c, fn.h, xstrdup.c,
+ xrealloc.c, xstat.c:
+ All of these files have stopped using the PxC and PxH macros.
+
+ Besides this change, there are a few extra changes to specific
+ files.
+
+ * debug.c: add a guard that disables debug reporting if
+ the oldinterface is not compiled in the library, and uses the
+ kpse_def_inst structure otherwise.
+
+ * hash.c (hash_free): new function.
+
+ * concat3.c: now allows the second and third argument to be NULL
+
+ * tex-hush.h, tex-make.c, progname.h, dir.c,
+ absolute.c, expand.c, tex-make.h, tex-glyph.c, tex-file.h,
+ absolute.h, expand.h, truncate.c, variable.c, tex-glyph.h,
+ default.h, variable.h, truncate.h, kdefault.c, readable.c,
+ tilde.c, fontmap.c, readable.h, tilde.h, cnf.c, fontmap.h,
+ cnf.h, path-elt.c, pathsearch.c, elt-dirs.c, db.c, pathsearch.h,
+ db.h, proginit.c, magstep.c, proginit.h, magstep.h, tex-hush.c:
+ All of these files have stopped using the PxC and PxH macros.
+
+ In all of these files, the exported functions whose names
+ started with 'kpse_' have been renamed to use the prefix
+ 'kpathsea_' instead, and they now required an extra argument
+ that is a kpathsea instance structure. New one-line functions
+ with the old exported names have been added that use a default
+ kpathsea instance. The functions are build and exported only if
+ the preprocessor macro KPSE_COMPAT_API is defined (which it
+ usually is, though).
+
+ Besides these changes, there are a few extra changes to speficic
+ files.
+
+ * progname.c: Removed the variables program_invocation_name and
+ program_invocation_short_name, these are now part of the
+ kpathsea instance (in renamed form)
+
+ * progname.c, xputenv.c, lib.h: Some extra preprocessor macros
+ (LIB_FATALx) are added and a few others are changed so that
+ the library functions can give the proper invocation_name
+ in fatal error messages
+
+ * tex-file.c: The default instance variable is moved to the new
+ file kpathsea.c
+
+ * kpathsea.c: New file containing the default
+ instance variables and the new functions kpathsea_new() and
+ kpathsea_finish()
+
+ * version.c: Variable kpse_bug_address renamed
+ to kpathsea_bug_address.
+
+ * types.h:
+ Added a preprocessor define KPSE_COMPAT_API, used throughout the
+ library. If it is undefined then the old-style functions and
+ definitions are not compiled.
+ Removed the w32-specific 'cached_home_directory' and 'volumes'
+ variables from the instance structure.
+ Added 'invocation_name' and 'invocation_short_name' variables to
+ the instance structure.
+ Removed the 'kpse_' prefix from the instance variables fallback_font,
+ fallback_resolutions_string, fallback_resolutions, and format_info.
+ Added prototypes for kpathsea_new() and kpathsea_finish().
+ Added #defines for kpse_bug_address, kpse_fallback_font,
+ kpse_fallback_resolutions_string, kpse_fallback_resolutions,
+ kpse_format_info, program_invocation_name, and
+ program_invocation_short_name
+
+ * mingw32.c:
+ Disabled home directory caching: removed the function
+ uncache_home_directory() and the cached_home_directory
+ structure item.
+ Disabled volume queries: removed win32_volumes typedef,
+ the static functions lookup_volume_info(), add_volume_info(),
+ and GetCachedVolumeInformation(), as well as the functions
+ get_volume_info() and is_fat_volume().
+
+ * mingw32.h: Removed volume_user_date typedef
+ and added declaration for get_home_directory()
+
+ * kpsewhich.c: stop using PxC macros and
+ switch to new API interface
+
+ * configure.ac: Bump the version numbers to 5.0.0 (provisionally)
+
+ * Makefile.am: Add kpathsea.c
+
+2009-03-05 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Part 2 of patches from Taco Hoekwater for __MINGW32__
+ * mingw32.c: new file.
+ * mingw32.h (look_for_cmd): use only two arguments.
+ * tex-make.c (maketex): arg4 of ReadFile is DOWRD, not int.
+
+2009-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Part 1 of patches from Taco Hoekwater for __MINGW32__
+ * mingw32.h: new.
+ * c-ctype.h, c-stat.h: do not #include <oldnames.h>.
+ * config.h: #include <kpathsea/mingw32.h>, not <win32lib.h>
+ * progname.c: do #include <kpathsea/mingw32.h>.
+ * xopendir.c: do build xopendir for __MINGW32__.
+
+ * progname.c, progname.h: changed static function selfdir()
+ into exported function kpse_selfdir() for use in luatex.
+
+2009-02-28 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape_commands): add pstopdf and convert per
+ Dick Koch.
+
+2009-02-26 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (shell_escape): set to new possibility p.
+ (shell_escape_commands): first cut at allow list.
+
+2009-02-21 Karl Berry <karl@tug.org>
+
+ * tex-file.c: doc fixes.
+
+2009-02-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * xputenv.c: prototype for putenv() if !HAVE_DECL_PUTENV.
+
+2009-02-06 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXINPUTS.lua*): add definitions for
+ luatex, lualatex, pdfluatex, pdflualatex.
+
+2008-12-31 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (find_format): special-case XDvi to
+ kpse_program_text_file ("other text files").
+
+2008-12-15 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (main): warn if the explicit --user-format string
+ is not recognized.
+
+2008-12-13 Karl Berry <karl@tug.org>
+
+ * elt-dirs.c (do_subdir): only do the st_nlink trick if st_nlink
+ is exactly 2; Cygwin sets st_nlink to 1 now. Remove special case
+ for the Amiga.
+ * kpathsea.texi (Subdirectory expansion): correct preprocessor
+ name to ST_NLINK_TRIC.
+ Report from Ken Brown, tlbuild mail 12 Dec 2008 13:42:19.
+
+2008-11-10 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (USAGE): mention need for -engine when looking up
+ format files. Some reformatting.
+
+2008-09-20 Karl Berry <karl@tug.org>
+
+ * texmf.cnf: strongly warn that customizations in this file will
+ be lost by later updates.
+
+2008-08-05 Karl Berry <karl@tug.org>
+
+ * mktextfm (MAG): set back to 1. mag=0 fails with larm1000.mf,
+ and we're not going to fix the fonts.
+
+2008-07-08 Karl Berry <karl@tug.org>
+
+ * configure.in: version 3.5.7.
+
+2008-07-06 Karl Berry <karl@tug.org>
+
+ * withenable.ac (texmfmain): do not bother with long verbose
+ complaint when the tree can't be found, since this is normal in TL.
+
+2008-07-05 Karl Berry <karl@tug.org>
+
+ * mktextfm (MAG): set to 0; why were we using MAG=1? Left
+ over from when we included pregenerated pk's in the distribution?
+
+2008-07-04 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (max_strings): increase to 500000.
+ ctt posting from Benno Puetz, http://groups.google.com/group/comp.text.tex/browse_thread/thread/2c3aa2d09b4625e3
+
+ * progname.c [HAVE_PROGRAM_INVOCATION_NAME]: remove all #ifdef's
+ except around the declaration, so that we always use our own code
+ to compute them. This avoids painful system dependencies.
+
+2008-07-02 Karl Berry <karl@tug.org>
+
+ * mktexlsr: doc fix.
+
+ * kpathsea.texi (Path searching options): mention --engine=/ trick.
+
+2008-06-16 Karl Berry <karl@tug.org>
+
+ * texmf.cnf (TEXMFDOC): new var.
+ (TEXMFDBS): use it, so ls-R gets created there.
+ (TEXMFDOCDIR): use it.
+ [Reminder: the texmf.cnf here in Build/ is slaved to the one in
+ Master/.]
+
+2008-06-15 Karl Berry <karl@tug.org>
+
+ * mktexlsr: once again respect dir names given on cmd line.
+
+2008-06-12 Karl Berry <karl@tug.org>
+
+ * tex-file.c () <kpse_cmap_format>: cmap files (texmf/fonts/cmap)
+ do not have the .cmap suffix. (t1.cmap, et al., are TeX files,
+ not cmap files.) So remove the SUFFIXES definition.
+
+2008-05-31 Karl Berry <karl@tug.org>
+
+ * elt-dirs.c (kpse_normalize_path): only output debug line if
+ value is not 1. Reformat.
+
+ * tex-file.c (INIT_FORMAT): construct human-formatted list of
+ envvars that are considered for each format, as requested by
+ Nelson Beebe and others over the years.
+ (init_format) [KPSE_DEBUG]: include it in the debugging output.
+ (concatn_with_spaces): the function to make the list.
+
+ * tex-make.c: concatn.h unused, removed.
+
+ * db.c (DB_HASH_SIZE): 32003 seems a better compromise between the
+ tiny texmf (~1300 entries) and huge texmf-dist (~62000 entries).
+
+2008-05-29 Karl Berry <karl@tug.org>
+
+ * db.c (DB_HASH_SIZE): increase to 75000+, the actual size of
+ current ls-R.
+
+ * cnf.c: doc fixes.
+
+ * Makefile.in (stamp-paths): change var substitutions to use /nonesuch.
+ (texmf.sed, texmf.cnf): remove targets, we will juse use texmf.cnf.
+ (install-data): texmf.cnf is in srcdir now.
+
+ * texmf.in: remove.
+ * texmf.cnf: new file, slave to Master/texmf/web2c/texmf.cnf.
+
+2008-05-28 Karl Berry <karl@tug.org>
+
+ * mktexlsr: support --quiet/--silent.
+
+2008-05-24 Karl Berry <karl@tug.org>
+
+ * kpathsea.texi (Specially-recognized files): new node to
+ document the special filenames kpsewhich now knows about.
+
+2008-05-23 Karl Berry <karl@tug.org>
+
+ * tex-file.c (init_path): do not free the translated env_value,
+ else raw_path ends up pointing to that freed memory.
+
+ * default.h: mention that result is always in new memory.
+ * kpsewhich.c: recognize texmf.cnf as kpse_cnf_format.
+
+ * kpsewhich.c (find_format): use the right formats for texmf.cnf,
+ dvipdfmx.cfg, fmtutil.cnf, mktex.cnf, and updmap.cfg (as well as
+ config.ps, earlier). Same values as texmf/texconfig/tcfmgr.map.
+
+2008-05-18 Karl Berry <karl@tug.org>
+
+ * mktexlsr (vc_dirs): ignore more than just .svn.
+ Original suggestion from Michael Schutte, Debian bug 481371,
+ 16 May 2008 11:31:20.
+
+2008-05-05 Karl Berry <karl@tug.org>
+
+ * recorder.h: declare our fn variables extern as they should be.
+ * cnf.c: make the definitions here.
+
+2008-05-04 Karl Berry <karl@tug.org>
+
+ * finish changing license notices to use FSF url instead of
+ physical address, other minor consistency changes.
+
+2008-05-01 Karl Berry <karl@tug.org>
+
+ * tex-file.c (ALT_SOURCES_SUFFIXES): new macro (.dtx, .ins).
+ (kpse_init_format) <kpse_texsource_format>: use it.
+
+2008-04-30 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (read_command_line): leave two spaces before alt
+ suffixes, just so they can be distinguished.
+
+ * tex-file.c (ALT_TEX_SUFFIXES): define this (rather belatedly)
+ to check for .sty, .cls, etc.
+ Rename other *_SUFFIXES to ALT_*_SUFFIXES.
+
+ * kpathsea.texi (File lookup): Document this.
+ * tex-file.c: (target_fontmaps, target_asis_name,
+ target_suffixed_names): new fns.
+ (kpse_find_file_generic): call them, respecting new cnf value
+ try_std_extension_first.
+
+2008-04-29 Karl Berry <karl@tug.org>
+
+ * Makefile.in (install-data): do not cd $(srcdir) in any rule,
+ that fails when the install program is specified by a relative path.
+
+2008-03-27 Karl Berry <karl@tug.org>
+
+ * tex-make.c: start "running" on a new line, tweak other msgs.
+
+2008-03-07 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * kpsewhich.c (main): change type of value from string to
+ const_string, to avoid warning.
+ * progname.c (selfdir): change type of elt from string to
+ const_string, to avoid warning.
+ * xputenv.c: change type of saved_env from const_string to
+ string, to avoid warning.
+
+2008-03-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * access.c, readlink.c: removed `#include <stdio.h>' preceeding
+ `#include <kpathsea/config.h>' (which in turn includes stdio.h).
+
+ * xfseek.c, xftell.c: reverted to state before 2008-02-21.
+ * xfseeko.c, xftello.c (both new): new functions using off_t
+ instead of long, and fseeko instead of fseek.
+ * lib.h: prototypes for xfseek, xfseeko, xftell, and xftello.
+ * Makefile.in (objects): added xfseeko.lo and xftello.lo.
+
+ * configure.in: construct package and (shared) library version
+ from m4_define'd parts, subtitute KPSE_LT_VERS ...
+ * Makefile.in ($(kpathsea)): ... here.
+
+2008-03-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * common.ac: add AC_SYS_LARGEFILE and AC_FUNC_FSEEKO.
+
+2008-03-02 Karl Berry <karl@tug.org>
+
+ * cnf.c (read_all_cnf): change warning text when texmf.cnf is not
+ found to make it clear we are giving it, and keep it on one line.
+
+2008-01-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * common.ac: replace the private macro KPSE_STRUCT_ST_MTIM
+ by AC_CHECK_MEMBERS([struct stat.st_mtim]).
+
+ * common.ac: use AC_CHECK_DECLS([strstr]) and ...
+ * lib.h: ... replace `#ifndef HAVE_STRSTR' by
+ `#if !HAVE_DECL_STRSTR'.
+
+ * common.ac: Move AC_CONFIG_HEADERS from here ...
+ * configure.in: ... to here and replace PACKAGE_... by
+ KPSE_PACKAGE_... in c-auto.h, to avoid conflicts with other
+ packages.
+
+ * configure.in: use AH_TOP, AH_BOTTOM, and AC_DEFINE's third
+ argument to provide autoheader templates ...
+ * common.ac: m4 code to generate AC_DEFINE with a third argument
+ for MAKE_..._BY_DEFAULT and set them to 0 or 1 ...
+ * withenable.ac: use AC_DEFINE's third argument to provide
+ autoheader templates ...
+ * acconfig.h: ... removed.
+
+2008-02-24 Martin Schr\"oder <martin@pdftex.org>
+
+ * lib.h: systypes.h instead of c-std.h
+
+2008-02-23 Martin Schr\"der <martin@pdftex.org>
+
+ * lib.h: include c-std.h to get off_t from stdio.h
+
+2008-02-21 Martin Schr\"oder <martin@pdftex.org>
+
+ * lib.h, xfseek.c, xftell.c: LFS support: use off_t instead of long
+ and fseeko instead of fseek
+
+2008-02-14 Karl Berry <karl@tug.org>
+
+ * texmf.in (font_mem_size): increase to 3000000.
+ (font_max): increase to 5000 (max_font_max increased in tex.ch).
+
+2008-02-11 Karl Berry <karl@tug.org>
+
+ * install.texi: mention mktexfmt, other mktex updates.
+ (Bug report from Ken Brooks, 03 Aug 2006 15:15:03.)
+
+2008-02-08 Karl Berry <karl@tug.org>
+
+ * texmf.in: texlive2008 to match texmf/web2c/texmf.cnf.
+
+2008-01-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Convert from autoconf-2.13 to autoconf-2.59+:
+ * Makefile.in: Add @configure_input@ line.
+ * aclocal.m4 (new): Generated (aclocal -I ../m4).
+ * configure: Regenerated (autoconf).
+
+2008-01-25 Karl Berry <karl@tug.org>
+
+ * variable.c (expand): do ~ expansion here too, for --expand-var,
+ or mktexnam fails.
+ Report from Werner Lemberg, 24 Jan 2008 02:19:49.
+ * kpathsea.texi (Auxiliary tasks): document this.
+
+2008-01-21 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c, kpathsea.texi: document --all and --subdir.
+
+ * db.c through tex-file.c: replace FSF physical address with url.
+
+2008-01-18 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (subdir_match): XRETALLOC is a statement not a function.
+ * pathsearch.c (search_list): remove unused variable uniq_list.
+
+2008-01-16 Karl Berry <karl@tug.org>
+
+ * absolute.c through config.h: replace FSF physical address with url.
+
+2008-01-15 Karl Berry <karl@tug.org>
+
+ * variable.c (kpse_var_value): only free if new memory.
+
+ * tex-file.c (kpse_find_file_generic): call kpse_make_tex if the
+ first element of the list is NULL, not the list itself.
+
+2008-01-14 Karl Berry <karl@tug.org>
+
+ * variable.c (kpse_var_value): also do ~ expansion.
+ * variable.h: adjust comments.
+ * kpathsea.texi (Auxiliary tasks): document this.
+
+ * tilde.c (HOMEVAR): new #define; "USERPROFILE" on Windows,
+ "HOME" else.
+ * tilde.h: adjust comments.
+ * kpathsea.texi (Tilde expansion): document this.
+
+2008-01-13 Karl Berry <karl@tug.org>
+
+ * remote.c-no: remove this stub. Suggestion from Martin.
+
+ * mktexpk: use $MT_MKTEXDIR in the error message if making
+ PKDESTDIR fails, instead of hardwiring mktexdir.
+ From Javier, 7 Jan 2008 11:33:18.
+
+ * kpsewhich.c (subdir_match): protect again loc going infinitely
+ negative. Found by dak, 8 Jan 2008 14:51:08.
+
+2008-01-05 Karl Berry <karl@tug.org>
+
+ * texmf.in (progname, engine): distinguish the unset values.
+ (main_memory): increase to 3M.
+ (font_mem_size): increase to 2.5M.
+ (trie_size): increase to 400K.
+ (save_size): increase to 50K.
+ These size changes per gwtex (except a bit more).
+
+2008-01-02 Karl Berry <karl@tug.org>
+
+ * c-std.h (ALLOC_RETURN_TYPE) [!STDC_HEADERS]: just use void in
+ the unlikely event we're declaring *alloc ourselves. No modern
+ system uses char * for them.
+
+2007-12-23 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (subdir_match): new fn.
+ (lookup): call it if requested.
+ (subdir_paths): new global.
+ (read_command_line): new option --subdir.
+
+2007-12-22 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (lookup): handle --all for regular lookups as well
+ as user-specific paths.
+ * pathsearch.c (search_list): uniqify list before returning.
+ (kpse_path_search_list_generic): new fn.
+ (kpse_all_path_search_list, kpse_path_search_list): rewrite to
+ call ..._generic.
+ * pathsearch.h (kpse_path_search_list_generic): declare it.
+ * str-list.c (str_list_uniqify): new fn.
+ * str-list.h (str_list_uniqify): declare it.
+ * tex-file.c (kpse_find_file_generic): new name for kpse_find_file
+ code, with addition of argument to find all.
+ (kpse_find_file): rewrite to call ..._generic.
+ * tex-file.h (kpse_find_file_generic): declare it.
+
+2007-12-17 Karl Berry <karl@tug.org>
+
+ * kpathsea.texi (Path searching options): clarify --expand-path doc.
+
+2007-12-15 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (read_command_line, USAGE): improve --version and
+ --help messages.
+
+2007-12-01 Karl Berry <karl@tug.org>
+
+ * texmf.in (MPMEMS, MFBASES, TEXFORMATS): switch to /$engine,
+ to try to avoid finding a format for the wrong engine.
+ From Akira.
+
+2007-11-05 Karl Berry <karl@tug.org>
+
+ * texmf.in (allow_multiple_suffixes): unimplemented.
+ Reported by Akira, 17 Feb 2007 15:44:39.
+
+2007-10-24 Karl Berry <karl@tug.org>
+
+ * mktexpk (MODE) <720>: epscszz. From Akira.
+ (PKDESTDIR): Quote. From Paul Vojta,
+ tex-k 22 Oct 2007 17:38:56.
+
+2007-09-11 Karl Berry <karl@tug.org>
+
+ * texmf.in (TRFONTS): don't recurse through /usr.
+ Report from Michail Vidiassov, mp-i 10 Sep 2007 12:55:10.
+
+2007-08-27 Karl Berry <karl@tug.org>
+
+ * fontmap.c (map_file_parse): free the original pointer, not the
+ potentially moved one (after whitespace skipping).
+ From: "George N. White III", 25 Jul 2007 11:27:12.
+
+2007-07-29 Karl Berry <karl@tug.org>
+
+ * depend.mk: regenerate again.
+
+2007-07-24 Karl Berry <karl@tug.org>
+
+ * recorder.h (kpse_input, kpse_output): use const_string as
+ argument, not just char *, to avoid warning.
+
+ * fontmap.c (map_file_parse): kpse_record_input if requested.
+ From Akira, 23 Jul 2007 10:20:58 (original report from George
+ White).
+
+2007-07-15 Karl Berry <karl@tug.org>
+
+ * depend.mak: update.
+
+2007-07-06 Karl Berry <karl@tug.org>
+
+ * tex-file.c (init_path) <kpse_lua_format>: let's make the format
+ name be lua rather than luatex; otherwise kpsewhich -format=luatex
+ finds kpse_tex_format sometimes, and it seems unnecessary to debug
+ that just now.
+ Also, set suffix_search_only=true.
+ (LUA_SUFFIXES): put compiled suffixes first.
+
+2007-07-05 Karl Berry <karl@tug.org>
+
+ * tex-file.h (kpse_file_format_type): define kpse_lua_format.
+ * tex-file.c (LUA_ENVS, LUA_SUFFIXES): new macros
+ (init_path): initialize kpse_lua_format.
+
+ * texmf.in (LUAINPUTS): add $TEXINPUTS per Hans and Taco.
+
+2007-06-14 Karl Berry <karl@tug.org>
+
+ * texmf.in: doc fix ({a,b} is not deprecated).
+
+2007-05-19 Karl Berry <karl@tug.org>
+
+ * texmf.in (SYSTEXMF): add TEXMFSYSVAR (thread around 7mar07).
+
+2007-05-05 Karl Berry <karl@tug.org>
+
+ * kpsewhich.c (find_format): hardware kpse_dvips_config_format for
+ config.ps.
+
+ * texmf.in (TEXMFMAIN, TEXMFDIST, TEXMFLOCAL, TEXMFSYSVAR,
+ TEXMFSYSCONFIG, VARTEXFONTS, MIMELIBDIR, MAILCAPLIBDIR, TEXMFNCF):
+ use @texmf@ etc. expansions so that (hopefully)
+ --disable-multiplatform works again. For TEXMFCNF, restore
+ inclusion of $TEXMF/web2c, too. Reported by Peter M.
+
+2007-03-21 Karl Berry <karl@tug.org>
+
+ * install.texi (Shared library): remove mention of klibtool.
+
+2007-03-09 Akira Kakuto <kakuto@fsci.fuk.kindai.ac.jp>
+
+ * tex-file.c (kpse_init_format): reduce to just .fmt;
+ and allow both .t42 and .T42.
+
+2007-02-26 Karl Berry <karl@tug.org>
+
+ * bugs.texi (Logging): mention pdftex -recorder and strace et al.
+ (Bug checklist): Remove my old physical address.
+
+2007-02-02 Karl Berry <karl@tug.org>
+
+ * texmf.in (OVFFONTS): search for vf.
+ (OFMFONTS): explicitly adding TFMFONTS seems unnecessary.
+ From Hans and Taco, 25 Jan 2007.
+
+2006-12-30 Karl Berry <karl@tug.org>
+
+ * configure.in (KPSEVERSION): 3.5.6.
+
+2006-12-29 Karl Berry <karl@tug.org>
+
+ * tex-make.c (set_maketex_mag): deleted wrong extra arg;
+ do not generate args with spaces for mf. From Akira.
+
+2006-12-26 Karl Berry <karl@tug.org>
+
+ * tex-make.c: (set_maketex_mag): remove spurious extra argument
+ `r' to sprintf.
+ (maketex): remove unused variable status.
+
+2006-12-25 Karl Berry <karl@tug.org>
+
+ * mktexlsr: support --verbose.
+
+2006-12-14 Karl Berry <karl@tug.org>
+
+ * texmf.in: unify with TL texmf.cnf to make only real differences
+ show up.
+
+2006-12-09 Karl Berry <karl@tug.org>
+
+ * c-memstr.h (strings.h): don't include if HAVE_STRING_H (as all
+ systems should, these days). Reported by vvv.
+
+2006-07-15 Karl Berry <karl@tug.org>
+
+ * expand.c (kpse_expand_kpse_dot): omit empty path elements from
+ TEXMFCNF, per http://bugs.debian.org/358330. Patch from Julian
+ Gilbey, tex-k/tex-live mail 27 Mar 2006 19:32:43 +0100.
+
+2006-02-03 Karl Berry <karl@tug.org>
+
+ * mktexlsr: ignore .svn directories.
+
+2005-08-13 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsewhich.c: Update copyright message.
+
+2005-08-03 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * README: Change references to COPYING and COPYING.LIB to GPL and
+ LGPL.
+
+ * kpathsea.texi: Change references to COPYING and COPYING.LIB to
+ GPL and LGPL.
+
+ * readlink.c: Correct license banner.
+
+2005-07-27 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in: Add comment to start of kpathsea.h.
+
+ * absolute.h, acconfig.h, c-ctype.h, c-dir.h, c-errno.h,
+ c-fopen.h, c-limits.h, c-memstr.h, c-minmax.h, c-namemx.h,
+ c-pathch.h, c-pathmx.h, c-proto.h, c-stat.h, c-std.h, c-unistd.h,
+ c-vararg.h, cnf.h, concatn.h, config.h, db.h, debug.h, default.h,
+ expand.h, fn.h, fontmap.h, getopt.h, hash.h, lib.h, line.h,
+ magstep.h, pathsearch.h, proginit.h, progname.h, readable.h,
+ str-list.h, str-llist.h, systypes.h, tex-file.h, tex-glyph.h,
+ tex-hush.h, tex-make.h, tilde.h, truncate.h, types.h, variable.h,
+ xopendir.h, xstat.h: Update copyright, license to LGPL 2.1.
+
+2005-07-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * access.c, readlink.c: Update copyright, license text.
+
+ * atou.c, absolute.c, cnf.c, concat.c, concat3.c, concatn.c, db.c,
+ debug.c, dir.c, elt-dirs.c, expand.c, extend-fname.c, file-p.c,
+ find-suffix.c, fn.c, fontmap.c, getopt.c, getopt1.c, hash.c,
+ kdefault.c, kpsestat.c, kpsewhich.c, line.c, magstep.c,
+ make-suffix.c, path-elt.c, pathsearch.c, proginit.c, progname.c,
+ readable.c, rm-suffix.c, str-list.c, str-llist.c, strcasecmp.c,
+ strstr.c, strtol.c, tex-file.c, tex-glyph.c, tex-hush.c,
+ tex-make.c, tilde.c, truncate.c, uppercasify.c, variable.c,
+ version.c, xbasename.c, xcalloc.c, xdirname.c, xfopen.c, xfseek.c,
+ xftell.c, xgetcwd.c, xopendir.c, xrealloc.c, xstat.c, xstrdup.c:
+ Update copyright, license to LGLP 2.1.
+
+ * xmalloc.c, xrealloc.c: Update copyright, license to LGPL 2.1.
+ Don't include stdio.h directly, it comes via config.h.
+
+2005-07-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Increase trie_size. Remove inaccurate comment about
+ its limits.
+
+ * common.ac: Remove the check for SMART_PUTENV, the xputenv code
+ has been rewritten not to need this.
+
+ * tex-file.c (kpse_init_format): Add uppercase versions of the
+ .ttf and .ttc suffixes for truetype fonts. Don't require a
+ recognized suffix.
+
+ * types.h: Don't #define true if it is already defined. From Karl
+ Berry.
+
+ * mktexmf: Additional change for generating cbgreek from Thomas.
+
+2005-07-12 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexmf: Patterns for cbgreek weren't inclusive enough. From
+ Thomas.
+
+2005-07-10 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c (kpse_init_format): Revive .otf extension for
+ kpse_opentype_format, requested by Akira Kakuto
+ <kakuto@fsci.fuk.kindai.ac.jp>.
+
+ * tex-make.c (maketex): Print the name of the failing command
+ instead of always mktexpk. From Karl berry
+ <karl@freefriends.org>.
+
+ * acconfig.h: Remove SMART_PUTENV code.
+
+ * xputenv.c (xputenv): Replace with code that doesn't depend on
+ the SMART_PUTENV check.
+ (common.ac): Remove SMART_PUTENV check code.
+
+2005-06-29 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-make.c: Metafont doesn't like literals larger than anout
+ 4000, so try to avoid them when specifying magnifications. From
+ Werner Fink <werner@suse.de>.
+
+ * hash.h [KPSE_DEBUG]: Add KPSEDLL to declaration of
+ kpse_debug_hash_lookup_int. From Jan Nieuwenhuizen
+ <janneke@gnu.org>.
+
+2005-06-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * xt.ac: Fully quote the arguments of AC_ARG_WITH. From Peter
+ Breitenlohner.
+
+ * withenable.ac: Fully quote arguments of AC_ARG_WITH. From Peter
+ Breitenlohner.
+
+ * configure.in: Syntax changes to match autoconf2.5x. From Peter
+ Breitenlohner. Version to 3.5.5.
+
+ * common.ac: Fully quote AC_CONFIG_HEADERS. From Peter
+ Breitenlohner.
+
+ * Makefile.in: Replace ac_include with kpse_include. From Peter
+ Breitenlohner.
+
+2005-06-22 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * common.ac: Add KPSE_STRUCT_ST_MTIM check.
+
+ * expand.c: Update some comments.
+
+ * pathsearch.c: Update some comments.
+
+ * tex-file.c (init_path): Translate ';' to ':' in values we get
+ from the environment if the latter is our env_sep.
+
+ * cnf.c (do_line): Always translate ';' to ':' in config values if
+ the latter is the env_sep.
+
+ * kpathsea.texi: Remove ALLOW_SEMICOLON_IN_FILENAMES comment.
+
+2005-06-21 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Re-export PATH after changing it. Some shells require
+ this. Reported by Albert Chin <china@thewrittenword.com>.
+
+ * tex-file.c (kpse_find_file): Call kpse_expand() to do tilde and
+ variable expansion, which kpse_path_search_list() doesn't do, but
+ kpse_path_search() did. Re-enabling this was requested by several
+ people, including Oliver Grewe <olligrewe@nexgo.de>.
+
+ * mktexpk, bugs.texi: From Karl Berry: "Try to be more informative
+ when mktexpk can't guess the mode; reported by Knuth in tex-k
+ mail, 26 Apr 2005 18:07:20 -0400."
+
+2005-04-10 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tilde.c (kpse_tilde_expand): Slightly simplify code.
+
+ * tilde.c (kpse_tilde_expand): Account for the possibility that
+ we're fed an argument starting with "!!~". Problem reported by
+ DEK.
+
+2005-03-07 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * install.texi: Document texmfvar and USE_TEXMFVAR. From Thomas.
+
+ * mktexdir: Break out of loop on failure of mkdir. Last-minute
+ change for teTeX 3.0 from Thomas.
+
+2005-02-06 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsereadlink.man: Correct banner: READLINK -> KPSEREADLINK.
+
+2005-02-05 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (texmf.sed): With TEXMFSYSVAR and TEXMFSYSCONFIG
+ added, there's even more potential damage to clean up.
+ (uninstall-data): Try to cleanly uninstall the info document.
+
+ * texmf.in: Add TEXMFSYSVAR, TEXMFSYSCONFIG for teTeX 3.0. From
+ Thomas.
+
+2005-01-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexmf: Don't redirect output of cd, Ultrix doesn't like that.
+
+2005-01-21 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in: Change POSTINSTALL to POST_INSTALL.
+
+ * mktex.opt: Add texmfvar to list of allowed feature options.
+
+ * mktexlsr: Make getting the list of directories from $TEXMFDBS
+ more robust. From Thomas.
+
+ * kpsereadlink.man, kpsestat.man, kpsewhich.man, mktexlsr.man,
+ mktexmf.man, mktextfm.man, mktexpk.man, kpseaccess.man: Man page
+ corrections from Eric S. Raymond <esr@thyrsus.com>.
+
+2005-01-07 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexpk: Add guess ultre for 1200 dpi. This is a fairly neutral
+ mode, also useful for pdftex. From Karl Berry.
+
+ * mktexlsr: Make sorting the texmf trees more robust. From
+ Thomas.
+
+2004-12-29 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * configure.in: Version 3.5.4.
+
+ * mktexlsr: Remove duplicate trees. From Thomas.
+
+ * mktexdir: Remove superfluous cd. From Thomas.
+
+ * withenable.ac: Sync with Thomas' version, removes
+ --enabled-multiplatform code.
+
+2004-12-28 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (texmf.sed): New variables were added named TEXMF*.
+ The cleanup code needed additional fixes for this. From Thomas
+ Esser.
+
+ * mktexnam.opt: Improve comment.
+
+ * mktexnam: Handle texmfvar option, which directs all writes into
+ the system trees to the TEXMFVAR tree, with the usual caveats.
+
+ * mktexnam.opt: Add texmfvar option.
+
+ * texmf.in: Changes to bring it close to teTeX 3.0.
+
+2004-12-20 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: For XeTeX: TEXINPUTS.xetex, TEXINPUTS.xelatex,
+ OTFFONTS.
+
+2004-12-19 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * xt.ac: Mark --with-x-toolkit as obsolete.
+
+ * Makefile.in [KPATHSEA_CC]: Don't quote $(CC), as it prevents
+ libtool from functioning properly if $(CC) contains options in
+ addition to the compiler name. From Harald Koenig
+ <koenig@science-computing.de>.
+
+ * mktexpk: Add guesses for dpi 360 and 720. From Frank K\"uster
+ <frank@kuesterei.ch> (Debian maintainer).
+
+ * mktexlsr: Write all regular progress messages to stderr, instead
+ of some to stdout.
+
+ * mktexdir: Handle directories with spaces in the names.
+
+ * mktexupd: If we've called mktexlsr, there is no need to do
+ anything else, so exit immediately. From Thomas.
+
+2004-11-28 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add default entries for $progname and $engine, so we
+ don't expand these to empty if the file is used by pre 3.5.3
+ implementations.
+
+ * mktexmf: Extend the pattern for the cbgreek fonts. From Hartmut
+ Henkel <hartmut_henkel@gmx.de>.
+
+2004-10-05 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add TEXINPUTS.lamed (Aleph's version of lambda) and
+ TEXINPUTS.uft8mex (utf8 variation of mex).
+
+2004-08-24 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktex.opt: Correct syntax error. Reported by Staszek
+ Wawrykiewicz <staw@gust.org.pl>.
+
+2004-08-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: The TEXINPUTS.pdftexinfo entry in obsolete, and will
+ be removed in the future. Alert by Vladimir Volovich
+ <vvv@vsu.ru>.
+
+ * tex-file.c (kpse_find_file): Make debug message conditional
+ KPSE_DEBUG_SEARCH being set.
+
+ * kpsewhich.c: Remove spurious space in usage message.
+
+ * tex-file.c (kpse_find_file): Add debug message to clarify what
+ the library is doing when. From Karl Berry <karl@tug.org>.
+
+ * tex-file.c: Add TEXFONTS to the environment variables for all
+ kinds of font-related stuff. This means you can, if you want to,
+ just dump all font-related files in a single directory and set a
+ single variable to point to it. It doesn't have a default.
+ Suggested by Karl Berry, Hans Hagen, Akira Kakuto.
+
+2004-08-17 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr, mktex.opt: Use "test ... || test ..." instead of
+ "test ... -o ...".
+
+2004-08-06 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * xdirname.c: Cygwin also understands UNC names. From Jan
+ Nieuwenhuizen <janneke@gnu.org>.
+
+ * config.h: Do not define DOSISH for Cygwin. After Jan
+ Nieuwenhuizen <janneke@gnu.org>.
+
+ * mktex.opt: Refine the test of $COMPSEC a bit, to accomodate
+ Cygwin. After Jan Nieuwenhuizen <janneke@gnu.org>.
+
+ * mktexlsr: Refine the test for $COMSPEC a bit, to accomodate
+ Cygwin. After Jan Nieuwenhuizen <janneke@gnu.org>.
+
+ * Makefile.in: Define MAKE_KPSE_DLL when compiling the library to
+ support ugly windows declspec stuff. From Jan Nieuwenhuizen
+ <janneke@gnu.org>.
+
+ * c-proto.h: Clean up the defines for KPSEDLL a bit. From Jan
+ Nieuwenhuizen <janneke@gnu.org>.
+
+ * getopt.h: Clean up defines for KPSEDLL a bit. From Jan
+ Nieuwenhuizen <janneke@gnu.org>.
+
+2004-08-01 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Undoing some simplifications of the search paths, in
+ particular the texmf/{engine1,engine2,...} style paths are back to
+ accomodate older texmf trees.
+
+2004-07-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Adapt TRFONTS to Linux groff path, which is the most
+ useful variant these days.
+
+2004-07-21 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (uninstall-exec): Add removal rules for libkpathsea
+ and the programs other than kpsewhich.
+
+ * kpathsea.texi: Push copyright to bottom of page.
+
+ * texmf.in: Add paths for pdfxtex, pdfxlatex. After Peter
+ Breitenlohner <peb@mppmu.mpg.de>.
+
+ * texmf.in: Updates/simplifications to paths, from Thomas.
+
+2004-07-19 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * db.c (kpse_db_search_list): Add cast to suppress warning about
+ discarding "const".
+
+2004-07-03 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * common.ac: No m4 quoting needed in the KPSE_CROSS_BUILD_VAR
+ calls.
+
+ * common.ac: Add some invocations of KPSE_CROSS_BUILD_VAR matching
+ usage in ../make/cross.mk.
+
+ * mktextfm: Use the same code as mktexpk for ignoring metafont
+ errors, to ensure that mktextfm and mktexpk ignore identical sets
+ of metafont errors.
+
+2004-06-28 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Use @copying, so the license ends up in the HTML
+ output. Use @ifnottex instead of @ifinfo, so that makeinfo --html
+ works without further effort. From Karl Berry.
+
+ * install.texi: Name of bash manual is now "bash". From Karl
+ Berry.
+
+2004-06-22 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * c-memstr.h [HAVE_STRINGS_H]: Include strings.h if it is
+ available, as opposed to just doing if HAVE_STRING_H is not
+ defined. Otherwise we give conflicting information whether
+ certain old-style functions like index, rindex are defined.
+ * common.ac: Also check for strings.h.
+
+ * c-memstr.h: Add definitions for index and rindex in terms of
+ strchr and strrchr, as we've got some old code in TeX-live that
+ needs this on some platforms.
+
+2004-06-15 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * install.texi: Karl Berry pointed out that GNU fileutils is now
+ GNU coreutils.
+
+2004-06-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Make it more obvious that applications will often
+ just want to use <kpathsea/kpathsea.h> rather than pick and choose
+ headers.
+
+2004-06-11 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsewhich.c: Update copyright dates.
+
+2004-05-28 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Rename readlink to kpsereadlink to avoid name clash.
+
+ * Makefile.in: Rename readlink to kpsereadlink to avoid name
+ clash.
+
+2004-05-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c: Make .fmt the only "true" suffix for format files,
+ and add all other suffixes to the list of alternates. In the next
+ version, these alternates will be dropped entirely.
+
+2004-05-11 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (mostlyclean): access -> kpseaccess. From Thomas.
+
+2004-05-08 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Widen the matches for the lsR-pattern, so we omit the
+ temporary directory we used.
+
+2004-05-07 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Use $engine in some paths.
+
+ * kpathsea.texi: Date is May 2004.
+
+ * kpathsea.texi: Document --engine.
+
+ * kpsewhich.man: Document -engine.
+
+ * kpsewhich.c: Implement -engine option.
+
+2004-04-24 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * cnf.c (read_all_cnf): Fix memory leak.
+
+ * mktexupd: Fix logic error. Found by Thomas Esser.
+
+ * tex-file.c (kpse_init_fallback_resolutions): Fix memory leak.
+
+2004-04-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * db.c (kpse_db_search_list): Allow matches like base/plain.tex
+ when a db is used. This was a regression introduced by the switch
+ to kpse_db_search_list. Like the original code, this only works
+ with '/' used for dirsep. Reported by Wlodzimierz Bzyl
+ <matwb@univ.gda.pl>.
+
+2004-04-17 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsewhich.c (lookup): Partial implementation of -all option.
+ Works only in combination with the -path option.
+ * tex-file.c: Add to list of suffixes that may be used for format
+ files.
+
+ * kpathsea.texi: Document -var-value option kpsewhich.
+
+ * kpsewhich.man: Document -var-value.
+
+ * kpsewhich.c: Add -var-value option. Change loop that checks for
+ a kpse_file_format_type to check kpse_format_fmt last.
+
+ * texmf.in: Add TEXINPUTS.aleph, TEXINPUTS.alambda.
+
+2004-04-01 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexpk: Use dpdfezzz if given 8000 for BDPI. Apparently this
+ is what -Ppdf ends up giving the script.
+
+2004-03-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (install): access -> kpseaccess
+
+2004-03-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * db.c (kpse_init_db): Look for both "ls-R" and "ls-r" files.
+ Same contents, but when working cross-platform the all-lowercase
+ name is easier to work with.
+
+ * tex-file.c: Add .afmt as recognized suffix to kpse_fmt_format
+ (for Aleph). Add ls-r as recognized suffix to kpse_db_format.
+
+ * mktexlsr: Allow both ls-R and ls-r as names for an existing
+ directory tree index file. Always create ls-R.
+
+ * mktexupd: Check for both ls-R and ls-r.
+
+ * pathsearch.h (kpse_all_path_search_list): New function. Like
+ kpse_path_search_list, with must_exist true, but returns a list of
+ filenames instead of the first hit.
+
+ * pathsearch.c (kpse_all_path_search_list): New function. Like
+ kpse_path_search_list, with must_exist true, but returns a list of
+ filenames instead of the first hit.
+
+ * tex-make.c [WIN32] (maketex): Code to print error message for
+ ERROR_BROKEN_PIPE didn't match the format.
+
+ * mktexpk: Allow 'angle(0,0)' errors without aborting. From
+ Andreas Degert <ad@papyrus-gmbh.de>.
+
+ * unixtex.texi: Update from Karl Berry.
+
+2004-03-21 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * withenable.ac: Make the warnings more obvious if the search for
+ the texmf tree fails. Also try to fall back on kpsewhich if we
+ fail to find anything. A simplified version of code proposed by
+ Stefan Ulrich <stefan.ulrich@zen.co.uk> for xdvik.
+
+2004-03-16 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add file_line_error_style variable, default to false.
+
+2004-02-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-make.c (maketex): Clean up unused variables.
+
+ * texmf.in: Update link in comment for TEXFONTMAPS.
+
+2004-02-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexnam: Use kpseaccess instead of access.
+
+ * mktexlsr: Use kpseaccess instead of access.
+
+ * Makefile.in: Rename the access executable to kpseaccess, as the
+ old name tended to interfere.
+
+ * kpseaccess.man: Formerly known as access.man.
+
+ * mktexlsr: Only check for magic string in ls-R file if the file
+ size is larger than 0. Assume that a 0-length ls-R can be
+ overwritten without penalty.
+
+ * mktexlsr: Use a more accurate method to ensure that directory
+ names, and only directory names, start with ./ in the ls-R file.
+
+2004-02-16 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c: Rename kpse_script_format to
+ kpse_texmfscripts_format.
+
+ * tex-file.h: Rename kpse_script_format to
+ kpse_texmfscripts_format.
+
+2004-02-15 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexpk: psfonts.map and ps2pk.map now found through the map
+ format.
+
+ * kpsewhich.c (find_format): psfonts.map and pdftex.map are no
+ longer special case, pdftex.cfg is a special case now.
+
+ * kpathsea.texi: Update for new formats (misc fonts, web, cweb,
+ enc, cmap, sfd, opentype fonts, pdftex config, lig files,
+ texmfscripts).
+
+ * tex-file.c: Add kpse_lig_format and kpse_script_format.
+
+ * tex-file.h: Add kpse_lig_format and kpse_script_format.
+
+ * texmf.in: Add LIGFONTS and TEXMFSCRIPTS.
+
+2004-02-10 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * db.c (kpse_db_search_list): An absolute or explicit relative
+ name that makes it here would not be found anyway, so test for it
+ and skip.
+
+ * pathsearch.c (search_list): If we're given only absolute or
+ relative filenames, then there is no need to dig into the database
+ or filesystem.
+ (dir_list_search_list): Skip any absolute filenames that make it here.
+
+2004-02-08 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (stamp-paths): Add TEXMFDIST. Suggested by Thomas.
+
+ * texmf.in: Add TEXMFDIST, suggested by Thomas.
+
+2004-01-09 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c: Add kpse_pdftex_config_format. From Thomas.
+
+ * tex-file.h: Add kpse_pdftex_config_format. From Thomas.
+
+2004-01-04 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Modifications to several paths suggested by Thomas.
+
+2003-12-17 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-make.c (kpse_make_tex): Allow '+' is font names as well.
+ Reported by Hartmut Henkel <hartmut_henkel@gmx.de>.
+
+2003-12-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * progname.c: Set "progname" in the environment.
+
+ * tex-file.h: Add new formats: kpse_enc_format, kpse_cmap_format,
+ kpse_sfd_format, kpse_opentype_format. Requested by Thomas.
+
+ * tex-file.c: Add new formats: kpse_enc_format, kpse_cmap_format,
+ kpse_sfd_format, kpse_opentype_format. Requested by Thomas.
+
+2003-02-27 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexmf: csso12[0-5][0-9] are from CJK package; unsupported by
+ mktexmf. Fix by Werner Lemberg <wl@gnu.org>.
+
+2003-02-19 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Version 3.5.2.
+
+ * configure.in: Version 3.5.2.
+
+ * cnf.c (do_line): KISS: Use IS_ENV_SEP(':') to check whether we
+ might want to replace ';' with ':' in paths instead of trying to
+ figure whether 'unix' should have been defined.
+
+ * db.c (kpse_db_search_list): Change fix to prevent "re-use" of
+ aliases for the sake of clearer code.
+
+ * db.c: Set aliases to NULL after freeing it, so we don't try to
+ realloc the same value as well. Reported by Thomas Esser
+ <te@dbs.uni-hannover.de>.
+
+2003-02-17 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * configure.in: Version 3.5.1.
+
+ * kpathsea.texi: Version 3.5.1.
+
+2003-02-15 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Version 3.5.0.
+
+ * configure.in: Version 3.5.0.
+
+ * kpathsea.version: removed.
+
+ * Makefile.in (dist): Remove kpathsea.version.
+
+ * common.ac: From klibtool to libtool. Based on patches from
+ Albert Chin-A-Young <china@thewrittenword.com>.
+
+ * Makefile.in: From klibtool to libtool. Based on patches from
+ Albert Chin-A-Young <china@thewrittenword.com>.
+
+ * texmf.in: Add TEXINPUTS.olatex path.
+
+ * tex-file.c: Add additional suffixes for formats.
+
+ * withenable.ac: When texmfmain is derived from ${prefix}, don't
+ expand ${prefix}.
+
+2003-02-11 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * pathsearch.c (search_list): Add some grotty code for the
+ searches of absolute pathnames. (Grotty: if _any_ of the given
+ pathnames is absolute or explicit relative, _and_ it is found, we
+ stop searching then and there.) Found by Peter Breitenlohner
+ <peb@mppmu.mpg.de>.
+
+2003-02-07 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Version 3.4.6
+
+ * kpathsea.texi: Version 3.4.6.
+
+ * configure.in: Version 3.4.6.
+
+ * texmf.in: Additions for e-Omega.
+
+ * tex-file.c (kpse_find_file): Use kpse_path_search_list for
+ search.
+
+ * pathsearch.h (kpse_path_search_list): New function.
+
+ * pathsearch.c (dir_list_search_list): New function.
+ (search_list): New function.
+ (kpse_path_search_list): New function: search for a list of names,
+ look for all names in the list in each directory before moving to
+ the next directory.
+
+ * db.h (kpse_db_search_list): New function.
+
+ * db.c (kpse_db_search_list): New function.
+
+2003-01-31 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * lib.h: Add include of c-proto.h. Suggested by Peter
+ Breitenlohner.
+
+2003-01-29 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Version 3.4.5.
+
+ * kpathsea.texi: Version 3.4.5.
+
+ * configure.in: Version 3.4.5.
+
+2003-01-24 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * config.h [KPATHSEA]: 33 -> 34.
+ [DEV_NULL]: Added, "/dev/null" on unix, "NUL" on DOSISH.
+
+ * texmf.in [TEXCONFIG]: Remove "." from path for security reasons.
+
+2003-01-16 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Version 3.4.4.
+
+ * configure.in: Version 3.4.4.
+
+ * kpathsea.version: Version 3.4.4.
+
+ * unixtex.texi: Updates.
+
+2003-01-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Uncomment definitions for VARTEXMF, HOMETEXMF. Change
+ TEXMF itself to be same as teTeX. Move '//' outside braces in
+ XDVIINPUTS and DVIPDFMINPUTS -- not strictly needed, but
+ consistent with how we do it everywhere else. Comment out (but
+ otherwise retain) KPSE_DOT.
+
+2003-01-11 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Version 3.4.3.
+
+ * kpathsea.texi: Version 3.4.3.
+
+ * configure.in: Version 3.4.3.
+
+2003-01-08 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add TEXPSHEADERS.dvipdfm, from Thomas.
+
+2002-12-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c (kpse_init_format): Add ".web" to the suffixes
+ recognized for cweb.
+
+2002-12-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * dir.c (dir_links): Argh. Error while merging stuff from
+ Fabrice.
+
+ * kpathsea.version: Version 3.4.2.
+
+ * configure.in: Version 3.4.2.
+
+ * kpathsea.texi: Version 3.4.2.
+
+ * tex-make.c (maketex) [WIN32]: Add program calling
+ implementation. From Fabrice Popineau
+ <Fabrice.Popineau@supelec.fr>.
+
+ * Makefile.in: Test for kpathsea.info explicitly in current
+ directory. Some makes prepend the source dir path otherwise, which
+ would cause installation of the info files to fail. From Thomas
+ Esser <te@dbs.uni-hannover.de>.
+
+2002-12-20 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * configure.in: Version 3.4.1.
+
+ * kpathsea.texi: Version 3.4.1.
+
+ * kpathsea.version: Version 3.4.1.
+
+ * tex-file.c (add_suffixes): Removed function.
+ (SUFFIXES, ALT_SUFFIXES): Use kpse_set_suffixes instead of
+ add_suffixes.
+
+ * tex-make.c (kpse_make_tex): On second thought, we should not get
+ dirseps in these names, ever.
+
+2002-12-17 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-make.c (maketex): Be sure to set ret to NULL if there's
+ nothing to return. From Akira Kakuto
+ <kakuto@fsci.fuk.kindai.ac.jp>.
+
+2002-12-15 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c: Properly terminate MKTEXPK_ARGS with a NULL.
+ Spotted by Akira Kakuto <kakuto@fsci.fuk.kindai.ac.jp>.
+
+2002-12-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Version 3.4.0.
+
+ * kpathsea.version: Version 3.4.0.
+
+ * configure.in: Version 3.4.0.
+
+ * texmf.in: Typo in TEXINPUTS.pdfemex-pl.
+
+ * xbasename.c (xbasename): Remove redundant call to strlen. From
+ Fabrice.
+
+ * tex-make.c (misstex): Update to print command line correctly.
+ (maketex): Handle argv style array for command. For unix case, call
+ fork and exec directly instead of using popen.
+ (kpse_make_tex): Handle argv style array for defining a command. Be
+ very restrictive about what a name passed may contain -- this may
+ well break somethings.
+
+ * tex-file.h (kpse_format_info): Instead of having programs args
+ be a single string, use an argv style array.
+
+ * tex-file.c (init_maketex): Change to store command line as an
+ array of arguments.
+ [MKTEXPK_ARGS]: Define list of strings instead of single string.
+ (kpse_init_format): Update debugging code to match new
+ kpse_format_info structure.
+
+ * progname.c [WIN32]: Updates from Fabrice.
+
+ * pathsearch.h: Typo in comment.
+
+ * pathsearch.c: Typo in comment.
+
+ * kpsewhich.c: Correct copyright notice.
+
+ * hash.c (hash_normalized): New function.
+ (hash_insert_normalized): New function.
+ [MONOCASE_FILENAMES]: Normalize to lower case, not upper case, because
+ that's what in the ls-R files we distribute.
+
+ * fontmap.c (map_file_parse): Use hash_insert_normalized. Again,
+ we assume the contents of font maps are already normalized.
+
+ * expand.c (kpse_expand_kpse_dot): Typo in comment.
+ (brace_expand): Clarify the comment.
+
+ * dir.c (dir_p) [WIN32]: safe_beg_of_path -> kpse_normalize_path.
+ From Fabrice.
+ (dir_links) [WIN32]: Changes to code that stores and retrieves
+ integers from pointers.
+
+ * db.c (db_build): Call hash_insert_normalized -- names from the
+ ls-R file should be normalized already.
+ (alias_build): Call hash_insert_normalized -- names from the alias
+ file should be normalized already.
+ (kpse_db_insert): Note that we call hash_insert here deliberately.
+
+ * hash.h (hash_insert_normalized): New function.
+
+ * concat.c (concat): Start strcat at the end of the previous
+ strcpy.
+
+ * absolute.c (kpse_absolute_p) [WIN32]: Remove explicit test for
+ UNC names, they're already covered by the test for names starting
+ with IS_DIR_SEP.
+ [TEST] (main): Added, from Fabrice.
+
+2002-11-13 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: To 3.3.11.
+
+ * kpathsea.texi: To 3.3.11.
+
+ * configure.in: To 3.3.11.
+
+2002-11-12 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * cnf.c (do_line): First check whether len-1 exists, then access
+ it, rather than the other way round. Spotted by Joern Clausen
+ <joern@techfak.uni-bielefeld.de>.
+
+ * texmf.in: obj_tab_size.context is now redundant. From Thomas.
+
+ * mktextfm: Use the same detection mechanism for mf-nowin as
+ mktexpk. From Thomas.
+
+2002-11-11 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Version 3.3.10.
+
+ * kpathsea.texi: Version 3.3.10.
+
+ * configure.in: Version 3.3.10.
+
+ * texmf.in: Disable parse_first_line by default (sorry). Enlarge
+ a number of constants in general, as opposed to defining lots of
+ context-specific versions.
+
+ * progname.c (remove_dots): We did not correctly handle paths with
+ ../.. in them. There is still one corner case left, if the path
+ would try to go to the "parent" of the root directory.
+
+ * mktextfm: Test for mf-nowin in a shubshell. Otherwise error
+ messages could end up being printed if mf-nowin does not exist.
+
+ * mktexpk: Test for mf-nowin in a subshell.
+
+2002-10-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kdefault.c (kpse_expand_default): Simplify the life of the
+ callers by always returning allocated memory, so the returned
+ string can be freed. John W. Eaton <jwe@bevo.che.wisc.edu>
+ requested this.
+
+2002-10-22 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * withenable.ac: Correct handling of mktexfmt option.
+
+ * tex-file.c: Add .oft to regcognized suffixes for tex_format.
+
+ * mktexupd: Correct Thomas' email address.
+
+ * mktextfm: Correct Thomas' email address.
+
+ * mktexpk: Correct Thomas' email address.
+
+ * mktexnam.opt: Correct Thomas' email address.
+
+ * mktexnam: Correct Thomas' email address.
+
+ * mktexmf: Correct Thomas' email address.
+
+ * mktexlsr: Correct Thomas' email address.
+
+ * mktexdir.opt: Correct Thomas' email address.
+
+ * mktexdir: Correct Thomas' email address.
+
+ * mktex.opt: Correct Thomas' email address.
+
+ * kpathsea.version: Update to 3.3.9.
+
+ * kpathsea.texi: Update to 3.3.9.
+
+ * configure.in: Update to 3.3.9.
+
+ * common.ac: Correct handling of mktexmft option.
+
+2002-10-16 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-make.c (kpse_make_tex): Move the test for problematic
+ filenames so we only do this when we're actually willing to make a
+ new file.
+
+2002-10-11 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Update date/version to 3.3.8.
+
+ * NEWS: Update for 3.3.8.
+
+ * configure.in: Version 3.3.8.
+
+ * kpathsea.version: Version 3.3.8.
+
+ * Makefile.in: Remove install rules for mktexfmt, as it is not a
+ separate file.
+
+2002-10-06 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Expand main_memory (again).
+
+ * xstat.c: Remove lstat() declaration.
+
+ * variable.c (kpse_var_value): Check for NAME.progname in the
+ environment before checking for NAME_progname. Both can occur,
+ even on UNIX systems.
+
+ * tex-file.c (init_path): We need to check PATH.progname,
+ PATH_programe, and PATH in the environment. PATH.progname is the
+ "logical" way to set the name on Windows systems, and can even
+ occur on UNIX systems if env(1) is used to set the environment
+ variables.
+
+ * withenable.ac: Add --with-mktexfmt-default option. After
+ Fabrice Popineau. He used --with-mkfmt-default, but this was
+ changed to match the other options.
+
+ * texmf.in: Add XDVIINPUTS, TEXINPUTS.pdfamstex. Modiy definition
+ of TEXMFLOCAL to match Thomas', add MKTEXFMT. All part of the
+ TeXlive merge.
+
+ * tex-make.c (kpse_make_tex): Complain if a number of problematic
+ characters are found in the requested font name -- this works in
+ combination with a check in maketex() to prevent misuse of the
+ system() call that starts the mktex* scripts.
+
+ * tex-file.c (kpse_init_format): Support for mktexfmt, from
+ Fabrice Popineau.
+
+ * mktexupd: Delete CR characters at the end-of-line before doing
+ the compare. Yet another hack for windows/unix cross-platform
+ support.
+
+ * mktextfm: TeXlive merge: support for mf-nowin.
+
+ * mktexpk: TeXlive merge: considerably reorganized to support use
+ of mf-nowin.
+
+ * mktexnam: Additional definitions for the LH fonts. TeXlive
+ merge.
+
+ * mktexmf: Additional definitions for the LH fonts. TeXlive
+ merge.
+
+ * common.ac: Add support for MAKE_TEX_FMT. From Fabrice Popineau.
+
+ * acconfig.h [MAKE_TEX_FMT_BY_DEFAULT] Added. After Fabrice
+ Popineau.
+
+2002-07-16 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsewhich.c (find_format): Remove special case for pdftex.cfg.
+ Not needed.
+
+ * kpsewhich.c (find_format): Hard-code format types for pdftex.cnf
+ and pdftex.map.
+
+2002-07-08 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktex.opt: Limit permissions on $TEMPDIR.
+
+ * mktexlsr: Limit permissions on tmp directory.
+
+2002-06-04 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Remove setting of src_specials: it will be ignored
+ anyway as we'll only allow it to be set from the command line.
+
+2002-05-28 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexdir: Guard $KPSE_DOT with quotes. From Emmanuel_Thom\'e
+ <thome@lix.polytechnique.fr>.
+
+2002-04-01 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Strip a trailing CR before testing the first line of
+ an ls-R file. Needed for interoperability with Windows (sigh).
+
+ * tex-make.c (maketex): Use a literal "r" in the popen command, as
+ (under UNIX) it tends not to understand "rb", and we're generating
+ text anyway.
+
+2001-11-27 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Version 3.3.7.
+
+ * configure.in: Version 3.3.7.
+
+2001-11-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * types.h: Define boolean as int whenever we can. This makes the
+ option-handling code correct (where pointer to int and pointer to
+ boolean need to be the same type).
+
+ * install.texi: Update totals to (hopefully) more accurate values.
+
+2001-11-19 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * line.c (read_line): Add prototype.
+
+2001-11-18 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Version 3.3.6.
+
+ * kpathsea.texi: Version 3.3.6.
+
+ * configure.in: Version 3.3.6.
+
+ * xgetcwd.c: Changes to keep C++ compilers from choking.
+
+ * xdirname.c: Changes to keep C++ compilers from choking.
+
+ * variable.c: Changes to keep C++ compilers from choking.
+
+ * str-list.c: Changes to keep C++ compilers from choking.
+
+ * readable.c: Add pathsearch.h to included headers, for
+ kpse_normalize_path.
+
+ * pathsearch.c: Changes to keep C++ compilers from choking.
+
+ * path-elt.c: Changes to keep C++ compilers from choking.
+
+ * make-suffix.c: Changes to keep C++ compilers from choking.
+
+ * line.c: Changes to keep C++ compilers from choking.
+
+ * kpsewhich.c: Changes to keep C++ compilers from choking.
+
+ * kdefault.c: Changes to keep C++ compilers from choking.
+
+ * fontmap.c: Changes to keep C++ compilers from choking.
+
+ * fn.h (fn_grow): Second argument is a const_string, not a generic
+ address.
+
+ * fn.c (fn_grow): Second argument is a const_string, not generic
+ address.
+
+ * expand.c: Add a few casts to ensure a C++ compiler wouldn't
+ choke.
+
+ * dir.c (dir_links): Replace a conditional expression with an
+ if-then version.
+
+ * db.c: Add a few casts, rename 'try', all to ensure a C++
+ compiler wouldn't choke.
+
+ * cnf.c: Add a few casts, rename 'try', all to ensure a C++
+ compiler wouldn't choke.
+
+ * c-proto.h: Addtional P*H and P*C macros for functions with up to
+ 17 arguments.
+
+2001-11-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * readlink.c (main): Add prototype.
+
+ * kpsewhich.c (main): Add prototype.
+
+ * kpsestat.c (main): Add protype.
+
+ * c-pathch.h [WIN32] (IS_UNC_NAME): An unc name can be //<digit>
+ as well as //<letter>.
+
+ * access.c (main): Prototype.
+
+2001-11-10 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Version 3.3.5.
+
+ * kpathsea.texi: Version, date.
+
+ * configure.in: Version 3.3.5.
+
+ * texmf.in: Additional entries for mex-pl, platex-pl, pdfplatex,
+ pdfmex-pl, pdfemex, pdfemex-pl. As usual, ConTeXt wants more
+ space.
+
+ * mktexnam: First set defaults, then modify for explicit
+ destination, not the reverse. From Thomas.
+
+ * mktex.opt: Preserve return code over trap. From Thomas.
+
+ * kpsewhich.man: Typo.
+
+2001-10-30 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * configure.in: To 3.3.4.
+
+ * kpathsea.version: To 3.3.4.
+
+ * mktexnam.opt: Robustness fix for handling of NAME. Minor
+ changes in the handling of the defaults when a name isn't found in
+ the supplier or typeface maps.
+
+ * tex-file.c: Add ".ch" as alternate suffix for kpse_web_format
+ and kpse_cweb_format.
+
+ * readable.c [main]: Call kpse_normalize_path.
+
+ * progname.c [WIN32]: Update from Fabrice.
+
+ * pathsearch.h [WIN32]: Remove prototype for safe_beg_of_path.
+ Add prototype for kpse_normalize_path.
+
+ * pathsearch.c (path_search) [WIN32]: Remove call to
+ safe_beg_of_path.
+ (path_search): Add call to kpse_normalize_path.
+
+ * expand.c (kpse_path_expand): Don't strip devices and such here,
+ as we're doing that in kpse_element_dirs anyway.
+
+ * elt-dirs.c [WIN32]: Remove safe_beg_of_path.
+ (kpse_normalize_path): Replaces safe_beg_of_path, but is defined on
+ all architectures.
+
+ * dir.c [WIN32]: Remove safe_beg_of_path prototype here.
+
+ * common.ac: Test whether libm exists. If it does, we
+ unconditionally link with it, which is probably wrong.
+
+ * cnf.c [__NetBSD__]: Define unix.
+
+ * c-pathch.h [IS_UNC_NAME]: Define on all architectures.
+
+ * Makefile.in (distdir): Add *.ftp to destination directory.
+
+2001-09-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add support for Web and Cweb files (kpse_web_format,
+ kpse_cweb_format). Requested by Wlodek Bzyl.
+
+ * tex-file.h, tex-file.c: Add support for Web and Cweb files
+ (kpse_web_format, kpse_cweb_format). Requested by Wlodek Bzyl.
+
+2001-07-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * common.ac [kb_cv_func_putenv_malloc]: Add declaration for
+ malloc, which testing on IA64 revealed to be missing.
+
+2000-08-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Changed the fix for NeXT.
+
+2000-08-05 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.texi: Bump version, date.
+
+ * kpathsea.version: Bump version.
+
+ * configure.in: Update for 3.3.3.
+
+ * NEWS: Update for 3.3.3.
+
+ * mktexlsr: On NeXT, 'rm -rf ' will recursively remove the current
+ directory. This is bad if you're in / and are root.
+
+2000-05-25 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * lib.h [MONOCASE_FILENAMES]: Parenthesis was omitted in
+ FILESTRNCASEEQ. Found by Fabrice.
+
+2000-04-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * unixtex.texi: Added notes that web2c is bare-bones, and that the
+ texk/texklib packages may contain older components.
+
+2000-04-21 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * progname.c: Add P?C macros to functions that lacked them.
+
+ * lib.h [STREQ,STRNEQ,FILESTRCASEEQ,FILESTRNCASEEQ]: If any
+ argument is NULL, compare unequal.
+
+2000-04-13 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-hush.c (kpse_tex_hush): Check for "all" and "none" first,
+ then look for more specific switches. This fixes the most common
+ case of problems due to non-reentrancy of kpse_path_element.
+
+ * kpathsea.texi: Correct example of brace expansion. Document
+ TEX_HUSH = none. Found by Tijs Michels <M.H.M.Michels@kub.nl>.
+
+ * texmf.in: Document the use of TEX_HUSH = none.
+
+2000-04-03 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add variable for src_specials. Increase arrays for
+ context (again).
+
+ * xopendir.c [WIN32]: Only define xclosedir.
+
+ * kpsewhich.man: Spelling correction.
+
+ * getopt.h [WIN32]: For definition of __STDC__ to 1.
+
+2000-04-02 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * xopendir.c [WIN32]: Define neither xopendir nor xclosedir. From
+ Han The Thanh <thanh@informatics.muni.cz>.
+
+ * xputenv.c (xputenv): The WIN32 conditional code is also valid
+ for DJGPP. From Fabrice.
+
+ * xmalloc.c (xmalloc): Allocate 1 byte if passed size 0.
+
+ * xdirname.c (xdirname): Changes for Win32 from Fabrice.
+
+ * tex-file.h: Prototype for kpse_set_suffixes. From Fabrice.
+
+ * tex-file.c (kpse_set_suffixes): New function, added by Fabrice.
+
+ * readable.c: Win32-related changes from Fabrice.
+
+ * progname.c [WIN32]: Various changes from Fabrice.
+
+ * pathsearch.h [WIN32]: Declare safe_beg_of_path. From Fabrice.
+
+ * pathsearch.c (path_search [WIN32]): Use safe_beg_of_path. From
+ Fabrice.
+
+ * kpsestat.c: Remove WIN32 define. From Fabrice.
+
+ * hash.c [MONOCASE_FILENAMES]: Change for the WIN32 case from
+ Fabrice.
+
+ * getopt.h [WIN32]: Changes from Fabrice.
+
+ * getopt.c [WIN32 && ! __CYGWIN32__]: Ensure getpid is not defined
+ before defining it. From Fabrice.
+
+ * lib.h: Update dir_links prototype, from Fabrice.
+
+ * elt-dirs.c: Win32 related changes from Fabrice.
+
+ * dir.c: Various Win32-related changes from Fabrice.
+
+ * config.h: Various changes for the DOS famility of systems. From
+ Fabrice.
+
+ * c-stat.h [WIN32]: Use oldnames.h instead of kpathsea/win32lib.h.
+ From Fabrice.
+
+ * c-proto.h [WIN32]: _DLL -> KPSE_DLL, from Fabrice Popineau.
+
+ * c-memstr.h: Move closer to just the ANSI string functions, if
+ necessary defined in terms of the BSD functions. After Thomas
+ Esser <te@informatik.uni-hannover.de>.
+
+ [FOPEN_RBIN_MODE, FOPEN_WBIN_MODE, FOPEN_ABIN_MODE]: Specify
+ binary I/O mode on all systems, not just those where it makes a
+ difference.
+ [VMCMS]: Remove as it isn't used.
+ [SET_BINARY]: Change defines which select it. From Fabrice
+ Popineau. <popineau@esemetz.ese-metz.fr>
+
+ * c-ctype.h [WIN32]: On Windows, get isascii from oldnames.h.
+ After Fabrice Popineau <popineau@esemetz.ese-metz.fr>.
+
+ * access.c: Replace WIN32 code with generic code.
+
+2000-01-31 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Fix possible symlink exploit. By Thomas Esser
+ <te@informatik.uni-hannover.de>.
+
+1999-06-28 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktextfm: Get rid of error message if hbf2gf cannot be found.
+ From Thomas.
+
+ * tex-glyph.c: Test whether glyph_file is NULL before
+ dereferencing it. Suggested by Julian Gilbey
+ <J.D.Gilbey@qmw.ac.uk>.
+
+ * texmf.in: Improved comments about VARTEXMF, along lines
+ suggested by Thomas Esser.
+ Increased font_mem_size, as requested by Thomas.
+
+ * pathsearch.c (path_search): Print a message if we're debugging
+ the search and we're not pounding the disk because an ls-R file
+ exists but must_exist=0. This to highlight the most confusing
+ case where disk searches do not happen.
+
+ * mktextfm.man: Cleanup of synopsis.
+
+ * mktex.opt: More robust handling of TEMPDIR, after Luc Van Eycken
+ <Luc.VanEycken@esat.kuleuven.ac.be>.
+
+ * kpsestat.man: Remove comment about unclear message.
+
+ * kpsestat.c (main): Print a more understandable message when the
+ stat call fails.
+
+1999-06-20 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * pathsearch.c (log_search): If TEXMFLOG is defined, then the
+ kpathsea library would write a space to stderr for every file
+ logged. Fix from Charles Karney <karney@pppl.gov>.
+
+1999-05-29 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * configure.in: Update version number to 3.3.1.
+
+ * kpathsea.version: Update version number to 3.3.1.
+
+ * kpathsea.texi: Update version info.
+
+ * mktexnam, mktexmf: Fix the LH patterns to be more specific.
+ From Thomas.
+
+ * unixtex.texi: Remove node on tape distributions.
+
+ * texmf.in: Add platex, add comment about TEXMFDBS.
+
+ * tex-file.c (kpse_find_file): Fix off-by-one in tests for suffix
+ length.
+
+ * pathsearch.c (log_search): Fix problem with debugging output.
+
+ * mktextfm: Order of options to hbf2gf turns out to matter.
+
+ * mktexpk: Updates from Thomas: don't remove generated fonts
+ because of bad pos errors; better handling of type1 fonts.
+
+ * mktexnam: Updates from Thomas for Czech fonts. Consult fontmaps
+ if a fonts fell into unknown/unknown.
+
+ * mktexmf: Updates from Thomas for Czech fonts.
+
+ * mktexdir: Small fix from Julian Gilbey.
+
+ * cnf.c: Apple's MacOsX is also unix-like.
+
+ * access.c: Parametrise the help string as in readlink.c.
+
+ * Makefile.in: Use INSTALL_DATA, not INSTALL_SCRIPT, for the *.opt
+ files.
+
+ * AUTHORS: Update accounts for MakeTeX scripts and expand.c.
+
+ * c-memstr.h: Don't declare strstr if strstr is already a define.
+ Suggested by Paul Vojta <vojta@math.berkeley.edu>.
+
+ * readlink.c: Corrected a bug in the help string (wrong program
+ name), reported by several people.
+
+1999-03-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpathsea.version: Set MINOR to 3.
+
+ * configure.in: Bumped KPSEVERSION to 3.3.
+
+1999-03-23 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: More changes from Thomas, add MISCFONTS for
+ kpse_miscfonts_format.
+
+ * tex-file.c: Implement kpse_miscfonts_format.
+
+ * tex-file.h: New format: kpse_miscfonts_format, to be used for
+ small sets of fonts for which no real type has been defined.
+
+ * mktextfm: Add support for hbf fonts. (From Werner Lemberg.)
+
+ * withenable.ac: Remove implementation of some --with-* options.
+
+ * common.ac: Move implementation of some --with-* options here
+ from withenable.ac, so the latter can be included elsewhere with
+ kpathsea's acconfig.h or derivatives being seen.
+
+1999-03-17 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Size increases for context, requested by Hans Hagen.
+
+ * texmf.in: Update from Thomas.
+
+ * Makefile.in: TEXMF_CNF -> VARTEXMF
+
+ * mktexmf: Small fix to a case statement from Berthold H\"ollmann
+ <bhoel@starship.python.net>.
+
+1999-03-15 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * win32lib.h: Patch from Fabrice.
+
+ * variable.c (kpse_var_value, expand): Handle the VAR_progname
+ construct. After Julian Gilbey <jdg@maths.qmw.ac.uk>.
+
+ * tex-file.c: Fixes to the code that forces an update of the
+ paths. After Julian Gilbey <jdg@maths.qmw.ac.uk>.
+
+ * mktexmf: Changes to support CB font family. From Kimon
+ Kontovasilis <kimon@cyclades.nrcps.ariadne-t.gr>.
+
+ * kpathsea.texi: Update address info of TUG.
+
+ * config.h: Remove outdated comment, explicitly include
+ kpathsea/c-auto.h.
+
+ * cnf.c (do_line): Correct comment, remove unused code.
+ (read_all_cnf): Strip trailing whitespace.
+ (kpse_cnf_get): Fix memory leak.
+ After Julian Gilbey <jdg@maths.qmw.ac.uk>.
+
+ * acconfig.h: We no longer use this for all kpathsea using
+ programs, just kpathsea itself. Thus the WEB2CVERSION macro goes,
+ as does other stuff that belongs to web2c or xdvik.
+
+ * Makefile.in: Allow the c-auto.h file to be installed.
+
+1999-02-18 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktex.opt: Document nomfdrivers option.
+
+ * mktextfm: Implement nomfdrivers option.
+
+ * mktexpk: Implement nomfdrivers option.
+
+ * install.texi: Document new option: nomfdrivers.
+
+ * kpsewhich.man: Document how search parts are determined.
+
+ * mktexlsr: Really skip empty components. From Thomas.
+
+ * tex-file.c (kpse_reset_program_name): Don't free the old paths,
+ they may not have been allocated on the heap.
+
+1999-02-16 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c (kpse_reset_program_name): Ensure that when the
+ program name changes, the various paths will indeed be updated.
+
+1999-02-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexupd: Fix test whether argument is a directory name. From
+ Thomas.
+
+ * mktexlsr: Skip empty components.
+
+ * mktexnam.opt: This file is supposed to be sourced, not executed,
+ so remove the #!. From Thomas.
+
+ * mktexdir.opt: This file is supposed to be sourced, not executed,
+ so remove the #!. From Thomas.
+
+ * mktex.opt: This file is supposed to be sourced, not executed, so
+ remove the #!. From Thomas.
+
+ * config.h: Make sure c-auto.h is included before win32lib.h,
+ which needs definitions from the former.
+
+1999-02-06 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * win32lib.h: Add pragma warning, for the S_* defines, only define
+ them if they are not defined already.
+
+ * pathsearch.h (kpse_all_path_search): Add KPSEDLL, from Fabrice.
+
+ * debug.h (fclose): Add KPSEDLL, from Fabrice.
+
+ * config.h [WIN32]: Remove pragma warning. From Fabrice.
+
+1999-02-04 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * withenable.ac: Rename AR_OPTS to ARFLAGS.
+
+ * texmf.in: Cleanup of semicolon/comma. Remove the double slash
+ between 'fonts' and its subdirs. Sites using pseudo-TDS will have
+ to add these by hand from now on.
+
+ * tex-file.c (init_path, add_suffixes): Remove __cdecl, from
+ Fabrice.
+
+ * mktexmf: Special cases for 30 and 36 points, as requested by the
+ sauter mainainer Jeroen Nijhof <J.H.B.Nijhof@aston.ac.uk>.
+
+ * kpsewhich.c (main): Remove __cdecl, from Fabrice.
+
+ * kpsestat.c (main): Remove __cdecl, from Fabrice.
+
+ * install.texi: The +u flag is no longer recommended for HP-UX.
+
+ * getopt.h [!WIN32]: Remove define of __cdecl, from Fabrice.
+
+ * elt-dirs.c (safe_beg_of_path): Change return type to unsigned
+ int, because other functions expect this.
+
+ * concatn.c (concatn): Remove __cdecl, from Fabrice.
+
+ * common.ac: sinclude from ../texk now, from Thomas.
+
+ * c-proto.h [!WIN32]: Removed define of __cdecl, from Fabrice.
+
+ * access.c (main): Removed __cdecl, from Fabrice.
+
+1999-01-27 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * xputenv.c (xputenv) [WIN32]: Don't free old value, ever.
+
+ * win32lib.h: Fixes by Fabrice.
+
+ * win32lib.c: Fixes by Fabrice.
+
+ * version.c (kpathsea_version_string, kpse_bug_address): Add
+ KPSEDLL, by Fabrice.
+
+ * variable.h (kpse_var_value, kpse_var_expand): Add KPSEDLL, by
+ Fabrice.
+
+ * texmf.in: Change path separators back to commas, use semicolon
+ instead of colon, correct TEXINPUTS for the pdfeTeX family,
+ TEXPSHEADERS for the pdfTeX family. By Thomas Esser.
+
+ * tex-make.h (kpse_make_tex_discard_errors): Add KPSEDLL, by
+ Fabrice.
+
+ * tex-make.c (maketex): Add cast to shup up a compiler. From
+ Fabrice.
+
+ * tex-hush.h (kpse_tex_hush): Add KPSEDLL, by Fabrice.
+
+ * tex-glyph.h (kpse_find_glyph, kpse_bitmap_tolerance): Add
+ KPSEDLL, by Fabrice.
+
+ * tex-glyph.c (try_resolution): Add casts to quiet a compiler.
+ From Fabrice.
+
+ * tex-file.h (kpse_fallback_resolutions_string, kpse_format_info,
+ kpse_set_program_enabled, kpse_maketex_option, kpse_init_format,
+ kpse_find_file, kpse_open_file, kpse_reset_program_name): Add
+ KPSEDLL, by Fabrice.
+
+ * tex-file.c (init_path, add_suffixes): Add __cdecl, by Fabrice.
+ (kpse_init_format): Correct definition of "other ... files" to take
+ different path separators into account. After Fabrice.
+
+ * str-list.c (str_list_concat_elements): Make loop indices
+ unsigned to quiet compilers. By Fabrice.
+
+ * readable.h (kpse_readable_file): Add KPSEDLL, by Fabrice.
+
+ * readable.c [WIN32] (kpse_readable_file): Many changes by
+ Fabrice.
+
+ * progname.h (program_invocation_name,
+ program_invocation_short_name, kpse_program_name,
+ kpse_set_program_name, kpse_set_progname): Add KPSEDLL, by
+ Fabrice.
+
+ * progname.c: Remove my_dirname function, which returns in its own
+ file renamed to xdirname. From Fabrice.
+ (kpse_set_program_name) [WIN32]: Close handle. By Fabrice.
+
+ * proginit.h (kpse_init_prog): Add KPSEDLL, by Fabrice.
+
+ * pathsearch.h (kpse_path_element, kpse_element_dirs,
+ kpse_path_search): Add KPSEDLL, by Fabrice.
+
+ * pathsearch.c (path_search): We now strip devices in the caller.
+ From Fabrice.
+
+ * magstep.h (kpse_magstep_fix): Add KPSEDLL, by Fabrice.
+
+ * magstep.c (magstep, kpse_magstep_fix): Casts to quiet an unruly
+ compiler. Added by Fabrice.
+
+ * line.h (read_line): Add KPSEDLL, by Fabrice.
+
+ * lib.h (concat, concat3, xstrdup, uppercasify, atou, same_file_p,
+ xbasename, find_suffix, remove_suffix, make_suffix, make_prefix,
+ extend_filename, xputenv, xputenv_int, xgetcwd,dir_p, dir_links,
+ xfopen, xfclose, xfseek, xftell, xmalloc, xrealloc, xcalloc): Add
+ KPSEDLL, by Fabrice.
+ (xdirname): New function, by Fabrice.
+
+ * kpsewhich.c (read_command_line): Add KPSEDLL to external
+ functions, by Fabrice.
+ (main): Add __cdecl, by Fabrice.
+
+ * kpsestat.c (main): Add __cdecl, by Fabrice.
+
+ * hash.h (hash_table_type, hash_insert, hash_remove, hash_lookup):
+ Add KPSEDLL, by Fabrice.
+
+ * hash.c [WIN32]: Different implementation of TRANSFORM, for speed
+ reasons. From Fabrice.
+
+ * getopt.h: Changes for KPSEDLL, by Fabrice.
+
+ * fn.h (fn_init, fn_copy0, fn_free, fn_1grow, fn_grow,
+ fn_str_grow, fn_shrink_to): Add KPSEDLL, by Fabrice.
+
+ * expand.h (kpse_expand, kpse_brace_expand, kpse_path_expand): Add
+ KPSEDLL, by Fabrice.
+
+ * elt-dirs.c (safe_beg_of_path): New function by Fabrice. Used to
+ strip device from a path before feeding it to expand_elt.
+ (kpse_element_dirs): Call safe_beg_of_path.
+
+ * debug.h (kpathsea_debug, fopen): Add KPSEDLL, by Fabrice.
+
+ * db.h (kpse_db_insert): Add KPSEDLL, by Fabrice.
+
+ * config.h [WIN32]: Add pragma to quiet some warnings. From
+ Fabrice.
+
+ * concatn.h (concatn): Add KPSEDLL. From Fabrice.
+
+ * concatn.c (concatn): Add __cdecl. From Fabrice.
+
+ * cnf.h (kpse_cnf_get): Add KPSEDLL. From Fabrice.
+
+ * c-std.h: Don't include math.h if we're seen be a C++ compiler.
+ From Fabrice.
+
+ * c-proto.h [WIN32]: Instead of defining DllImport, define
+ KPSEDLL. This change makes building shared libraries on windows
+ systems work better. From Fabrice.
+
+ * c-pathch.h [WIN32]: IS_UNC_NAME macro added by Fabrice.
+
+ * access.c (main): Add __cdecl, from Fabrice.
+
+ * absolute.h (kpse_absolute_p): Add KPSEDLL, from Fabrice.
+
+ * Makefile.in: Account for the addition of xdirname.c.
+
+1999-01-24 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add support for pdfeTeX.
+
+ * mktexpk: Correct typo: ps_topk -> ps_to_pk.
+
+ * mktexnam: New version from Thomas.
+
+ * mktexmf: Update for cs* fonts from Thomas.
+
+ * kpathsea.texi: Update section on brace expansion. Decided to
+ keep the comma.
+
+ * db.c (kpse_db_insert): Replace basename with xbasename.
+
+1999-01-19 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsestat.c (main): Replace use of S_IFMT with an octal literal.
+
+1999-01-14 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Remove open_any, add openout_any, openin_any.
+
+ * str-list.h: Add prototype for str_list_concat_elements.
+
+1999-01-10 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktextfm: Implement --foo=bar style options. From Thomas.
+
+ * mktexpk: Implement --foo=bar options, by Thomas. Changes for
+ new version of gsftopk. Changes to handle ttf2pk. From Thomas.
+
+ * xt.ac: Remove AC_PATH_XTRA here.
+
+ * withenable.ac: Changes to aid cross-compiling. Minor fixes.
+
+ * unixtex.texi: Correct tug email address. Minor corrections.
+
+ * texmf.in: Minor changes, additions for context. From Thomas.
+
+ * tex-file.h: Use size in declaration of kpse_format_info. From
+ Fabrice.
+
+ * tex-file.c (kpse_maketex_option): Initialise fmt on entry. Test
+ whether a fmt had been specified.
+ (kpse_init_format): Put $TEXMF into the 'other files' formats, from
+ Thomas.
+
+ * str-list.c (str_list_concat_elements): New function, part of
+ replacement for bash-derived code.
+
+ * progname.c (my_subdir): New implementation from Fabrice.
+
+ * mktexnam: Account for new release of lh fonts. Don't do subdirs
+ if we're using $KPSE_DOT as the destination directory.
+
+ * mktexupd: Handle empty elements gracefully.
+
+ * mktexmf: Account for new release of lh fonts.
+
+ * mktexlsr: Minor fixes from Thomas.
+
+ * mktexdir: Allow for creating more directories, fixes from
+ Thomas.
+
+ * mktex.opt: Add defaults for DPI and MAG.
+
+ * kpsewhich.man: Various minor corrections.
+
+ * kpsewhich.c: Begin implementing -all option. (incomplete)
+
+ * kpathsea.texi: Correct copyright, tug email address.
+
+ * install.texi: Account for new texklib.tar.gz file. Several
+ minor corrections.
+
+ * expand.c: Remove bash-derived code.
+
+ * elt-dirs.c (do_subdir): Correct code to test whether we descend
+ into subdirectories.
+
+ * db.c: Add kpathsea/c-stat.h to includes.
+ (db_build): Correct test of '0' to 0.
+
+ * common.ac: Check for more functions in AC_CHECK_FUNCS, from
+ Thomas.
+
+ * cnf.c: do_line: Remove premature optimization.
+
+ * c-proto.h: Add P8H, P8C, P9H, P9C.
+
+ * c-memstr.h: Revision by Thomas Esser.
+
+ * c-ctype.h: Add ISBLANK macro.
+
+ * acconfig.h: Add define guard for c-auto.h.
+
+ * Makefile.in: Change ../make/*.make to ../make/*.mk.
+ Correct texmf.sed.
+ Prevent substitution of $(texmf) in texmf.cnf in some
+ cases.
+ Replace semicolons with colons in paths.h.
+
+1998-09-15 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Trap more signals, make script hold up better under
+ 'sh -e', from Werner Fink <werner@suse.de>.
+
+ * mktex.opt: Trap more signals, suggested by several people,
+ particularly Thomas Gellekum.
+
+1998-08-03 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * progname.c (selfdir): Interpret empty PATH element as "."
+
+1998-07-26 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-glyph.c (kpse_find_glyph): Memory management problem: we
+ were deallocating a string prematurely.
+ (try_fontmap): Test !ret before, not after, bumping the loop variable.
+ Both reported by Werner Lemberg <a7971428@unet.univie.ac.at>.
+
+Sun Jun 21 14:43:44 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: Test for the presence of the magic string in ls-R, to
+ prevent accidentally overwriting ls-R files that are not ours.
+ Change the code to ensure ./ in front of directory names in the
+ presence of different output from different versions of ls.
+
+Mon May 4 19:42:44 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (objects): Add xbasename.lo.
+
+ * Rename basename.c to xbasename.c.
+
+ * tilde.c (kpse_tilde_epxand): Handle a bare ~ gracefully.
+
+ * basename.c: Rename basename to xbasename and make its
+ compilation unconditional.
+
+ * common.ac: Remove check for basename.
+
+ * acconfig.h: Remove HAVE_BASENAME.
+
+ * lib.h: Remove conditional declaration of basename, add
+ unconditional declaration of xbasename.
+
+ * progname.c (kpse_set_program_name): Replace call of basename
+ with xbasename.
+
+Fri Apr 24 21:15:15 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * install.texi: Doc fix; mention the library files for etex,
+ pdftex, omega.
+
+ * pathsearch.c (kpse_path_search): Fix memory leak found by "John
+ W. Eaton" <jwe@bevo.che.wisc.edu>.
+
+Tue Apr 7 19:46:07 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * kpsewhich.c (find_format): Correct an off-by-one error by using
+ the found value instead of a faulty comparison.
+
+Mon Mar 16 19:25:15 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * configure.in (KPSEVERSION): version 3.2.
+
+ * mktex.opt: Set MT_MKTEXNAM_OPT, MT_MKTEXDIR_OPT here.
+
+ * mktexnam: Move setting of MT_MKTEXNAM_OPT to mktex.opt.
+
+Sun Mar 15 19:55:30 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * c-proto.h: Add P7H and P7C macros.
+
+Sat Mar 14 00:10:20 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * win32lib.h: Patch from Fabrice.
+
+ * c-dir.h [WIN32]: Patch from Fabrice.
+
+Fri Mar 13 23:23:33 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Added XDVIINPUTS and TEX4HTINPUTS.
+
+Thu Mar 12 08:04:50 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * win32lib.c: New version from Fabrice Popineau.
+
+Wed Mar 11 19:55:10 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * install.texi: Correction for description of dosnames behaviour
+ on MS-DOS. From Eli Zaretskii.
+
+Mon Mar 9 07:22:23 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexlsr: exit 0 if we succeeded.
+
+ * withenable.ac: Remove double slashes from texmfmain variable.
+ Strictly speaking, it is a user fault when this occurs, but...
+ From Thomas Esser.
+
+Sun Mar 8 18:23:33 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-file.c: omkocp, omkofm -> mkocp, mkofm.
+
+ * texmf.in: OMKOFM, OMKOCP -> MKOFM, MKOCP.
+
+ * withenable.ac: omkofm, omkocp -> mkofm, mkocp.
+
+Thu Mar 5 15:32:48 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * texmf.in: Add OMKOCP and OMKOFM analogous to MKTEXPK.
+
+ * c-fopen.h [DOS]: Don't open files read-write if read suffices.
+
+Wed Mar 4 23:55:35 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * withenable.ac: Add options for enabling/disabling
+ omkocp/omkofm. From John Plaice.
+
+ * tex-file.c (init_format): Support omkocp and omkofm instead of
+ MakeOmegaOCP and MakeOmegaOFM programs. From John Plaice.
+ (kpse_maketex_option): Some changes to handle ofm/ocp as well.
+
+Tue Mar 3 09:02:09 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * tex-make.c (kpse_make_tex): Make same exception for AMIGA as for
+ WIN32 and MSDOS. From Andreas Scherer.
+
+ * PROJECTS: Update mail address.
+
+ * mktex.opt: Print message if VARTEXMF is not defined, then
+ default to '$KPSE_DOT'.
+
+ * mktexnam: Remove use of "shell !" from tests involving varfonts
+ feature. Simplify the code a bit.
+
+Fri Feb 27 19:55:11 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * withenable.ac: Replace use of -a in test with && and second
+ test. From Thomas Esser <te@informatik.uni-hannover.de>.
+
+Tue Feb 24 13:16:56 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in: Corrections for building/installing outside source
+ dir. From Vladimir Volovich <vvv@vvv.vsu.ru>.
+
+ * mktexnam.opt: Correction MT_PKNAME -> MT_PKBASE to get dosnames
+ feature to work. From Eli Zaretskii.
+
+Mon Feb 23 10:17:22 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktex.opt, mktexlsr: Use test ... || test ... instead of test
+ ... -o ... .
+
+ * mktexnam.opt: Remove use of MT_PKPART, MT_MFPART, and MT_TFMPART
+ variables, since they're no longer defined.
+
+ * expand.c (kpse_expand_kpse_dot [MSDOS]): A very ugly hack to
+ deal with a very broken feature on some MSDOS systems. After Eli
+ Zaretskii.
+
+Fri Feb 20 17:18:19 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * Makefile.in (texmf.sed): Remove VARTEXMF.
+
+ * install.texi: Update for changes to varfonts.
+
+ * kpathsea.texi: Remove references to format numbers.
+
+ * kpsewhich.c (read_command_line): Remove printing of and support
+ for format numbers.
+
+ * mktex.opt: Remove VARTEXMF and related stuff, set dosnames for
+ DOS.
+
+ * mktexnam: Remove use of VARTEXMF, introduce SYSTEXMF, change
+ semantics of varfonts.
+
+ * mktexnam.opt: Remove reference to VARTEXMF, move setting of
+ dosnames for DOS to mktex.opt.
+
+ * mktexpk: Boilerplate tests.
+
+ * mktexupd: Boilerplate tests.
+
+ * progname.c: Move kpse_reset_program_name to tex-file.c. This
+ move means progname.o doesn't use a common object from tex-file.o
+ anymore. The NeXT linker would omit tex-file.o, then complain
+ about an undefined symbol. Thanks to Gregor Hoffleit
+ <flight@thefly.mathi.uni-heidelberg.de> and Melissa O'Neill
+ <oneill@cs.sfu.ca> for their help solving this.
+
+ * progname.h: Move kpse_reset_progname to tex-file.h.
+
+ * tex-file.c: Move kpse_reset_program_name here from progname.c.
+
+ * tex-file.h: Move kpse_reset_program_name here from progname.h.
+
+ * texmf.in: Remove VARTEXMF, add SYSTEXMF.
+
+ * withenable.ac: Boilerplating, a correction of the default case
+ of the --enable-multiplatform test.
+
+Mon Feb 16 09:46:47 1998 Olaf Weber <olaf@infovore.xs4all.nl>
+
+ * mktexpk: Dropped a $ in the wrong place, which made chmod look
+ for a non-existent file.
+
+ * Makefile.in (texmf.sed): Include the substitution for @web2c@ in
+ TEXMFCNF.
+
+ * Makefile.in (texmf.sed): Remove traling / from VARTEXMF
+ substitution.
+ (stamp-paths): Replace @ with % as sed delimiter. The @ causes
+ problems because it used in afs filenames. Spotted by Matthias
+ Clasen.
+
+ * bugs.texi: Since the NeXT(step) problem is likely to be solved
+ now, make description of bug less definite.
+
+ * common.ac: Remove check for readlink.
+
+ * kpathsea.texi: Document changes to search algorithm.
+
+ * mktexlsr: Use % not @ as sed delimiter.
+
+ * mktexmf: Correct permissions problem.
+
+ * mktexnam: Use % not @ as sed delimiter.
+
+ * mktexpk: Use % not @ as sed delimiter. Correct permissions
+ problem. Set permissions before the file is moved into place.
+
+ * mktextfm: Use % not @ as sed delimiter. Correct permissions
+ problem. Set permissions before the file is moved into place.
+
+ * mktexupd: Use % not @ as delimiter for sed.
+
+ * readlink.c (main): Use S_ISLNK instead of HAVE_READLINK to test
+ whether readlink is a known function.
+
+ * tex-file.c (kpse_init_format): Make changes corresponding to the
+ movement of kpse_tfm_format.
+ (kpse_find_file): Reorganize searches; fold code of search #3 into
+ #1 and #2; fold #5 into #2. We now have two searches, plus an
+ attempt to create missing files.
+
+ * tex-file.h: Move kpse_tfm_format before kpse_ofm_format. Might
+ as well put it near the front then, because it is an often-used
+ format.
+
+ * texmf.in: VARTEXFONTS uses @vartexfonts@ so it can be filled in
+ from the Makefile. OFMFONTS changed to explicitly use TFMFONTS.
+ TEXMCNF uses @web2c@ rather than @web2cdir@.
+
+ * withenable.ac: Do not force default for --enable-multiplatform,
+ so that we can inherit one from a script that calls us.
+
+Tue Feb 10 17:59:26 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * withenable.ac: Don't abort configure run if the main texmf tree
+ isn't found.
+
+ * acconfig.h: Add EPSFWIN to the undefs.
+
+ * install.texi: Update section on the handling of options by
+ mktexpk.
+
+ * mktex.opt: Comment on the duplication of the ls_R_magic string.
+
+ * mktexlsr: Copy code from mktex.opt to mktexlsr, so the latter
+ can run without the need to find the former.
+
+ * mktextfm, mktexpk: Replace positional options with normal option
+ handling.
+
+ * mktextfm.man, mktexpk.man: Update documentation for the new
+ option handling.
+
+ * tex-file.c: Update the MKTEXPK_ARGS string for the new
+ option-handling of mktexpk.
+
+ * tex-make.c (kpse_make_tex): We pass the raw / to mktexpk in the
+ --mfmode switch when appropriate; remove unset_mode variable.
+ Update comments to reflect new situation.
+
+ * kpathsea.texi: Note that empty path components are now ignored
+ in stead of expanded to cwd.
+
+ * line.c: Add prototype and clean up headers.
+
+ * mktex.opt, mktexlsr, mktexmf, mktexnam, mktexpk, mktextfm,
+ mktexdir, mktexupd: Make "caching" of some variables and file
+ names in the environment possible. Provide defaults in case the
+ 'web2c files' format doesn't work for finding files. Suggested by
+ Thomas Esser.
+
+ * withenable.ac: Give a better message when the main texmf tree
+ isn't found.
+
+Sat Feb 7 01:00:49 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * elt-dirs.c (kpse_element_dirs): Return NULL, not the cwd, if
+ we're given an empty string.
+
+ * mktex.opt: Determine VARTEXFONTS here.
+
+ * mktexnam: Move determination of VARTEXFONTS to mktex.opt.
+
+Fri Feb 6 17:59:59 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * config.h: Update definition of KPATHSEA to 32.
+
+ * expand.c (kpse_path_expand): Do not recursively expand a leading
+ //, as in pathsearch.c.
+
+ * kpsewhich.man: Update for --epxand-braces option.
+
+ * texmf.in: Put texmf.local before texmf in the TEXMFCNF path.
+
+ * withenable.ac: Make code for finding texmfmain more robust.
+
+Wed Feb 4 20:39:10 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * readable.c: Correct typo: '#elsif' -> '#elif'.
+
+Tue Feb 3 17:08:34 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * kpathsea.texi: Update for changes to kpsewhich.
+
+Mon Feb 2 21:12:06 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * xputenv.c: Undid last patch from Fabrice -- it was a "fix" that
+ suppresses warnings on his compiler, and engenders them on mine.
+
+Sun Feb 1 16:08:49 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * lib.h [!DOSISH]: Correct definition of FILESTRNCASEEQ.
+
+ * mktexmf: Correct call to mktexnam.
+
+ * kpsewhich.c: New option --expand-braces.
+ (expand_path): Removed.
+ (main): Add code for --expand-braces, account for new definition of
+ kpse_path_expand.
+
+ * expand.h: Rename kpse_path_expand to kpse_brace_expand. Add new
+ kpse_path_expand.
+
+ * expand.c (kpse_path_expand): New implementation, based on
+ path_expand from kpsesewhich.c.
+ (kpse_brace_expand): The old kpse_path_expand. Change calls to
+ kpse_brace_expand to kpse_brace_expand_element.
+ (kpse_brace_expand_element): The old kpse_brace_expand, but with
+ static linkage. Changes calls to kpse_brace_expand to
+ kpse_brace_expand_element.
+
+ * tex-file.c (init_path): Replace kpse_path_expand with
+ kpse_brace_expand.
+
+ * texmf.in: Correct input variables for mltex variants. Add pdftex
+ to TEXPSHEADERS path.
+
+Thu Jan 29 16:15:44 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * Makefile.in: Update for readlink.
+
+ * common.ac: Test for readlink function.
+
+ * access.c, kpsestat.c: No need to explicitly include c-auto.h.
+
+ * mktex.opt: Adapt to new way of finding the script. Do the
+ actual lookup for mktexnam, mktexdir, and mktexupd here. Make a
+ bit more robust.
+
+ * mktexlsr: Make file handling more robust, use kpsewhich to find
+ supporting scripts like mktex.opt and mktexnam, use readlink to
+ trace symlinks.
+
+ * mktexupd, mktexpk, mktextfm, mktexmf, mktexdir, mktexnam: Make
+ file handling more robust, use kpsewhich to find supporting
+ scripts like mktex.opt and mktexnam, simplify somewhat.
+
+ * mktexnam.opt: Make handling of names more robust.
+
+ * readlink.c, readlink.man: New files.
+
+ * withenable.ac: Add --enable-multiplatform option. Attempt to
+ find the texmf directory, and complain if we fail to do so.
+
+ * Makefile.in (texmf.sed): Remove sed for dbtex, dbfonts, change
+ VARTEXFONTS to comply with texmf.in, and update comment.
+
+ * c-vararg.h: Comment update from Peter Breitenlohner.
+
+Wed Jan 28 20:36:56 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * Makefile.in: Keep c-auto.h out of kpathsea.h.
+
+ * c-stat.h [WIN32]: Modification from Fabrice.
+
+ * dir.c [WIN32]: Extensive modifications from Fabrice.
+
+ * kpsestat.c, kpsewhich.c: Replace exit with return from main.
+ From Fabrice.
+
+ * readable.c [WIN32]: Separate definition of READABLE. From
+ Fabrice Popineau.
+
+ * texmf.in: Remove almost all @var@ stuff, and just assume TDS for
+ all.
+
+ * win32lib.h: Modifications from Fabrice.
+
+ * xputenv.c (xputenv): Minor fix from Fabrice.
+
+ * win32lib.c: New file from Fabrice Popineau. Replacement
+ functions for Win32.
+
+Sun Jan 25 20:02:21 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Increase buf_size to 50000 (from 10000).
+
+ * tex-file.c (kpse_find_file): In the first search, postpone
+ pounding the disk until all possible suffixes have been tried.
+
+ * line.c (read_line): Accept any of NL, CR, and CRLF as
+ end-of-line.
+
+Fri Jan 23 14:45:19 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * access.c: Use return instead of exit to get rid of some compiler
+ warnings. From Fabrice.
+
+ * c-fopen.h: Changes for CYGWIN32.
+
+ * c-proto.h: Patch from Fabrice Popineau for Win32.
+
+ * kpathsea.texi: Document kpse_web2c_format,
+ kpse_program_text_format, kpse_program_binary_format.
+
+ * mktex.opt, mktexdir, mktexlsr, mktexmf, mktexnam, mktexpk,
+ mktextfm, mktexupd: Use -expand-path instead of -expand-var where
+ possible. This makes the handling of !! more robust.
+
+ * tex-file.c (kpse_find_file): Handle other cases than precisely
+ one extension in search number 3.
+ (kpse_init_format): Add kpse_web2c_format, kpse_program_text_format,
+ kpse_program_binary_format.
+
+ * tex-file.h: Add kpse_web2c_format, kpse_program_text_format,
+ kpse_program_binary_format.
+
+ * tex-hush.c: Test the "path element" h, not the whole hush.
+
+ * texmf.in: Add a definition for WEB2C. Add some Omega-related
+ parameters, from John Plaice.
+
+Tue Jan 13 19:46:58 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * mktexpk, mktextfm: Only move $NAME.log file if it exists and is
+ not empty.
+
+Mon Jan 12 06:22:59 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * kpathsea.texi: Fixes from Gerd Neugebauer <gerd@uni-koblenz.de>.
+
+Sun Jan 11 18:26:56 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * mktexupd: Two changes: absence of the current tree in the ls-R
+ path is not an error; create an ls-R file if the current tree is
+ in the ls-R path and the file doesn't yet exist.
+
+Sat Jan 10 09:55:47 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * tex-hush.c: A null pointer could be fed to strcmp.
+
+Fri Jan 9 21:08:45 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * mktexnam: Add $COMSPEC test, and use $SEP for path separator when
+ splitting paths. From Eli Zaretskii.
+
+ * mktexlsr: Correct usage for determining absolute paths. From
+ Eli Zaretskii.
+
+ * common.ac: Correct code in HAVE_PROTOTYPES test.
+
+Sun Jan 4 15:59:08 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * Manual pages for access, kpsestat, kpsewhich, mktexlsr, mktexpk,
+ mktexmf, mktextfm.
+
+ * Makefile.in: Changes for manual pages.
+
+Thu Jan 1 10:11:49 1998 Olaf Weber <infovore@xs4all.nl>
+
+ * mktex.opt: Remove definition of $SEP; it is now needed before
+ this script is sourced.
+
+ * mktexlsr: If necessary, add location of script to PATH.
+
+ * mktexupd: Put $SEP definition in script itself.
+
+ * xputenv.c (xputenv): Move some declarations into the "not
+ SMART_PUTENV" block to prevent "unused" warnings.
+
+Tue Dec 30 17:55:45 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * install.texi, bugs.texi: Add comment about the need to use
+ special compiler options in HP-UX.
+
+ * mktexpk: Use nonstopmode for mf, in case of failure move log
+ file to working directory.
+
+ * mktextfm: Use nonstopmode for mf, in case of failure move log
+ files to working directory.
+
+ * mktexlsr: Add comment about use in cron scripts, use SEP
+ variable for path separator.
+
+ * mktexupd: Check for both new and old magic string in ls-R files,
+ use SEP variable for path separator.
+
+ * mktex.opt: Pick the correct path separator for MS-DOS and UNIX.
+ Add a more appropriate magic string for ls-R files, but keep the
+ old one around for compatibility.
+
+ * Makefile.in (install-exec): Add check for original mktexlsr.
+
+Thu Dec 18 20:33:56 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * tex-file.c (init_path): Rewrite test whether we're initializing
+ the kpse_cnf_format paths.
+
+ * tex-file.c (kpse_init_format): Initialise the binmode fields.
+ (kpse_open_file): Use binmode field.
+
+ * tex-file.h: Add binmode field to kpse_format_info_type.
+
+ * kpsewhich.c: Correct option string.
+
+ * tex-file.c (kpse_open_file): Assume kpse_truetype_format and
+ kpse_type42_format are for binary files.
+
+Tue Dec 16 19:13:14 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Don't make PKFONTS.xdvi a special case. Let all
+ programs look in modeless. If a program shouldn't look there,
+ give it a special PKFONTS line.
+
+Mon Dec 15 18:58:01 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Add TTFONTS and T42FONTS.
+
+ * Makefile.in (stamp-paths): The regular expression for variables
+ had to be amended for T42FONTS.
+
+ * tex-file.c (kpse_init_format): Add kpse_truetype_format and
+ kpse_type42_format.
+
+ * tex-file.h: Add kpse_truetype_format and kpse_type42_format to
+ kpse_file_format_type.
+
+Sat Dec 13 11:24:23 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * xputenv.c (xputenv [WIN32]): This system deletes an environment
+ variable if it is set to "", with consequences for the code that
+ reclaims the space. From Fabrice Popineau.
+
+Fri Dec 12 10:44:02 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * acconfig.h: Add HAVE_PROTOTYPES.
+
+ * c-proto.h, c-vararg.h: Test for HAVE_PROTOTYPES.
+
+ * common.ac: Add explicit test for prototypes, instead of relying
+ on __STDC__.
+
+ * hash.c, hash.h (hash_remove): New function.
+
+ * install.texi: Rewritten passage on font destinations, corrected
+ reference to Triptrap node in web2c.
+
+ * mktexpk, mktextfm: When mv fails, try cp. Matters on MS-DOS.
+
+ * progname.c (selfdir): Test whether we are a directory, rather
+ than whether we are not a link or file.
+
+ * texmf.in: Change openout_any to paranoid.
+
+Tue Dec 9 19:08:04 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * mktexpk: Restored test-and-move, which turns out not to be a
+ no-op for fonts generated with gsftopk.
+
+Thu Dec 4 12:53:52 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Add TEXINPUTS.mltex and TEXINPUTS.mllatex.
+
+Tue Dec 2 12:58:04 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * Makefile.in (distclean): Add stamp-paths. From Sebastian Rahtz
+ <s.rahtz@elsevier.co.uk>.
+
+ * progname.c (kpse_set_program_name [!HAVE_PROGRAM_INVOCATION_NAME
+ && !WIN32 && !__DJGPP__]): Remember to set
+ program_invocation_name.
+
+ * getopt.c: A few changes for WIN32. From Fabrice Popineau.
+
+Mon Dec 1 19:08:07 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * kpathsea.texi: Updated for absence of alternate TeX suffixes.
+
+ * kpsewhich.c: Don't complain about unkown suffixes: it's all
+ kpse_tex_format to us.
+
+ * tex-file.c: Remove the interminable list of alternate TeX
+ suffixes.
+
+ * Makefile.in ($(library).h): Take win32lib.h into account: it
+ should not be included by this file, as config.h will do so if
+ needed.
+
+ * progname.c (kpse_set_program_name [WIN32, __DJGPP__]): Changes
+ from Fabrice Popineau.
+
+ * win32lib.h: New file. From Fabrice Popineau.
+
+ * config.h: Include <kpathsea/win32lib.h> instead of
+ "../win32/win32-compat.h". From Fabrice Popineau.
+
+ * access.c: Include <kpathsea/config.h>. From Fabrice Popineau.
+
+ * absolute.c (kpse_absolute_p [WIN32]): Filenames starting with \\
+ are absolute on this platform. From Fabrice Popineau.
+
+ * tex-glyph.c (try_format): Oops, kpse_format_info[format].suffix
+ is now a list of strings.
+
+Sun Nov 30 13:23:54 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in, mktex.opt, mktexdir, mktexdir.opt, mktexlsr, mktexmf,
+ mktexnam, mktexnam.opt, mktexpk, mktextfm, mktexupd: Add a
+ MKTEXSCRIPT variable, which is the directory where supporting
+ scripts are found. Defaults to $TEXMFMAIN/web2c if not defined.
+
+ * Makefile.in, bugs.texi, db.h, install.texi, kpathsea.texi,
+ kpsewhich.c, proginit.c, tex-file.c, tex-file.h, tex-glyph.c,
+ tex-make.c, tex-make.h, texmf.in, withenable.ac, mktex.opt,
+ mktexdir, mktexdir.opt, mktexlsr, mktexmf, mktexnam, mktexnam.opt,
+ mktexpk, mktextfm, mktexupd: Changes for the great renaming...
+
+Sat Nov 29 13:10:42 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * The great renaming of the MakeTeX* scripts.
+ MakeTeXPK -> mktexpk
+ MakeTeXTFM -> mktextfm
+ MakeTeXMF -> mktexmf
+ MakeTeXls-R -> mktexlsr
+
+ MakeTeX.site -> mktex.cnf
+ MakeTeXcommon -> mktex.opt
+ MakeTeXmkdir -> mktexdir
+ MakeTeXmkdir.opt -> mktexdir.opt
+ MakeTeXnames -> mktexnam
+ MakeTeXnames.opt -> mktexnam.opt
+ MakeTeXupdate -> mktexupd
+
+ * Makefile.in (install-exec): Adapted for removal MakeTeX.cnf.
+
+ * MakeTeX.cnf: Removed.
+
+ * MakeTeXcommon: Fold MakeTeX.cnf into MakeTeXcommon.
+
+ * tex-file.c (kpse_init_format): Add kpse_fmt_format add ".efmt"
+ and ".efm" to additional suffixes.
+
+ * db.c [DB_HASH_SIZE]: From 7603 increased to 15991.
+
+ * tex-file.c: Yet more suffixes for kpse_tex_format.
+
+Tue Nov 25 18:19:17 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * progname.c (kpse_set_program_name): Ensure that
+ kpse_program_name doesn't get an .exe suffix. The
+ program_invocation*name variables retain it.
+
+Mon Nov 24 22:03:12 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXls-R: When creating the ls-R file from scratch, derive
+ its permissions from the $db_dir, not from the current dir.
+
+Sun Nov 23 13:17:16 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Update to use : instead of , in braces.
+
+ * kpathsea.texi: Document use of path separator in brace
+ expansion, note that the comma is deprecated.
+
+ * path-elt.c (element): Dont split within braces.
+
+ * expand.c (expand_amble): Break text in pieces at ENV_SEP as well
+ as commas.
+
+Sat Nov 22 19:35:30 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * tex-file.c: Correction of description "PostScript header/font"
+ to "PostScript header".
+
+ * db.c (kpse_db_insert): Add cast for const correctness.
+
+ * kpathsea.texi: Document kpse_set_program_name; updates.
+
+ * kpsewhich.c: Many changes to support multiple standard suffixes.
+
+ * progname.c (kpse_set_program_name): Add a few casts for const
+ correctness.
+
+ * tex-file.c: Many changes to support lists of standard suffixes.
+
+ * tex-file.h: kpse_format_info_type: change type of suffix from
+ const_string to const_string*.
+
+Fri Nov 21 15:17:35 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * c-proto.h: Restored AA macro, needed by revised web2c.
+
+Thu Nov 20 14:23:33 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXPK: Removed a test-and-move that is always a no-op.
+
+ * MakeTeXnames: A shell on FreeBSD didn't like the ${foo:=`bar`}
+ construct.
+
+Wed Nov 19 17:24:08 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXls-R, MakeTeXMF, MakeTeXPK: Make temporary names fit into
+ the 8.3 pattern. After Eli Zaretskii.
+
+ * MakeTeXTFM: Make temporary names fit into the 8.3 pattern.
+ Allow a second optional argument. Update usage message. After
+ Eli Zaretskii.
+
+ * MakeTeXcommon: Make temporary names fit into the 8.3 pattern.
+ Do a 'cd /' before we cd to $KPSE_DOT, for MS-DOS' sake. After
+ Eli Zaretskii.
+
+ * MakeTeXnames: If $DEST starts with "letter-colon-slash", it
+ still indicates an absolute path. After Eli Zaretskii.
+
+ * MakeTeXnames.opt: Enable dosnames if we find COMSPEC set in the
+ environment. This is apparently the canonical test for this kind
+ of thing. After Eli Zaretskii.
+
+ * Makefile.in: Numerous small changes to make building on MS-DOS
+ easier. In particular to the rule for texmf.sed.
+
+ * install.texi: Add table headers. After Eli Zaretskii.
+
+ * tex-file.c (kpse_open_file): Open kpse_tex_ps_header_format and
+ kpse_pict_format files in binary mode. After Eli Zaretskii.
+
+Tue Nov 18 11:50:35 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * install.texi, README, Makefile.in: Changed the name of CONFIGURE
+ to README.CONFIGURE.
+
+ * Makefile.in (mostlyclean): delete klibtool.version.
+
+Sat Nov 15 21:13:46 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXPK: Use quotes to ensure that test "$mf_bdpi" != $BDPI
+ has a first argument. This occurs only in pathological
+ circumstances, but is nevertheless annoying.
+
+ * texmf.in: Add TEXINPUTS.foo for omega and lambda.
+
+Fri Nov 14 16:35:46 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Add TEXINPUTS.foo definitions for e-TeX and PDFTeX.
+
+ * tex-file.h: Add kpse_find_ofm and kpse_find_ovf macros.
+
+ * tex-file.c (kpse_find_file): Add a search for Omega.
+
+Thu Nov 13 22:43:06 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * progname.c (expand_symlinks): Don't call fclose on a NULL
+ pointer. After Gary Jennejohn <garyj@peedub.muc.de>.
+
+Wed Nov 12 16:20:02 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * kpsewhich.c: Use kpse_set_program_name instead of
+ kpse_set_progname.
+
+ * tex-file.c, cnf.c: Use kpse_program_name instead of
+ program_invocation_short_name.
+
+ * progname.h (kpse_set_program_name, kpse_reset_program_name): New
+ functions.
+ (kpse_program_name): New global.
+
+ * progname.c (kpse_set_program_name): New function, to replace
+ kpse_set_progname. This fixes the problem that we may want to
+ pretend to be a different program, but need the name by which we
+ were called because that is the one for an executable and is
+ guaranteed to exist. The pretend-name is stored in
+ kpse_program_name.
+ (kpse_reset_program_name): To reset kpse_program_name to a
+ different value. It makes a half-hearted attempt to clear the
+ search path information, so that the new name is used there as
+ well.
+
+Mon Nov 10 13:14:01 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * configure.in (KPSEVERSION): version 3.1.
+
+Thu Nov 6 20:25:49 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.in: Corrected comment on size of max_print_line: it must
+ at least be 60.
+
+Tue Nov 4 19:08:37 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * Makefile.in (install-data): Handle a split kpathsea.info.
+
+ * common.ac: Add a test to ensure that autoconf 2.12.1 -- the one
+ with our own hacks -- is used.
+
+Wed Oct 29 11:49:46 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * c-fopen.h [!DOSISH]: Guard against redefining O_BINARY. From
+ Andreas Scherer <andreas.scherer@pobox.com>.
+
+Mon Oct 27 17:25:19 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * install.texi: Update for new MakeTeX* scripts.
+
+ * MakeTeXnames: Handling of empty namepart.
+
+Fri Oct 24 14:23:58 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * getopt.[hc]: Changes for WIN32, which are likely to be a pain if
+ these files are ever updated wholesale. After Fabrice Popineau.
+
+Thu Oct 23 11:16:26 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXnames: Corrected bug in assignemnt to stdfontpath.
+
+Wed Oct 22 17:36:57 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXmkdir: Added a bit of boilerplate to the use of
+ MT_APPEND_MASK.
+
+ * Makefile.in: It's acconfig.h, not c-auto.h, that we do not want
+ to install.
+
+ * lib.h: Remove kpathsea/config.h from the includes. Note that
+ lib.h is itself included by config.h.
+
+ * Makefile.in: Change generation of kpathsea.h to put config.h
+ first.
+
+Tue Oct 21 23:15:28 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeX.site, MakeTeX.cnf: Remove MT_FILE_PERMS, MT_DIR_PERMS.
+
+ * MakeTeXmkdir: Use kpsestat to obtain suitable directory
+ permissions.
+
+ * MakeTeXnames, MakeTeXnames.opt: Include code that infers
+ destination directories from where the sources are found. Make
+ use of fontmaps an option, move that part of the code to
+ MakeTeXnames.opt.
+
+ * MakeTeXls-R: Use kpsestat to obtain suitable file permissions;
+ this means we no longer use unset. Use access rather than test to
+ determine whether we can write the ls-R database.
+
+ * MakeTeXTFM, MakeTeXMF, MakeTeXPK: Use kpsestat to obtain
+ suitable file permissions.
+
+ * Makefile.in: Minor changes, because of the new files and
+ renaming.
+
+ * MakeTeXnames.opt, MakeTeXmkdir.opt: renamed from
+ MakeTeXnames.cnf and MakeTeXmkdir.cnf respectively. Now
+ MakeTeX.cnf contains the standard configuration, and MakeTeX.site
+ the local adjustments.
+
+ * kpsestat.c, access.c: New files.
+
+Mon Oct 20 07:22:33 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * common.ac, Makefile.in, acconfig.in, config.h, install.texi,
+ kpathsea.texi: Rename texmf.cnf.in to texmf.in / c-auto.h.in to
+
+ * Renamed texmf.cnf.in to texmf.in.
+
+ * bugs.texi: Add descriptions of GSFTOPK_DEBUG, MAKETEX_DEBUG, and
+ MAKETEX_FINE_DEBUG. From Fabrice Popineau.
+
+ * c-fopen.h [WIN32]: Use setmode in stead of _setmode. From
+ Fabrice Popineau.
+
+ * c-pathch.h, absolute.c [NAME_BEGINS_WITH_DEVICE]: Corrected
+ definition. From Fabrice Popineau.
+
+ * c-proto.h: Cosmetic change in definition DllImport. From
+ Fabrice Popineau.
+
+ * debug.h [WIN32 && _DEBUG]: Extra debugging code for WIN32. From
+ Fabrice Popineau.
+
+ * install.texi: Extend description of the dosnames feature. After
+ Fabrice Popineau.
+
+ * lib.h: Add kpathsea/config.h to the includes. New macro STRNEQ.
+ From Fabrice Popineau.
+
+ * progname.c (kpse_set_progname [WIN32]): New environment variable
+ KPSE_DEBUG_OUTPUT. If defined, it names a file to which stderr
+ will be redirected. From Fabrice Popineau.
+
+ * tex-make.c: Various cosmetic changes for WIN32/MS-DOS. From
+ Fabrice Popineau.
+
+Fri Oct 17 10:41:08 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * db.c (kpse_db_insert): Remove dubious cast of result of basename.
+
+ * progname.c (kpse_set_progname [!HAVE_PROGRAM_INVOCATION_NAME]):
+ Removed dubious cast of basename.
+
+ * tex-file.c (kpse_find_file): Reorganize searches, so that
+ foo.bar.tex is found before foo.bar.
+
+ * tex-make.c (maketex) [MSDOS]: Redirect stderr to the null device
+ without using the shell (which requires users to install a port of
+ a Unixy shell, since stock DOS shells don't allow redirecting
+ stderr).
+ (kpse_make_tex) [MSDOS]: Don't use the shell to redirect stderr.
+ From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * readable.c (READABLE) [__DJGPP__]: Use `access' instead of
+ `stat', since `stat' is expensive on MS-DOS. Eli Zaretskii
+ <eliz@is.elta.co.il>.
+
+ * pathsearch.c (search) [__DJGPP__]: Make `stat' work in the
+ fastest possible way, since it can be very expensive on MS-DOS.
+ (main): Use ENV_SEP_STRING instead of explicit ":".
+ From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * path-elt.c (main): Use ENV_SEP_STRING instead of explicit ":".
+ From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * kpsewhich.c (path_expand): Handle file names with device
+ letters.
+ (read_command_line): Use ENV_SEP_STRING instead of explicit ":".
+ After Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * kdefault.c (main): Use ENV_SEP_STRING instead of explicit ":"
+ (which is only true on Unix). From Eli Zaretskii
+ <eliz@is.elta.co.il>.
+
+ * cnf.c (do_line) [__DJGPP__]: Don't convert semi-colons to
+ colons, even though DJGPP defines `unix'. From Eli Zaretskii
+ <eliz@is.elta.co.il>.
+
+ * absolute.c (kpse_absolute_p) [DOSISH]: Don't assume the drive
+ letter is alphanumeric. From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * xgetcwd.c (xgetcwd) [DOSISH]: Prepend drive letter before path.
+ From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * progname.c (kpse_set_progname) [__DJGPP__]: Compute the long
+ file name of the program given its 8+3 alias.
+ (kpse_set_progname) Compute SELFAUTOLOC before removing the
+ ".exe" suffix, if any, because `selfdir' might look along the PATH
+ for the file.
+ After Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * config.h (DOSISH): Move the definition to the top, so we could
+ define MONOCASE_FILENAMES right there.
+ [__DJGPP__]: Include DJGPP-specific headers.
+ [DOSISH]: Let DJGPP use ST_NLINK_TRICK, since it supports it.
+ From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * lib.h (FILESTRNCASEEQ): New macro, for partial compares of
+ filenames. From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * c-fopen.h (FOPEN_RBIN_MODE, FOPEN_WBIN_MODE): Let MS-DOS use
+ these also.
+ (FOPEN_ABIN_MODE): New macro, defines how to open a binary file for
+ appending.
+ (SET_BINARY): New macro, switches an already open file to binary
+ mode (required for stdin/stdout on MS-DOS/MS-Windows).
+ From Eli Zaretskii <eliz@is.elta.co.il>.
+
+ * c-pathch.h (NAME_BEGINS_WITH_DEVICE): Don't assume the drive
+ letter is A-Z only (DOS allows 6 characters beyond Z). After Eli
+ Zaretskii <eliz@is.elta.co.il>.
+
+Thu Oct 16 10:22:42 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * configure.in: Update stamp-auto after creating c-auto.h. From
+ Peter Breitenlohner.
+
+ * Makefile.in: Don't rewrite paths.h if it was not changed. After
+ Peter Breitenlohner.
+
+Wed Oct 15 15:33:43 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * xputenv.c (xputenv): Don't do anything if the old and new values
+ of the environment variables are identical, because some libraries
+ (DJGPP) will will optimize away such no-ops, and therefore freeing
+ the old value will lead to disaster. Free new_item if it was
+ copied by the library `putenv'. From Eli Zaretskii
+ <eliz@is.elta.co.il>
+
+ * tex-file.c (kpse_open_file): Open
+ kpse_{pk,base,fmt,mem,type1}_format files in binary mode.
+
+ * install.texi: Remove description of the feature that (say)
+ MAKETEXPK in the environment can be used to provide a
+ specification of the argument list of MakeTeXPK. Reason: the
+ feature isn't implemented.
+
+Tue Oct 14 17:08:22 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * xgetcwd.c: Rename DO_NOT_USE_GETCWD to GETCWD_FORKS.
+ * common.ac: Add a test for GETCWD_FORKS.
+ * acconfig.h: Include GETCWD_FORKS.
+
+Mon Oct 13 19:42:58 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * path-elt.c (element): Always return a new string rather than a
+ part of the path, as the returned string may be modified.
+
+ * tex-file.c (remove_dbonly): Replaced hard-coded ':' with
+ ENV_SEP. From Fabrice Popineau.
+
+ * common.ac, configure.in: Move definition of KPSEVERSION from
+ common.ac to configure.in.
+
+ * common.ac: Check for presence of getcwd.
+
+ * xgetcwd.c: Use getcwd in preference to getwd, unless
+ DO_NOT_USE_GETCWD is defined.
+
+ * MakeTeX.cnf: Made varfonts the default.
+
+ * elt-dirs.c, path-elt.c, tilde.c, variable.c: Print (nil) instead
+ of (null), so we can distinguish *printf being fed a null pointer.
+
+ * tex-file.c: remove_dbonly: Corrected off-by-one error in
+ allocation.
+
+Sat Oct 11 13:48:33 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * elt-dirs.c (main) [TEST, AMIGA]: Changed test code for Amiga.
+ From Andreas Scherer <Scherer@physik.rwth-aachen.de>.
+
+Mon Oct 6 16:36:50 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * install.texi: Document --enable-maintainer-mode switch.
+
+Sat Oct 4 19:27:22 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * MakeTeXnames.cnf: Add "strip" feature for backwards
+ compatibility with 7.0.
+ * Use a new set of MakeTeX* scripts, from Thomas Esser.
+
+Fri Oct 3 09:54:47 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * kpsewhich.c (path_expand): Don't scribble in the datastructures
+ of the system to get rid of trailing slash, use "%.*s" format of
+ printf instead.
+
+ * Makefile.in (texmf.sed, paths.h): Take the changes to texmf.cnf.in
+ into account.
+ * texmf.cnf.in: Redo variable definitions for the sake of clarity.
+
+ * hash.c (hash_create): Make ret static to work around a gcc
+ optimizer bug on the Alpha.
+
+ * elt-dirs.c (do_subdir,expand_elt): Cleanup by Greg Hudson
+ <ghudson@MIT.EDU>, which might fix the '//' in path problem on the
+ Amiga as well.
+
+ * xrealloc.c: Get prototype for realloc from config.h, give
+ prototype for xmalloc, prototype xrealloc itself. After Fabrice
+ Popineau.
+
+ * xmalloc.c: Give xmalloc a prototype, get prototype for malloc
+ from config.h. After Fabrice Popineau.
+
+ * tex-file.c [TEX_SUFFIXES]: Brought into sync with tex.ch.
+
+ * install.texi: Extend comments on shared library support.
+
+Thu Oct 2 00:14:57 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.cnf.in [buf_size]: Increased from 3000 to 10000.
+
+ * tex-file.h (enum kpse_src_type): removed trailing comma. From
+ Ezra Peisach <epeisach@auriga.rose.brandeis.edu>.
+
+ * c-proto.h [AA]: Obsolete due to changes to web2c.y; removed.
+
+ * bugs.texi: Document KPSE_DEBUG_VARS.
+ * debug.h [KPSE_DEBUG_VARS]: New #define for debugging. From
+ Nicolai Langfeldt <janl@math.uio.no>.
+ * variable.c (kpse_var_value): Add code to report how variables
+ were expanded. From Nicolai Langfeldt <janl@math.uio.no>.
+
+ * progname.c (selfdir) [!AMIGA]: Directories were mistaken for
+ executables. From Matthias Clasen
+ <mclasen@sun2.mathematik.uni-freiburg.de>
+
+ * tex-file.c (remove_dbonly): New function that strips the !! from
+ path specifications. Called when creating the path for
+ kpse_db_format. From Thomas Esser <te@informatik.uni-hannover.de>
+
+ * install.texi: The default installation directory is not always
+ /usr/local, as configure will pick the location of an existing tex
+ installation.
+
+Wed Oct 1 13:43:18 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * texmf.cnf.in: Various definitions have changed to take advantage
+ of the new brace expansion code. The various intermediate
+ variables (fontdir, web2cdir, ...) have been removed because you
+ could burn yourself severely by accidentally setting these
+ undocumented variables -- this happened with some versions of make
+ during compilation.
+
+Tue Sep 30 16:14:48 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * kpathsea.texi: Document changes in brace expansion.
+ * expand.c (array_concat): reversed the order concatenation, which
+ result in more usable brace expansion.
+ (kpse_expand_kpse_dot): new function.
+ (kpse_path_expand): call kpse_expand_kpse_dot to expand relative
+ components using KPSE_DOT, if the latter is defined.
+
+ * common.ac: Define the version string.
+ * version.c: Replaced version string with a define.
+ * acconfig.h: Added defines for version strings.
+ * Makefile.in: Let version = @KPSEVERSION@.
+ * common.ac: Introduce KPSEVERSION for version.
+
+ * tex-file.c (kpse_maketex_option): choose proper mf and tfm
+ formats rather than tex.
+
+Mon Sep 29 22:47:23 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * db.c (match): Repaired several off-by-one bugs.
+
+Wed Sep 17 21:09:56 1997 Olaf Weber <infovore@xs4all.nl>
+
+ * withenable.ac: Added the --enable-maintainer-mode option.
+
+Tue Aug 5 17:26:16 1997 Karl Berry <karl@cs.umb.edu>
+
+ * config.h (KPATHSEA): Define for the sake of kpathsea code
+ getting merged back into original distributions.
+
+Sun Aug 3 17:14:47 1997 Karl Berry <karl@cs.umb.edu>
+
+ * install.texi: simple.tex doesn't exist in LaTeX 2e; it's sample2e.
+ From: "Jonathan I. Kamens" <jik@cam.ov.com> and others.
+
+ * db.c (kpse_db_search): Preprocessor # commands must start in
+ column 1 for DEC OSF/1 2.0 cc.
+ From: Andrew Komornicki <komornic@maxwell.mps.nsf.gov>.
+
+ * common.ac (program_inv_name): Correct usage of AC_TRY_LINK.
+ From: "John W. Eaton" <jwe@bevo.che.wisc.edu>.
+
+ * Makefile.in (.SUFFIXES): Put before the .c.lo rule for the sake
+ of FreeBSD 2.1.7 make.
+ From: Hiroto Kagotani <kagotani@in.it.okayama-u.ac.jp>.
+
+Thu Apr 17 17:35:37 1997 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (paths.h): Replace $web2cdir too,
+ for the sake of DEFAULT_TEXMFCNF.
+ From: M G Berberich <berberic@forwiss.uni-passau.de>.
+
+Tue Apr 1 17:48:18 1997 Karl Berry <karl@cs.umb.edu>
+
+ * fontmap.c: Doc fix.
+ * kpsewhich.c (find_format): Try the long name if the file format
+ has no suffix, e.g., `dvips config'.
+ From: "Tomasz J. Cholewo" <tjchol01@mecca.spd.louisville.edu>
+
+Sun Mar 23 16:44:21 1997 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Don't assert that `name' is empty,
+ only NULL, so \input\relax doesn't crash.
+ From: "Tomasz J. Cholewo" <T.Cholewo@ieee.org>.
+
+Fri Mar 21 16:09:47 1997 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK, MakeTeXcommon: Support a redirect option to MTPK,
+ from Thomas via Paul V.
+
+ * progname.c (selfdir) [AMIGA]: Fix from Andreas.
+
+Sun Feb 16 15:49:07 1997 Karl Berry <karl@cs.umb.edu>
+
+ * withenable.ac: `enableval' should have been `withval',
+ and value must be quoted.
+
+ * MakeTeXTFM: Exit if mf fails, a la MakeTeXPK.
+ From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>.
+
+Thu Feb 13 16:08:30 1997 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (latex2*_inputs): Put $dbtex/generic before the
+ ``other'' latex version.
+ From: Olaf Weber <Olaf.Weber@cwi.nl>.
+
+ * progname.c (selfdir): Protect against argv0 being dir/exename,
+ not found in PATH. Happens under Solaris.
+ From: Ross Alexander <r.alexander@auckland.ac.nz> (and many others).
+
+Sun Feb 09 15:27:15 1997 Fabrice POPINEAU <popineau@ese-metz.fr>
+
+ * progname.c (kpse_set_progname): Added braces around Win32 code,
+ because of variables declaration.
+
+Fri Feb 7 11:53:09 1997 Karl Berry <karl@cs.umb.edu>
+
+ * Version 3.0.
+
+ * MakeTeXMF: Syntax problems with dc*. Fix from Thomas.
+
+ * MakeTeX*: sed command to strip off all but the first of multiple
+ trees in $TEXMF was faulty.
+
+ * c-pathch.h (ENV_SEP, ENV_SEP_STRING) [AMIGA]: Change to ;
+ for Andreas. Then Amiga binaries may be able to share
+ the same texmf.cnf with Unix and NT.
+
+ * texmf.cnf.in (main_memory): Decrease back to 263,000.
+ It's not worth allocating 7MB on everyone's machine just
+ to do xy-pic samples. Add a comment about it.
+
+Thu Feb 6 10:27:50 1997 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (kpse_db_search): If an alias exists on disk, and the
+ original entry in ls-R doesn't, use the alias. Idea, sample code
+ from Fabrice.
+
+ * cnf.c (do_line): Add awful kludge to translate ; to :
+ when reading texmf.cnf values under Unix. The idea is
+ to be able to write a single texmf.cnf that will work
+ under both NT and Unix.
+
+ * db.c: Doc fixes.
+
+ * MakeTeXcommon: Set ps_to_pk.
+ * MakeTeXPK: Use ps_to_pk instead of hardwiring gsftopk.
+ * MakeTeX.site: Include ps_to_pk comment.
+
+ * texmf.cnf.in (TEXMFCNF): Include SELFAUTOLOC (at the front).
+ * progname.c (kpse_set_progname): Include SELFAUTOLOC for the real
+ directory. It may be useful. Suggested by Andreas.
+
+ * MakeTeXcommon: Add case for fc.
+ * MakeTeX.site: Add comment for fc.
+ * MakeTeXMF: Add case for fc, generated like Sauter.
+ From Francois and Thomas.
+
+ * progname.c [WIN32]: SELFAUTODIR fix from Fabrice.
+
+ * kpathsea.h: Do not #include <kpathsea.h> (infinite loop).
+ From Fabrice and Richard.
+
+Tue Feb 4 13:20:09 1997 Karl Berry <karl@cs.umb.edu>
+
+ * tilde.c: xstrdup the result from getenv,
+ since we end up freeing it with a path element of `~'.
+
+ * MakeTeX.site: Include RCS id.
+
+ * MakeTeX.site: Replace sample dc assignment with ec.
+
+ * MakeTeXMF: Handle ec, use exbase for tc.
+
+ * MakeTeXcommon (ecfontdir,tcfontdir): New variables.
+
+Tue Feb 04 15:11:29 1997 Fabrice POPINEAU <popineau@ese-metz.fr>
+
+ * progname.c: argv[0] under Win95 is set to the short
+ filename of the executable run. Changed the way
+ program_invocatio_name is retrieved : used the SearchPath() win32
+ call, next FindFirstFile() to get the long filename. The selfdir
+ stuff is not used any more for win32.
+
+Mon Feb 3 18:01:02 1997 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (read_command_line): Check for -1, not EOF,
+ per new getopt.
+
+Sun Feb 2 16:06:42 1997 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (PKFONTS.xdvi): Replace `gsftopk,ps2pk' by `modeless'.
+ * MakeTeXPK (mode): Use `modeless' instead of `gsftopk'.
+
+ * tex-file.c: Look for TEXINDEXSTYLE before INDEXSTYLE.
+
+Sat Feb 1 16:31:39 1997 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in: Doc fix.
+
+ * progname.c (my_dirname): Check for device separators at the
+ beginning fo the string. From Andreas.
+
+ * c-pathch.h (IS_DIR_SEP) [AMIGA]: New definition from Andreas.
+ (NAME_BEGINS_WITH_DEVICE): Remove.
+
+ * tex-make.c (maketex) [AMIGA]: Have to call system instead of popen
+ due to different interface. From Andreas.
+
+ * progname.c (selfdir): Check self, not ret, for exiting the loop.
+ (remove_dots): Missing indirection on ret.
+ From Fabrice.
+
+Tue Jan 21 08:26:17 1997 Karl Berry <karl@cs.umb.edu>
+
+ * elt-dirs.c: Doc fixes.
+
+ * db.c (match): Don't return false just because the path element
+ ended in /.
+ Bug from: Richard Walker <Richard.Walker@cs.anu.edu.au>.
+
+ * expand.c (kpse_path_expand): Do variable expansion before
+ splitting on path elements.
+ Bug from: Richard Walker <Richard.Walker@cs.anu.edu.au>.
+
+ * tilde.c [TEST]: Function name changed.
+ From: Richard Walker <Richard.Walker@cs.anu.edu.au>.
+
+ * texmf.cnf.in (MAILCAPLIBDIR): Rename from MAILCAPDIR.
+ From Ulrik.
+
+Tue Jan 21 09:34:20 1997 Fabrice POPINEAU <popineau@ese-metz.fr>
+
+ * c-pathch.h: NAME_BEGINS_WITH_DEVICE(string) new macro testing
+ for the presence of a device name in front of the string.
+
+ * progname.c (remove dots): stop before device name if
+ present. When building the filename, do not add leading DIR_SEP if
+ there is a device.
+
+ * pathsearch.c (path_search): avoid searching the whole disk
+ adapted for win32.
+
+ * db.c: support aliases file along with db files. An alias file is
+ named with ALIAS_NAME and the hashtable size is
+ ALIAS_HASH_SIZE. When a name looked for has an alias, the alias is
+ searched instead of the original name. The format of the aliases
+ file is "real_name alias_name", one pair per line. Currently only
+ for WIN32.
+
+Mon Jan 20 12:01:14 1997 Karl Berry <karl@cs.umb.edu>
+
+ * progname.c: Amiga patch from Andreas.
+
+Sun Jan 19 14:29:00 1997 Karl Berry <karl@cs.umb.edu>
+
+ * pathsearch.c (path_search): Strip off all but one of leading /'s.
+ We never want to search the whole disk.
+
+ * progname.c: Expand symlinks off the final filename, not the
+ directory name.
+
+Sat Jan 18 14:39:00 1997 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (param_size): Increase to 500 for the chemical
+ formula macro package. From Thomas.
+
+ * progname.c (expand_symlinks, ReadSymLink, CopyFirst, StripFirst,
+ StripLast): New functions to expand symbolic links for SELFAUTO*.
+ Noted by Thomas.
+
+ * texmf.cnf.in (PKFONTS.xdvi): Fix tpyo.
+ Document that memory changes
+ (trie_size): Increase to 64000.
+
+Fri Jan 17 13:08:08 1997 Karl Berry <karl@cs.umb.edu>
+
+ * progname.c (remove_dots): Don't free the constant null string.
+ From Andreas.
+
+ * texmf.cnf.in (dbfontdir): Change to dbfonts (the commented-out one).
+
+Thu Jan 16 10:13:19 1997 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (kpse_cnf_get): Avoid recursive init, due to new
+ $TETEXDIR and other variables in default TEXMFCNF value.
+
+ * getopt*, strtol.c: New versions from /gd/gnu/lib.
+
+ * c-std.h (ALLOC_RETURN_TYPE): Only define if we're going to use it.
+
+ * acconfig.h (EDITOR): Oops, %s not +%s.
+ From: tim@maths.tcd.ie.
+
+ * progname.c (kpse_set_progname): One more my_dirname call
+ to get the parent and the grandparent in the environment variables.
+
+ * texmf.cnf.in (texdir): Rename from tex, to avoid clash with
+ TEX used by makempx -- win32 doesn't distinguish case on envvars.
+ From Fabrice.
+ (WEB2CDIR): Lowercase, so it doesn't end up in paths.h, just
+ for cleanliness.
+
+ * progname.c (kpse_set_progname): Pass program_invocation_name
+ to selfdir instead of progname, just in case we
+ HAVE_PROGRAM_INVOCATION_NAME and it's something different.
+ From Fabrice.
+
+ * tex-file.c (kpse_open_file): ocp, ofm and ovf should use
+ FOPEN_RBIN_MODE. From Fabrice and John Plaice.
+
+ * progname.c [AMIGA]: Fix syntax errors, remove_dots not necessary.
+ From Andreas Scherer.
+
+ * MakeTeXupdate: MakeTeXls-R isn't in the conf dir anymore, just
+ in the regular path.
+ From Thomas.
+
+Sun Jan 12 17:22:35 1997 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (read_all_cnf): Do not test unallocated memory on empty
+ lines; crashed on Alphas.
+
+ * progname.c (dirname): Rename to my_dirname to avoid clash on Alphas.
+
+Sat Jan 11 16:28:54 1997 Karl Berry <karl@cs.umb.edu>
+
+ * c-std.h (calloc, malloc, realloc) [!STDC_HEADERS]: Only declare
+ in this case.
+
+Tue Jan 7 17:44:01 1997 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK: Doc fix.
+
+ * texmf.cnf.in (KPSE_DOT): Define.
+
+ * c-memstr.h: Doc fix.
+
+Wed Jan 1 16:58:02 1997 Karl Berry <karl@cs.umb.edu>
+
+ * pathsearch.h (kpse_filename_component): Declare this.
+ * path-elt.c: Define it.
+ * progname.c (remove_dots): New function to remove . and ..
+ filename components. Subsumes slashify, it turns out.
+
+ * Makefile.in (install-exec): Install MakeTeXls-R in $(scriptdir).
+
+Mon Dec 30 16:22:42 1996 Karl Berry <karl@cs.umb.edu>
+
+ * progname.c (kpse_set_progname): Strip off .exe if present.
+
+ * cnf.c: Doc fix.
+
+ * progname.c (slashify): New function, to translate \ into / for WIN32.
+ (selfdir): Call it.
+
+ * lib.h (FILE{STR,CHAR}CASEEQ) [MONOCASE_FILENAMES]: Define these,
+ continuing yesterday's changes.
+ From Fabrice.
+
+Sun Dec 29 13:26:09 1996 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (match, elt_in_db),
+ * elt-dirs.c (cached),
+ * hash.c (hash_lookup),
+ * kpsewhich.c (find_format, TRY_SUFFIX),
+ * tex-file.c,
+ * cnf.c (do_line): Compare filenames with FILESTRCASEEQ or
+ FILECHARCASEEQ to support monocase filesystems.
+ * hash.c (hash) [MONOCASE_FILENAMES]: Transform keys to uppercase.
+ From Fabrice.
+
+ * basename.c (basename): Consider device separators;
+ if given 'e:foo.tex', should return 'foo.tex'.
+ From: Fabrice POPINEAU <popineau@esemetz.ese-metz.fr>.
+
+ * types.h (boolean): Protect with #ifndef HAVE_BOOLEAN, for NeXT.
+ From: Raf Schietekat <flexus!rfschtkt@colds.ruca.ua.ac.be>
+
+Sat Dec 28 07:18:48 1996 Karl Berry <karl@cs.umb.edu>
+
+ * progname.c [AMIGA]: Add code for this case from Andreas S.
+
+Fri Dec 27 17:38:43 1996 Karl Berry <karl@cs.umb.edu>
+
+ * progname.c (S_IX{USR,GRP,OTH}): Define if not defined, for the NeXT.
+ From: Gregor Hoffleit <flight@mathi.uni-heidelberg.de>.
+
+ * texmf.cnf.in (TEXMFCNF): Rewrite using /.'s etc. From Thomas.
+
+Sun Dec 15 06:21:22 1996 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac (AC_CHECK_FUNCS): Add getwd.
+
+ * lib.h (xgetcwd): Declare.
+ * Makefile.in (objects): Add xgetcwd.lo.
+ * xgetcwd.c: New file from xdvik.
+
+ * texmf.cnf.in (TEXMFCNF): Add $SELFAUTODIR:$SELFAUTOPARENT.
+ * progname.c (selfdir, dirname, etc.): New functions.
+ (kpse_set_progname): Set SELFAUTODIR and SELFAUTOPARENT.
+
+Sat Dec 14 14:41:39 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_src_type): New types kpse_tex{doc,source}_format.
+ * tex-file.c (TEXDOC_ENVS, TEXSOURCE_ENVS): New envvars.
+ (kpse_init_format): Handle them.
+ * texmf.cnf.in (TEXDOCS, TEXSOURCES): New values.
+ * kpathsea.texi: Document them.
+
+Fri Dec 13 16:46:00 1996 Karl Berry <karl@cs.umb.edu>
+
+ * expand.h: Doc fix.
+
+Thu Dec 12 17:25:25 1996 Karl Berry <karl@cs.umb.edu>
+
+ * xputenv.c [WIN32]: Work around putenv ("FOO=") unsetting
+ FOO under NT. From Fabrice.
+
+Mon Dec 9 23:27:45 MET 1996 Thomas Esser <te@informatik.uni-hannover.de>
+
+ * kpsewhich.c: add option -show-path to display the search path for a
+ given file type.
+
+Mon Dec 9 17:23:32 1996 Karl Berry <karl@cs.umb.edu>
+
+ * readable.c (READABLE): Check !S_ISDIR instead of S_ISREG,
+ to allow fifo's.
+ Suggestion from: Krzysio Leszczynski <chris@camk.edu.pl>.
+
+ * tex-file.c (kpse_open_file): Open VF files in binary mode.
+ From Fabrice.
+
+ * types.h (boolean) [WIN32]: Remove this case, Fabrice
+ has found another solution.
+
+ * elt-dirs.c (expand_elt): Do not check for a device separator.
+ From Fabrice.
+
+ * texmf.cnf.in (OTPINPUTS, OCPINPUTS): These use a subdirectory omega/.
+ From John P.
+
+Sun Dec 8 17:15:43 1996 Karl Berry <karl@cs.umb.edu>
+
+ * c-proto.h (DllImport): Define here.
+ * config.h (DllImport): Instead of here.
+ * kpsewhich.c: Other DllImport changes.
+ * line.c [WIN32]: Include <malloc.h>.
+ * tex-file.c: Oops, had FOPEN_RBIN_MODE vs. R reversed.
+ * tex-make.c (kpse_make_tex_discard_errors): Add Dllimport.
+ * types.h (boolean): Bizarre WIN32 definition.
+ From: Fabrice POPINEAU <popineau@esemetz.ese-metz.fr>.
+
+Sat Dec 7 22:12:26 MET 1996 Thomas Esser <te@informatik.uni-hannover.de>
+
+ * MakeTeXnames: Ensure that cmr1234 will be mapped to
+ jknappen/sauter while cmr12 will still be mapped to public/cm.
+
+Fri Dec 6 15:08:35 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (OFMFONTS, etc.): New definitions for Omega.
+ * tex-file.h (kpse_file_format_type): Define kpse_ocp_format, etc.
+ * acconfig.h (MAKE_OMEGA_{OFM,OCP}_BY_DEFAULT): Include these.
+ * tex-file.c (kpse_init_format): New cases for the Omega types.
+ (OCP_ENVS, etc.): New environment variable lists.
+ From: John Plaice <plaice@iad.ift.ulaval.ca>.
+
+ * texmf.cnf.in: Use fonts//<format> consistently,
+ instead of fonts/<format>.
+
+ * lib.h (itoa): Remove, it seems we don't use this function any more.
+ * itoa.c: Remove.
+ * acconfig.h (HAVE_ITOA): Remove this.
+ * Makefile.in (objects): Remove.
+
+ * cnf.c (do_line): Oops, tested prog after freeing it,
+ should have tested prog2.
+ From: Fabrice POPINEAU <popineau@esemetz.ese-metz.fr>.
+
+Tue Dec 3 14:57:52 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (objects): Remove strtol.lo, that's generated by
+ configure.
+ From: Gregor Hoffleit <flight@mathi.uni-heidelberg.de>.
+
+Mon Dec 2 09:05:54 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXcommon: Set KPSE_DOT before the trap. From Thomas.
+
+Tue Dec 3 18:02:08 1996 Ulrik Vieth <vieth@thphy.uni-duesseldorf.de>
+
+ * texmf.cnf.in (TRFONTS): Set this to /usr/lib/font/devpost
+ indepent of $prefix.
+
+Mon Dec 9 00:28:58 1996 Ulrik Vieth <vieth@thphy.uni-duesseldorf.de>
+
+ * MakeTeXcommon: Use `basename $0` in usage and version messages
+ for consistency with other programs and scripts.
+ Also accept -help, -version in addition to --help, --version.
+
+ * MakeTeX{MF,PK,TFM,ls-R,mkdir,names,update}:
+ Use `basename $0` in usage messages for consistency.
+
+Tue Dec 3 18:02:08 1996 Ulrik Vieth <vieth@thphy.uni-duesseldorf.de>
+
+ * texmf.cnf.in (TRFONTS): Set this to /usr/lib/font/devpost
+ indepent of $prefix.
+
+Thu Nov 28 16:33:35 1996 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac (AC_ISC_POSIX): Remove this; it causes warnings from
+ Autoconf that make no sense, isn't cached, and is probably of
+ dubious value today.
+ * configure.in: Move the klibtool stuff to common.ac, so the
+ program configure.in's can find it.
+
+Wed Nov 27 14:43:41 1996 Karl Berry <karl@cs.umb.edu>
+
+ * configure.in: Doc fix.
+ * acconfig.h (HAVE_BASENAME, etc.): #undef these symbols so
+ Autoheader can replace them; we use a non-standard macro to test
+ for them, since they're part of the possibly-shared library.
+
+Mon Nov 25 14:04:42 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (texmf.sed): Replace all $(texmf) with `$TEXMF'
+ except on the TEXMF line itself.
+
+Sun Nov 24 10:06:35 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (texmf.sed): Insert missing quote.
+ (distdir): Use doc instead of listing all the targets (we were
+ missing unixtex.ftp).
+
+ * kpsewhich.c (read_command_line): Print the integer equivalent of
+ each format.
+
+Sat Nov 23 15:38:31 1996 Karl Berry <karl@cs.umb.edu>
+
+ * xt.ac (with_x): Remove spurious ;;.
+
+Fri Nov 22 18:00:41 1996 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (do_line): Let var.prog lines work if we're running prog.exe.
+ This happens with --enable-shared.
+ From Ulrik.
+
+Mon Nov 18 16:10:48 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_troff_font_format): Change to DEFAULT_TRFONTS
+ to make texmf.cnf.in change.
+
+Fri Nov 15 14:13:36 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (texmf.sed): Get $TEXMF back into the paths.
+ Noted by Andreas Scherer.
+ (distdir): Add klibtool.version to the distribution.
+ From Ulrik.
+ (install-exec): Use INSTALL_SCRIPT for scripts.
+
+Mon Nov 11 16:16:50 1996 Karl Berry <karl@cs.umb.edu>
+
+ * various .c: Print (nil) instead of (null) so we can possibly
+ detect printf of a null pointer.
+
+Sun Nov 10 16:22:43 1996 Karl Berry <karl@cs.umb.edu>
+
+ * xt.ac: New file so web2c and xdvi treat --with-x-toolkit uniformly.
+ From Ulrik.
+
+Thu Oct 31 15:38:48 1996 Karl Berry <karl@cs.umb.edu>
+
+ * expand.c (kpse_path_expand): Do brace expansion first.
+ (kpse_brace_expand): Expand each element of the brace expansion, so
+ {~a,~b} expands. Suggested by Thomas.
+
+Fri Oct 25 16:51:14 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (install-data): Install an empty dir file if none exists.
+ (mostlyclean: Remove PROF etc. subdirs here.
+
+Tue Oct 22 13:56:20 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in ($(library).h): Make the modtime of the file the
+ same as the latest other .h; otherwise, we think kpathsea always
+ has to be remade.
+
+Sun Oct 20 18:06:36 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (distdir): No need to distribute copying.texi.
+
+Mon Oct 14 11:32:51 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Changes for NT from: Fabrice POPINEAU <popineau@esemetz.ese-metz.fr>.
+
+ * xputenv.c (putenv) [WIN32]: #include <stdlib.h> instead of declaring.
+
+ * tex-file.c (kpse_open_file): Use FOPEN_RBIN_MODE for tfm and gf
+ formats.
+
+ * xopendir.h [!WIN32]: Conditionalize whole file.
+ * xopendir.c (xopendir) [!WIN32]: Conditionalize defn.
+
+ * kpsewhich.c (DllImport) [_WIN32]: Define.
+ (path_sep): Use ENV_SEP_STRING.
+
+ * progname.h,
+ * lib.h,
+ * debug.h (kpathsea_debug),
+ * concatn.h (concatn): Give DllImport kludge.
+
+ * config.h (DOSISH) [WIN32]: #define.
+ Also include <windows.h>, etc.
+
+ * c-std.h (getenv, popen, pclose) [WIN32]: Conditionalize decls.
+ * c-fopen.h [WIN32]: Use rb and wb.
+ * c-limits.h [HAVE_SYS_PARAM_H]: Conditionalize #ifdef.
+ * common.ac: Check for <sys/param.h>
+ * c-stat.h [WIN32]: #include <io.h> and #define stat _stat.
+
+Sat Oct 12 11:10:45 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Include a suffix in what we pass to
+ kpse_fontmap_lookup.
+
+ * Makefile.in (paths.h): Remove extra $ when replacing $VARFONTS.
+
+Tue Oct 8 16:40:07 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-glyph.c (try_fontmap): Do not return the first alias if it
+ itself is an alias. Also, if a particular alias succeeds,
+ return that.
+
+Sun Oct 6 17:52:58 1996 Karl Berry <karl@cs.umb.edu>
+
+ * version.c: Doc fix.
+
+Sat Oct 5 17:06:54 1996 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (-must-exist): New option.
+ (must_exist): New global.
+
+ * Makefile.in (install-data): Call install-info.
+ * kpathsea.texi, *.texi: Use @url, @email, and @dircategory/@direntry.
+
+Sat Sep 21 19:02:17 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXnames.cnf: Doc fix.
+
+ * texmf.cnf.in (latex{2e,209}_inputs): Replace spurious `latex2e'.
+ (TEXINPUTS.fontinst): New definition, including AFM files.
+ (MFINPUTS, TFMFONTS, PKFONTS): Use $VARFONTS.
+ From Thomas.
+
+Sat Sep 7 16:00:53 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXupdate,
+ * MakeTeXnames,
+ * MakeTeXmkdir,
+ * MakeTeXls-R,
+ * MakeTeXTFM,
+ * MakeTeXPK,
+ * MakeTeXMF (version): Call kpsewhich in MakeTeXcommon, not here.
+
+ * version.c: Doc fix.
+
+ * kpsewhich.c (read_command_line): Improve formatting of --help
+ message.
+
+Fri Sep 6 19:16:20 1996 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (read_command_line): Print the bug reporting address.
+ * version.c (kpse_bug_address): New global.
+
+Thu Sep 5 19:08:04 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in: Doc fix.
+
+ * configure.in: Include ../acklibtool.m4 here.
+ * common.ac: Not here. Move calls to kb_*LIBTOOL* functions, too.
+
+Sun Sep 1 17:34:17 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (.c.lo): Put filename right after $(CC), for Klibtool.
+ (KPATHSEA_CC): Do not include ALL_CFLAGS here.
+ (paths.h): Instead of deleting definitions with lowercase variable
+ names, don't include them in the first place.
+
+Sat Aug 31 16:15:33 1996 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac: Call kb_KLIBTOOL_REPLACE_FUNCS and kb_PROG_LIBTOOL
+ instead of the AM_* versions.
+ Also, include acklibtool.m4 instead of aclibtool.m4.
+
+ * Makefile.in (liblobjs): Change to use @LTLIBOBJS@.
+
+Sat Aug 17 17:22:18 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (PKFONTS*, GFFONTS): Need another / to match TDS.
+
+Sat Aug 10 15:46:46 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (TFMFONTS, VFFONTS): Update with trailing // for TDS.
+
+ * MakeTeXupdate,
+ * MakeTeXnames.cnf,
+ * MakeTeXnames,
+ * MakeTeXTFM,
+ * MakeTeXMF,
+ * MakeTeXmkdir,
+ * MakeTeXls-R,
+ * MakeTeXPK: Change --expand to -expand-var.
+
+ * tex-glyph.c (try_fontmap): Return the real name of the first
+ alias as the font name.
+ (kpse_find_glyph): Change call, free string if necessary, etc.
+ Basic idea from a patch sent by wls@astro.umd.edu.
+
+Fri Aug 9 15:42:40 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (paths.h): Substitute for dbtex, dbfonts, and prefix.
+ Also, do not define lowercase variables.
+
+Thu Aug 8 14:50:29 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (TEXCONFIG, INDEXSTYLE): Use //, just in case there
+ are subdirectories. From Thomas.
+
+Tue Aug 6 13:59:03 1996 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (lookup): Handle user_path case.
+
+Mon Aug 5 17:23:56 1996 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c: Rename -expand to -expand-var,
+ -path to -expand-path, and add new -path option to specify
+ explicit path for lookups.
+
+ * tex-file.h (kpse_ist_format): New format.
+ * tex-file.c (kpse_init_format): Initialize it.
+ (IST_ENVS): New #define.
+ * texmf.cnf.in (INDEXSTYLE): Set the default path.
+
+ * tilde.c (kpse_tilde_expand): If $HOME starts with //, only use
+ one of the slashes.
+
+Sat Aug 3 17:18:00 1996 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (read_command_line): Change Usage: line to conform.
+
+Fri Aug 2 11:57:23 1996 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (db_build): Test len > 0 before evaluating len - 1.
+ From: "Peter Henderson, Syrinx Speech Systems P/L, Tel: (+61-2)
+ 956-6540" <peterh@syrinx.com.au>.
+
+Sat Jul 27 14:35:17 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (paths.h): Change target name to
+ $(kpathsea_dir)/paths.h, for rdepend.make dependency.
+
+ * Makefile.in (liblobjs): New variable, gets @LIBTOOL_LIBOBJS@.
+ * common.ac (kbAC_LIBTOOL_REPLACE_FUNCS): Use this new macro instead
+ of AC_REPLACE_FUNCS.
+
+Fri Jul 26 15:51:55 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (KPATHSEA_CC): Include $(compile).
+ (.c.lo): Change suffix rule for libtool 0.5.
+ (install-exec): Use new variables INSTALL_LIBTOOL_*.
+
+Mon Jul 8 17:21:34 1996 Karl Berry <karl@laurie>
+
+ * unixtex.texi: Rename from obtain.texi.
+
+Fri Jun 7 19:10:52 1996 K. Berry <kb@cs.umb.edu>
+
+ * common.ac: Include ../kpathsea/withenable.ac.
+
+Thu Jun 6 16:34:43 1996 K. Berry <kb@cs.umb.edu>
+
+ * Makefile.in (kpsewhich): Use libtool commands etc. instead of
+ our shared lib stuff.
+ * common.ac: Replace our shared lib stuff with gm_PROG_LIBTOOL.
+ * withenable.ac: Remove --enable-shared stuff.
+
+Sat Jun 1 15:05:42 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeX*: Add RCS info for version strings.
+
+Thu May 30 13:46:46 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK: Doc fix; we're called with the base font name
+ (pplr8r), not the user font name (pplr).
+
+ * db.c (ignore_dir_p): Remove the dot_pos != dirname test,
+ since it's always true. It caused directory names containing .'s
+ (e.g., `dc-1.2') to be ignored.
+ From Thomas Esser and Frank Mittelbach.
+
+Sun May 26 16:06:41 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-make.c (kpse_make_tex): If called kpse_init_form, reassign
+ our local variable, too.
+
+Thu May 23 16:20:53 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXnames: Doc fix.
+
+Fri May 3 13:34:51 1996 Karl Berry <karl@cs.umb.edu>
+
+ * withenable.ac: Use AC_ARG_WITH instead of AC_ARG_ENABLE for
+ maketex*.
+
+ * tex-file.c (kpse_find_file): Oops, testing for kpse_pk_format
+ twice, when meant to test for kpse_gf_format.
+
+ * cnf.c (do_line): Allow whitespace in variable values.
+
+ * texmf.cnf.in: Finish adding easier support for !!. From Joachim.
+
+Wed May 1 16:30:56 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (TEXCONFIG): Take $HOME back out again, we're going
+ to hardwire a seach for dvipsrc in $HOME.
+
+Mon Apr 29 14:02:03 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (latex2e_inputs): Use just `latex', not `latex2e'.
+ From: David Carlisle <carlisle@cs.man.ac.uk>.
+ (TEXINPUTS, etc.): Also rewrite to make !! support easier to add.
+ From: Joachim Schrod <schrod@iti.informatik.th-darmstadt.de>.
+
+ * install.texi: Document ksh/ash/Ultrix sh lossage, in favor of
+ bash/bsh/sh5.
+
+Sun Apr 28 15:02:55 1996 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (ASM_NEEDS_UNDERSCORE): New define.
+ From: Peter Breitenlohner <peb@MPPMU.MPG.DE>.
+
+ * Makefile.in (sharedlib_version): Remove unused variable.
+
+Sat Apr 27 17:15:14 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (hyph_size): Add this.
+
+Tue Apr 23 07:34:05 1996 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (MIMELIBDIR, MAILCAPDIR): Add these.
+ (MPXCOMMAND): And these.
+
+ * MakeTeX.site: New file, just an example.
+
+Mon Apr 22 17:31:27 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXnames.conf: Rename to MakeTeXnames.cnf.
+ * MakeTeXnames: Change call.
+ * Makefile.in (install-exec): Change install.
+
+Sun Apr 21 12:09:06 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_set_program_enabled, kpse_maketex_option):
+ Declare new functions.
+ (kpse_src_type): Define new type.
+ * tex-file.c (kpse_set_program_enabled): New function, so we can
+ set this at all the various levels and get the overrides right.
+ (kpse_maketex_option): Handle MakeTeX options in a common place.
+ * proginit.c (kpse_init_prog): Call it, and remove the make_tex_pk
+ argument.
+ * proginit.h (kpse_init_prog): Likewise.
+ * kpsewhich.c (parse_options): New options -maketex and -nomaketex,
+ just calls kpse_maketex_option.
+
+ * Makefile.in ($(library).h): New target, made at dist time.
+
+Sat Apr 20 17:21:24 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Do not pound the disk on the first
+ search if we might be trying the second.
+
+Tue Mar 12 15:21:16 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK: Restore check for mismatched mode and bdpi. From Thomas.
+
+Sun Mar 10 14:17:14 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXnames.conf: Rename VARFONTS to VARTEXFONTS.
+
+ * MakeTeXcommon (trap): Oops, cd $KPSE_DOT before testing $STDOUT.
+
+Sat Mar 9 17:57:02 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXcommon (trap): cd back to KPSE_DOT before removing
+ TEMPDIR, in case $TMPDIR is relative. Reported by Thomas.
+
+Fri Mar 8 11:41:22 1996 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (kpse_db_search): Add debug statement with the result of
+ the match.
+
+ * tex-make.c (kpse_make_tex): Don't look for the arg spec here.
+ * tex-file.c (init_maketex): Do it here. Check for disbaling in
+ the config file, too.
+
+ * tex-make.c (misstex): Look for TEXMFOUTPUT in texmf.cnf.
+ * texmf.cnf.in (TEXMFOUTPUT): Define this.
+
+ * kpathsea.texi (Suppressing warnings): New node to describe TEX_HUSH.
+
+ * tex-file.c (kpse_init_format): Include the numeric value of the
+ format for use with kpsewhich --format.
+
+ * tex-hush.c: Support `all' to suppress everything.
+
+Thu Mar 7 11:24:51 1996 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c: Change --program to --progname, for compatibility
+ with TeX & co.
+
+ * texmf.cnf.in (TEXCONFIG): Remove ~ from default path, for
+ consistency with everything else.
+
+ * readable.c: Let's call it TEX_HUSH instead of KPSE_NOWARN_PERM,
+ so we can use it for checksum warnings, too. And for similarity
+ with xdvi.
+ * kpathsea.texi: Corresponding change.
+ * tex-hush.[ch]: New files.
+
+Wed Feb 28 15:16:32 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-make.c (misstex): Let the name missfont.log be configurable.
+ * texmf.cnf.in (MISSFONT_LOG): Add this definition.
+ * kpathsea.texi: Document this.
+
+Sun Feb 25 16:55:35 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c: Reverse order of alias & suffix searches, so we look
+ for the original TFM name before aliases.
+
+Sun Feb 18 16:24:50 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (xopenfile): Move this function to here and rename to
+ kpse_open_file.
+ * xopenfile.c: Remove this.
+ * Makefile.in (objects): Remove xopenfile.o.
+
+Thu Feb 15 12:57:56 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-make.c (maketex): Do not print the `kpathsea: Running ...'
+ message if we're discarding output.
+ (misstex): Do not log the missing file in missfont.log, either.
+
+Sat Feb 10 14:59:23 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (sharedlib): Add new command here $(shared_postlink)
+ so we can make the necessary symlink.
+ (shared_postlink): New variable
+
+Fri Feb 9 15:46:55 1996 Karl Berry <karl@cs.umb.edu>
+
+ * withenable.ac (maketex{mf,pk,tfm}-default): Move here from
+ web2c/withenable.ac.
+
+Wed Feb 7 16:52:08 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXnames.conf: Extract this new script from MakeTeXcommon, sigh.
+ * MakeTeX*: Other updates from Thomas --
+ - replace the exec 3>&1 1>&2 by trap/subshell construction. The
+ 3>&1 may cause the 'open fd bug' with bash.
+ - ts is a typo. tc are the text companion fonts
+ - replace >&3 by >$STDOUT where $STDOUT is a filename. Its content is
+ displayed by the trap command in MTcommon.
+ - added missing ;; in case/esac
+ - use : ${VAR=VAL} where possible
+ - added mt_min_args
+ - removed psfonts.map parsing (was only needed for ps2pk)
+ - removed >&2 where redirection stdout->stderr is active anyway
+ - removed </dev/null where redirection stdin<-/dev/null is active
+ anyway
+ - Oops: MakeTeXTFM still used old code: >$TEMPDIR/mtout.$$
+ - add line
+ trap 'test -f $STDOUT && cat $STDOUT; cd /; rm -rf $TEMPDIR; exit 0' 0 1 2 15
+ to MakeTeXcommon
+ - MT_FEATURES now in MakeTeXnames.conf since we need to read it
+ later than MakeTeXcommon
+
+Tue Feb 6 17:04:25 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_file_format_type): Add afm and type1 support.
+ * tex-file.c: Likewise.
+ (kpse_init_format): In tex_ps_header_format, no longer need to
+ recognize .pfa and .pfb.
+ * texmf.cnf.in (AFMFONTS, T1FONTS): Likewise.
+ * Makefile.in (paths.h): Include 0-9 in the regexp for the sake of
+ T1FONTS.
+
+Sat Feb 3 15:45:00 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (DEFS): Move to common.make.
+
+Mon Jan 29 17:01:44 1996 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXls-R: Doc fix.
+
+Mon Jan 8 17:17:42 1996 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c: Doc fix.
+
+ * fontmap.c (MAP_NAME, MAP_HASH_SIZE): Conditionalize these #defines.
+
+Sun Jan 7 17:38:00 1996 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (DB_HASH_SIZE, DB_NAME): Conditionalize these.
+
+ * MakeTeXcommon (dcfontdir, tsfontdir): Use supplier `jknappen'.
+
+Mon Jan 1 15:14:42 1996 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (distdir): Don't bother including freedom.texi.
+
+Fri Dec 29 17:17:08 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in: misc.make is now clean.make.
+
+Tue Dec 26 14:21:08 1995 Karl Berry <karl@cs.umb.edu>
+
+ * withenable.ac: New file with --enable option extracted from
+ common.ac, for the top level to include.
+
+ * acconfig.h (MAKE_TEX_PK_BY_DEFAULT): Add this.
+
+ * readable.c (kpse_readable_file): Omit warning if
+ KPSE_NOREAD_WARN is set to 1.
+
+Wed Dec 13 14:14:09 1995 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c: Call kpse_init_format when necessary in the
+ --format case.
+
+Mon Dec 11 14:42:13 1995 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac: --disable-shared should not act like --enable-shared.
+ From Ulrik.
+
+Sun Dec 10 15:35:15 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_mft_format): New format.
+ * tex-file.c (MFT_ENVS): New variable.
+ (kpse_init_format): Initialize it.
+ * texmf.cnf.in (MFTINPUTS): New variable.
+
+Fri Dec 8 08:54:58 1995 Karl Berry <karl@cs.umb.edu>
+
+ * xopenfile.c: Doc fix.
+
+Mon Dec 4 17:23:34 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (check): Extra $ missing.
+
+Sun Dec 3 13:42:54 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (TEX_SUFFIXES): Add .dtx.
+
+Sun Nov 19 16:19:37 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeX*: Use MakeTeXupdate, mkdir, etc. in $TEXMFCNF_DIR, not
+ along PATH. From John I.
+
+Sat Nov 18 17:03:46 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (TEX_SUFFIXES): Add .txi.
+
+Fri Nov 17 15:12:03 1995 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac (kb_AC_SYS_SHAREDLIB): Add the kb_ prefix.
+
+ * Makefile.in ({un,}install-exec): Use sharedlibname and
+ staticlibname instead of `basename`.
+ Also, pass no arguments to $(shared_postinstall); let the Autoconf
+ macro set this completely.
+
+ * expand.c: Bash code remains under the GPL, per rms.
+
+Thu Nov 16 16:14:14 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (uninstall-exec): Needs same `basename` treatment as
+ install-exec. From Ulrik.
+
+ * config.h [AMIGA] (pclose): Must be #defined as 0, not just
+ empty. From Andreas Scherer.
+
+Tue Nov 14 14:04:57 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_fallback_resolutions_string): New global.
+ * tex-file.c: Define it.
+ (kpse_init_fallback_resolutions): Use it instead of
+ DEFAULT_FONT_SIZES, if set.
+
+Mon Nov 13 10:43:11 1995 Kathy Hargreaves <karl@cs.umb.edu>
+
+ * find-suffix.c: Remove spurious + 1.
+
+Sun Nov 12 13:42:51 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c: Improve warning message if last resort sizes are not
+ sorted. Suggested by Kathy.
+
+ * texmf.cnf.in (trie_size, main_memory): Doc improvements from Wayne.
+
+Sat Nov 11 16:58:37 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXnames: Correct too many left quotes.
+
+ * tex-make.c (kpse_make_tex): Initialize the format if necessary.
+
+Mon Oct 30 16:49:05 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK (GFNAME): Do not assume $cmd produced $GFNAME. From Tim.
+
+ * texmf.cnf.in (trie_size): Increase to 32000 so common language
+ combinations will require no change. Suggested by Ulrik.
+
+ * MakeTeXls-R: Missing s in sed cmd.
+ * MakeTeXTFM (TFM_NAME): Should be TFMNAME.
+ * MakeTeXnames (FONTNAME): Missing `.
+ * MakeTeXcommon: If the caller requires no args (i.e.,
+ MakeTeXls-R), don't complain if given no.
+ Missing } in varfonts case.
+ All from Thomas.
+
+Sun Oct 22 17:02:25 1995 Karl Berry <karl@cs.umb.edu>
+
+ * c-std.h (hypot): Remove this declaration. It was only needed for
+ fontutils, and it conflicts under Linux 1.2.10. From Tim Murphy.
+
+Sat Oct 14 10:55:26 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (EDITOR): Missing %. From Tim Murphy.
+
+Sat Oct 7 17:44:41 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (install-exec): Use basename to get the real name so
+ we don't install in $(libdir)/../kpathsea/etc.
+ From Ulrik.
+
+Sat Sep 30 12:16:05 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXls-R (db_file_tmp): Replace double slashes with single,
+ for the sake of NetBSD/FreeBSD. From Thomas.
+
+Fri Sep 29 11:29:08 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (tex-file.o): CPPFLAGS is now ALL_CPPFLAGS.
+
+Mon Sep 25 15:05:32 1995 Karl Berry <karl@cs.umb.edu>
+
+ * lib.h (FATAL_PERROR): Avoid using the formal parameter `s' since
+ cc gets confused with %s.
+
+ * MakeTeXls-R: Include subtleties from Thomas.
+ * MakeTeXcommon: Rename stickydir to appendonlydir.
+
+Sun Sep 24 13:15:51 1995 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (kpse_cnf_get): Call kpse_init_db here.
+ * pathsearch.c (search): Instead of here.
+
+ * tex-file.c (init_format): The override path may be null, so use
+ MAYBE to print it.
+
+ * MakeTeXPK: Don't use unset, as Ultrix sh doesn't support it.
+
+Sat Sep 23 15:07:12 1995 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac (basename strstr putenv): Use AC_REPLACE_FUNCS instead
+ of AC_CHECK_FUNCS. Add strtol and strcasecmp from web2c/lib and xdvik.
+ * Makefile.in (objects): Use @LIBOBJS@ instead of corresponding .o's.
+
+Fri Sep 22 13:34:51 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (MAKE_TEX_*): #define as 0/1, instead of #undef,
+ since we now pass this as a default argument to init_maketex.
+
+ * tex-file.c (init_path): Look for environment variables PATH.prog
+ and PATH_prog before PATH.
+
+Thu Sep 21 13:53:38 1995 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (USAGE): Avoid bare newline.
+
+ * xfseek.c, xftell.c: Add unprototypification.
+
+ * common.ac (library_cflags): AC_SUBST for this depending on
+ --enable-shared.
+ * Makefile.in (shared_cflags, sharedlib_cflags): Rewrite
+ accordingly, so the shared flags aren't always used.
+
+Wed Sep 20 17:06:53 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c: Add .ltx, .texi, and .texinfo as alternate suffices
+ for kpse_tex_format.
+
+Tue Sep 19 17:12:10 1995 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in: Changes for TDS.
+
+ * MakeTeX*: New scripts from Thomas.
+
+Sat Sep 16 17:30:46 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c: Do not print extra `kdebug:'s when printing the
+ alt_suffixes.
+
+ * expand.c: Incorporate brace expansion code from bash.
+ * texmf.cnf.in (PKFONTS.xdvi): Use it here, and document the
+ possibility for $TEXMF.
+
+Thu Sep 14 12:59:17 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_init_format): For any_glyph_format, do not
+ initialize a suffix.
+
+ * kpsewhich.c (main): Initialize all the formats.
+ (find_format): psfonts.map => dvips_config_format.
+
+Tue Sep 12 16:19:44 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeX{MF,TFM}: New scripts from te.
+ * Makefile.in (install-exec, distdir): Install and dist them.
+
+Sun Sep 10 15:11:07 1995 Karl Berry <karl@cs.umb.edu>
+
+ * pathsearch.c (search): Doc fix.
+
+ * tex-file.h (kpse_format_info_type): Add alt_suffix member.
+ * tex-file.c (init_format): Set it for PS headers and picts, and
+ print it if it exists.
+ * kpsewhich.c: Use the new alt suffixes and also the regular
+ suffixes to allow for -format names as well as numbers, and for
+ file format guessing.
+
+Sat Sep 9 14:27:48 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK: If the MODE and BDPI don't match, ignore the mode.
+ Suggested by Thomas.
+
+ * tex-file.[ch] (kpse_font_override_path): Remove this.
+ (kpse_format_info_type): Replace the `override_p' member with a
+ general `override_path'.
+ * proginit.c: Set the override path for both fonts and headers.
+
+ * acconfig.h (NOTOOL): Add this.
+
+Fri Sep 8 14:52:42 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (HYPERXDVI): Don't need this after all, Autoconf's
+ default actions are better.
+
+Thu Sep 7 15:11:17 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (HYPERXDVI): Define this.
+
+Mon Sep 4 17:14:25 1995 Karl Berry <karl@cs.umb.edu>
+
+ * debug.h (KPSE_LAST_DEBUG): Define this, for use with gsftopk.
+
+ * Makefile.in (objects): Add xopenfile.o.
+ * xopenfile.c: New file.
+ * lib.h (xopenfile): Declare it.
+
+Sat Sep 2 13:49:53 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_file_format): Rename kpse_ps_header_format to
+ tex_ps_header_format.
+ * tex-file.c (TEX_PS_HEADER_ENVS): Rename likewise, etc.
+ * kpsewhich.c (suffixes): Likewise.
+ * texmf.cnf: Likewise.
+
+ * tex-file.c: Never set must_exist on the first search. Is this
+ really correct?
+
+Fri Sep 1 13:24:49 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-make.c (maketex): Give perror if the popen fails.
+
+ * db.c (db_dir_list): Keep track of the directories we found db's in.
+ (kpse_db_search): If no db directories are relevant to this path
+ elt, return NULL.
+ * db.h: Doc fix.
+ * pathsearch.c (path_search): Doc fix.
+
+ * Makefile.in (shared_ext, etc.): Move to common.make.
+
+Thu Aug 31 14:40:32 1995 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c: Install suffix rewrite from Yves.
+
+ * common.ac: Move AC_SYS_SHAREDLIB etc. here.
+
+ * acconfig.h (ASM_SCALED_FRACTION): Add this.
+
+Wed Aug 30 17:02:58 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Call kpse_make_tex.
+ * tex-make.c (kpse_make_tex): Only call set_maketex_mag if we are
+ doing MakeTeX-PK or GF-ing.
+ From Greg.
+
+Tue Aug 29 13:58:59 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (texmf.sed): Depend on paths.make. Should we avoid
+ creating a new file unless it changes, a la c-auto.h?
+
+ * configure.in: Check for --enable-shared.
+
+Mon Aug 28 17:50:06 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in: Add sharedlib variables.
+
+Sun Aug 27 13:27:01 1995 Karl Berry <karl@cs.umb.edu>
+
+ * hash.c (hash_print): New option summary_only, and always print
+ the summary. Also, output to stderr, not stdout.
+ * hash.h: Change decl.
+
+ * db.c (kpse_init_db): Oops, have to make it external, so rename
+ again.
+ * db.h: Declare it.
+ * pathsearch.c (search): Call it.
+
+ * cnf.c (read_all_cnf): Rename from read_files.
+ * db.c (read_all_lsR): Rename from read_all_dbs.
+ * fontmap.c (read_all_maps): Rename from map_create.
+
+ * tex-file.h (kpse_db_format): Another new type.
+ * tex-file.c (kpse_init_path): Case for it.
+ (DB_ENVS): Envvar list.
+ * texmf.cnf.in (TEXMFDBS): Default path.
+ * kpsewhich.c (suffix): Add new element.
+
+Sat Aug 26 14:49:28 1995 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (CNF_NAME): #define this.
+ * tex-file.c (kpse_init_path): Instead of setting the .program
+ element to texmf.cnf here.
+
+ * db.c (db_insert): Rename to kpse_db_insert.
+ * db.h: Change decl.
+ * tex-make.c (maketex): Change call.
+
+ * cnf.c, cnf.h, db.c, db.h, pathsearch.c: Remove references to
+ kpse_db_dir.
+ * pathsearch.c (first_search): New static.
+ (path_search): Do not do ls-R search if first_search.
+ (search): Do not log if first_search.
+
+ * pathsearch.c (path_search): Don't bother calling elt_in_db --
+ the match function in db.c will catch the irrelevant hits.
+ Pointed out by te.
+
+Fri Aug 25 14:01:24 1995 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (kpse_cnf_get): Look for NAME.PROGRAM before NAME.
+ (do_line): Save NAME.PROGRAM separately from NAME.
+ * texmf.cnf.in: Put the usual definitions of TEXINPUTS and PKFONTS
+ first now, before the .prog variants.
+
+ * fontmap.c: Use ISSPACE instead of just checking for space and tab.
+
+Thu Aug 24 13:46:19 1995 Karl Berry <karl@cs.umb.edu>
+
+ * lib.h (strstr) [!HAVE_STRSTR]: Declare this.
+ * Makefile.in (objects): Add strstr.o.
+ * common.ac (AC_CHECK_FUNCS): Remove memmove; we seem to never use
+ this. And add strstr.
+
+ * fontmap.c (map_file_parse): Comments at the last % or @c, not at
+ the first %. Also, implement the include feature.
+ And thus, don't give up if the map file can't be opened.
+ (token): New routine, since we can no longer use strtok.
+
+ * tex-file.h (kpse_file_format_type): New format kpse_fontmap_format.
+ * tex-file.c (kpse_init_format): Initialize it.
+ (FONTMAP_ENVS): Define it.
+ * texmf.cnf.in (TEXFONTMAPS): Define the default.
+ * kpsewhich.c (suffix): Add .map.
+
+Tue Aug 22 13:28:46 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK.in: No >&/dev/null, source.map is now supplier.map.
+
+ * tex-file.c: Doc fix.
+
+Mon Aug 21 15:52:42 1995 Karl Berry <karl@cs.umb.edu>
+
+ * c-memstr.h (SYSV): OK, omit this definition in the never-ending
+ battle to appease the X headers.
+ From: neal@ctd.comsat.com (Neal Becker).
+
+Sun Aug 20 12:58:28 1995 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (read_files): Concatenate consecutive lines that end in \.
+
+ * types.h (boolean) [__cplusplus]: Don't define true and false for C++.
+ From: Johannes Sixt <Johannes.Sixt@risc.uni-linz.ac.at>.
+
+ * db.c (db_build): Call absolute_p to determine if the possible
+ directory really is one.
+ Also, allow relative names in the ls-R file.
+
+ * kpsewhich.c: New options -path, -separator.
+ From: David Aspinall <da@dcs.ed.ac.uk>.
+
+ * MakeTeXPK.in: Unset DISPLAY and MFTERM.
+ From: Yves Arrouye <Yves.Arrouye@imag.fr>.
+
+ * db.c (ignored_dir_p): New function to ignore . directories.
+ (db_build): Call it, and do the ignoring. Report on how many
+ directories were ignored.
+
+ * Makefile.in (MakeTeXPK): Remove dcfontdir substitution.
+ * MakeTeXPK.in: Play redirection games so regular echo's will work.
+ (dcfontdir): Remove this; it's unused.
+ From: te@informatik.uni-hannover.de (Thomas Esser).
+
+ * pathsearch.c (path_search): Free more garbage.
+ From: John Eaton <jwe@che.utexas.edu>.
+
+Sat Aug 19 12:57:54 1995 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (USAGE): Document -format and -program.
+
+ * tex-make.c (maketex): Give warning if MTPK output a string that
+ wasn't a filename. From Pierre.
+
+ * kpsewhich.c (read_command_line): Execute -expand right
+
+ * tilde.c (kpse_tilde_expand): If HOME is /, don't start path with //.
+ From: Andreas Schott <andreas@mpa-garching.mpg.de>.
+
+ * db.c (match): Make /// (or more) like //.
+ * elt-dirs.c (do_subdir): Likewise. Also, skip over as many
+ slashes as we found.
+
+ * variable.c (expanding_p, expanding, expansions, expansion_type):
+ New functions, variables, type.
+ (expand): Check for recursively expanded variables.
+ Reported by Nicolai Langfeldt <janl@math.uio.no>.
+
+ * cnf.c (kpse_cnf_get): Free temporary list after extracting the
+ first element (the one we return).
+
+Fri Aug 18 17:39:29 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK.in (1270): The guess here should be linohi, not linolo.
+ From pwa.
+
+ * kpsewhich.c (suffix): Update for new MetaPost stuff.
+ * tex-file.h: Doc fix.
+
+Mon Aug 14 17:49:05 1995 Karl Berry <karl@cs.umb.edu>
+
+ * debug.h: Define KPSE_DEBUG, not DEBUG.
+ * hash.c, hash.h, tex-file.c, elt-dirs.c, dir.c, db.c: Change
+ #ifdef's accordingly. From John I.
+
+Sun Aug 13 16:03:51 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_file_format_type): Rename kpse_dvips_headers to
+ just kpse_ps_headers. xdvik uses this too, now.
+ * tex-file.c (kpse_init_format, KPSE_DVIPS_HEADER_ENVS): Likewise.
+ Also, look for the PSHEADERS envvar, not DVIPSHEADERS.
+ * texmf.cnf.in: Likewise.
+
+Thu Aug 10 19:31:14 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_init_fallback_resolutions): Complain if sizes
+ aren't sorted, and ignore offending sizes.
+ From: Manuel Fahndrich <manuel@CS.Berkeley.EDU>.
+
+Tue Aug 1 13:53:53 1995 Karl Berry <karl@cs.umb.edu>
+
+ * variable.[ch] (kpse_var_value): Use const_string.
+
+ * texmf.cnf.in (string_vacancies): Decrease to 25000. From Bernd.
+ (font_max): Add this. From Wayne.
+
+Mon Jul 31 15:47:01 1995 Karl Berry <karl@cs.umb.edu>
+
+ * db.h (KPSE_DB_DIR): Remove $.
+ * cnf.c (read_files): Call kpse_var_value instead of kpse_var_expand.
+
+ * tex-file.[ch]: Add mpsupport and troff_font formats.
+ * texmf.cnf.in: Likewise.
+
+Sat Jul 29 09:21:44 1995 Karl Berry <karl@cs.umb.edu>
+
+ * variable.h (kpse_var_value): Declare this.
+ * variable.c (kpse_var_value): New routine.
+
+ * tex-file.c: Check TEXMFINI for pool/fmt/base/mem lookups
+
+Tue Jul 25 11:22:25 1995 Karl Berry <karl@cs.umb.edu>
+
+ * concatn.c (concatn): Free the intermediate result, not the final
+ version.
+
+ * texmf.cnf.in (TEXMFLOG): Don't mention this, as we need to log
+ the finding of the .cnf file itself, thus it must be an
+ environment variable.
+
+Sat Jul 22 17:09:58 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (KPSE_{MEM,MP,MPPOOL}_ENVS): Define envvars.
+ * tex-file.h (kpse_file_format_type): Add kpse_{mem,mp,mppool}_formats.
+ * texmf.cnf.in (MPPOOL, MPMEMS, MPINPUTS): New variables.
+ Adapted from: vieth@xerxes.thphy.uni-duesseldorf.de (Ulrik Vieth).
+
+Fri Jul 21 15:26:42 1995 Karl Berry <karl@cs.umb.edu>
+
+ * *.c, *.h: The FSF has a new address.
+
+ * kpsewhich.c: Give error if no args.
+
+Wed Jul 19 17:34:26 1995 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in: Document limits on error_line et al.
+
+Mon Jul 17 13:09:05 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (NO_FMTBASE_SHARE): Rename to NO_DUMP_SHARE.
+
+Sun Jul 16 14:17:16 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (IPC, FUNNY_CORE_DUMP, NO_FMTBASE_SHARE): Include these.
+
+Sat Jul 15 12:45:51 1995 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (HAVE_ITOA): Remove extraneous #define.
+
+ * texmf.cnf.in (hash_extra): New TeX array variable, 0 by default.
+
+ * tex-file.c (KPSE_BIB_ENVS): Include TEXBIB.
+
+Thu Jul 13 15:04:52 1995 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (TEXPOOL, MFPOOL): Include . after all, now that we
+ use TEXPOOL to search for tcx files.
+
+Sun Jul 9 15:30:59 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Don't go through the
+ mapped_name_list if it's null.
+
+Wed Jun 21 19:47:33 1995 Karl Berry <karl@cs.umb.edu>
+
+ * lib.h (FATAL5): Define this.
+
+Sat Jun 10 15:52:41 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Use texfonts.map aliases for TFM
+ searches.
+ * tex-file.h: Doc fix.
+ * fontmap.c (kpse_fontmap_lookup): New name. Fault in the map
+ table as needed, instead of initializing. Make map_create static.
+ * fontname.h: New name; remove map_create.
+ * tex-glyph.c (try_fontmap): Just call kpse_fontmap_lookup, no
+ need to create it.
+
+ * fontmap.c (map_lookup): Don't let return value fall off the end
+ in the suffix-appending case.
+ From: "Heading, Anthony" <heading_anthony@jpmorgan.com>.
+
+Fri Jun 9 19:11:34 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tilde.c: Only assume PWD_H for looking up ~user, not for ~ or ~/.
+ * make-suffix.c: Use IS_DIR_SEP instead of assuming /.
+ * concatn.c: Free the in-between concatenations to avoid garbage.
+ * absolute.c [OS2]: Use same conventions as for DOS.
+ * c-std.h, c-pathch.h, c-fopen.h: Likewise.
+ From: rs@purple.in-ulm.de (Ralph Schleicher).
+
+Tue Jun 6 13:11:46 1995 Karl Berry <karl@cs.umb.edu>
+
+ * lib.h (itoa) [!HAVE_ITOA]: Define conditionally.
+ * itoa.c: Likewise.
+ * acconfig.h (HAVE_ITOA): Add this.
+
+ * c-pathch.h, c-fopen.h [DOS]: Changes from web2pc from Wayne.
+
+ * xputenv.c: Doc fix.
+
+ * truncate.c (kpse_truncate_filename): Check for a device separator.
+
+ * elt-dirs.c (main): Tests for Amiga.
+
+Mon Jun 5 13:12:10 1995 Karl Berry <karl@cs.umb.edu>
+
+ * absolute.c: Add Amiga support. From Andreas Scherer.
+ * c-pathch.h: Ditto.
+ * elt-dirs.c (dir_list_add): Ditto. Check for device separators, too.
+
+Sun Jun 4 11:29:18 1995 Karl Berry <karl@cs.umb.edu>
+
+ * c-proto.h (AA): New macro to throw away (or keep) any number of
+ arguments, used with an extra set of parens.
+
+ * Makefile.in (distdir): Put PROJECTS in the distribution.
+
+Sat Jun 3 11:53:45 1995 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (main_memory): Add definitions for TeX array sizes.
+
+ * config.h (progname.h): Include this.
+ * prog{init,name}.c, kpsewhich.c: No longer need to include it.
+ * lib.h (START_FATAL, FATAL_PERROR): Use program_invocation_name
+ in the error message.
+
+ * variable.h: Doc fix.
+
+Fri Jun 2 13:41:29 1995 Karl Berry <karl@cs.umb.edu>
+
+ * config.h (DOSISH) [DOS || OS2]: Define this.
+
+Tue May 30 15:43:56 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Don't look for foo.sty.tex before
+ foo.sty. Suggested by worsch@ira.uka.de.
+
+Mon May 29 15:24:38 1995 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (db_insert): If DOS, don't check that first character on a
+ line IS_DIR_SEP. From Sebastian.
+
+Sat May 27 13:51:47 1995 Karl Berry <karl@cs.umb.edu>
+
+ * pathsearch.c (log_search): Cast time_t arg to avoid printf warning.
+
+ * lib.h (atou): Declare it.
+ * Makefile.in (objects): Add atou.o.
+ * atou.c: New file.
+
+Sun May 21 10:58:31 1995 Karl Berry <karl@cs.umb.edu>
+
+ * xfopen.c: Assert non-null filenames.
+
+Mon May 15 17:40:27 1995 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (USAGE): Add one-line description to the help message.
+
+Sun Apr 16 14:25:06 1995 Karl Berry <karl@cs.umb.edu>
+
+ * line.c (BLOCK_SIZE): Increase to 56, to avoid realloc's.
+
+Fri Apr 14 15:56:13 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (objects): Add xfseek and xftell, from fontutils.
+
+Mon Mar 13 20:05:02 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK.in: Don't egrep in a file that doesn't exist.
+
+Fri Mar 10 10:49:28 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_find_file): Abort if the name passed in is null
+ or empty.
+
+Thu Mar 9 15:23:07 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_init_format): Only do suffix searches for GF files.
+
+ * acconfig.h: Warn that this is not the right thing to edit to fix
+ configuration problems.
+
+Thu Mar 2 15:58:11 1995 Karl Berry <karl@cs.umb.edu>
+
+ * texmf.cnf.in (TEXFORMATS): Doc fix.
+
+Fri Feb 24 16:40:23 1995 Karl Berry <karl@cs.umb.edu>
+
+ * MakeTeXPK.in: `generate rootname' with no trailing punctuation
+ for the dc fonts.
+
+Mon Feb 20 15:23:05 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_find_mf): New abbreviation.
+
+Sat Feb 11 13:06:23 1995 Karl Berry <karl@cs.umb.edu>
+
+ * putenv.c: Include c-auto.h instead of kpathsea/c-auto.h, so the
+ sed commands don't transform it into
+ $(kpathsea_srcdir)/c-auto.h. From Andreas.
+
+ * tex-make.c (maketex): Don't make a bad return from pclose a
+ fatal error. Reported most recently by Wayne Sullivan, also by
+ Andy Piper in the past.
+
+ * MakeTeXPK.in (sauterdir): Only try this if we have the right
+ b-foo.mf file. And correct $DESTDIR=... mistake.
+ From Nick Cropper <nickc@dcs.st-andrews.ac.uk>.
+
+Fri Feb 10 15:49:49 1995 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (INIT_MT): If the .program member has already been
+ set, don't reset it.
+
+Wed Jan 18 15:47:07 1995 Karl Berry <karl@cs.umb.edu>
+
+ * xopendir.c (xclosedir): Use CLOSEDIR_VOID, not VOID_CLOSEDIR.
+ From tim@maths.tcd.ie.
+
+ * db.c (db_insert): Don't assert db.size>0, since we may not have
+ called kpse_db_search. From te@informatik.uni-hannover.de.
+
+ * MakeTeXPK.in (dc fonts): Don't put a trailing period in the
+ filename. From Tor Lillqvist <tml@hemuli.tte.vtt.fi>.
+
+Sun Jan 8 12:14:47 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Version 2.6.
+
+Wed Jan 4 14:44:34 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (mostlyclean): Remove kpsewhich.
+
+Tue Jan 3 11:48:40 1995 Karl Berry <karl@cs.umb.edu>
+
+ * kpsewhich.c (long_options): Can't make this automatic.
+
+ * basename.c: Include <kpathsea/config.h> before testing
+ HAVE_BASENAME.
+
+ * Makefile.in (kpsewhich): Make the library before kpsewhich.o.
+ (paths.h): No need for the $(kpathsea_dir)/ any more, now make
+ depend gets rid of it.
+
+ * rm-suffix.c: Doc fix.
+
+ * kpsewhich.c: Extract the dpi from the filename if possible.
+
+Mon Jan 2 09:45:17 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (kpsexpand): Replace with kpsewhich.
+
+ * proginit.h: Doc fix.
+
+ * texmf.cnf.in (TEXMFCNF): Rename from TEXMF_CNF.
+ * tex-file.c (kpse_init_format): Likewise.
+
+Sun Jan 1 14:04:41 1995 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (MakeTeXPK): Substitute for web2cdir.
+ * MakeTeXPK.in: Use it for MakeTeXPK.site.
+ (install-data): Install texmf.cnf in web2cdir instead of texmf.
+ * texmf.cnf.in (TEXMF_CNF): Default path includes web2cdir.
+
+Sat Dec 31 14:26:48 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (objects): No more @LIBOBJS@.
+ * common.ac: Use AC_CHECK_FUNCS for basename, not REPLACE_FUNCS.
+ The latter doesn't define HAVE_BASENAME.
+ * basename.c [!HAVE_BASENAME]: Conditionalize whole file.
+
+ * Makefile.in (uninstall-exec): Remove kpsexpand.
+ (MakeTeXPK): New target.
+ (install-exec): Install MTPK.
+ (install-library): New target to replace install-headers.
+ (install): Don't install-library by default.
+
+Fri Dec 30 15:53:04 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (objects): Don't put @LIBOBJS@ on a line by itself.
+ From Joachim.
+
+Mon Dec 26 07:55:40 1994 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac (AC_FUNC_CLOSEDIR_VOID): Call this. Reported by
+ Timothy Murphy <tim@maths.tcd.ie>.
+
+ * tex-file.c (init_path): If a variable is set to an empty value,
+ ignore it. Suggested by Stephen Gildea <gildea@x.org>.
+
+ * proginit.c: If passed a NULL mode, put / in the environment here.
+ * tex-make.c (kpse_make_tex): Don't do STREQ on NULL (though it
+ should never be NULL in the first place), and properly restore
+ MAKETEX_MODE if it was /.
+
+Tue Dec 20 09:57:21 1994 Karl Berry <karl@cs.umb.edu>
+
+ * install.texi: Mention how to do optimization.
+
+Mon Dec 19 13:18:04 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h: Doc fix.
+
+Wed Dec 14 14:46:47 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Version 2.5.
+
+ * pathsearch.c (log_search): Don't prepend the `kdebug:' to the
+ search result.
+
+Sat Dec 10 16:49:12 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-make.c (set_maketex_mag): Make case of magstep -1 work
+ properly. From a bug report by
+ heiko@lotte.sax.de (Heiko Schlittermann).
+
+Mon Dec 5 11:58:08 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in (objects): Add @LIBOBJS@.
+ * common.ac: Check for basename.
+
+ * db.c (db_insert): Include trailing / in directory part, and pass
+ the key and the value in the right order. From
+ te@informatik.uni-hannover.de.
+
+Sun Dec 4 14:26:44 1994 Karl Berry <karl@cs.umb.edu>
+
+ * kpsexpand.c: Add extra filename argument. From
+ ware@cis.ohio-state.edu.
+
+ * common.ac: Use AC_TRY_RUN to test for SMART_PUTENV, not
+ AC_TRY_LINK. From parkes@sierravista.com.
+
+ * acconfig.h: Use #undef instead of commented-out `/* #define'.
+
+Sun Nov 27 13:47:06 1994 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (db_insert): Don't try to insert into an empty hash table.
+ From dc@cobi.gsfc.nasa.gov (and others).
+
+ * pathsearch.c (log_search): Call DEBUGF, not printf, for the
+ filenames. From John I.
+
+ * tex-make.c (kpse_make_tex): If MAKETEX_MODE is /, unset it and
+ reset it around the command expansion.
+ (maketex): Back to calling db_insert.
+
+Sat Nov 26 11:44:09 1994 Karl Berry <karl@cs.umb.edu>
+
+ * cnf.c (read_file): If expansion of $TEXMF (KPSE_DB_DIR) fails,
+ expand DEFAULT_TEXMF. From te@informatik.uni-hannover.de.
+
+Thu Nov 24 13:41:15 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (KPSE_BST_ENVS): Do not look at TEXINPUTS.
+
+ * tex-file.h: Doc fix.
+
+Tue Nov 15 14:06:56 1994 Karl Berry <karl@cs.umb.edu>
+
+ * progname.c (kpse_set_progname): Use basename.
+
+Fri Nov 11 19:12:23 1994 Karl Berry <karl@cs.umb.edu>
+
+ * acconfig.h (HAVE_SIGIO): Add this.
+
+Tue Nov 8 19:14:12 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-make.c (kpse_make_tex): Change argument name from
+ `basename', since now we have a fn by that name.
+ * magstep.c (kpse_magstep_fix): Initialize mdpi.
+ * basename.c (basename): Initalize base.
+
+Mon Nov 7 15:46:21 1994 Karl Berry <karl@cs.umb.edu>
+
+ * common.ac: Run autoupdate.
+ * c-dir.h: Change #if names and NLENGTH to new style.
+
+Fri Oct 28 21:28:02 1994 K. Berry (karl@terminus.cs.umb.edu)
+
+ * Version 2.4.
+
+ * tex-make.c (maketex): Don't call db_insert, that routine is
+ buggy. I'll fix it later. In the meantime, trying to get a
+ semi-stable release.
+
+Tue Oct 25 16:43:31 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Version 2.3.
+
+ * progname.c (kpse_set_progname): Initialize kpathsea_debug from
+ the KPATHSEA_DEBUG envvar. From neal@ctd.comsat.com.
+
+Mon Oct 24 13:41:24 1994 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (db_insert): New function.
+ * db.h: Declare it.
+ * tex-make.c (maketex): db_insert the result if we succeeded.
+
+ * basename.c: New file to define basename.
+ * lib.h (basename): Declare it.
+ * Makefile.in (objects): Include basename.o.
+
+ * tex-file.h (kpse_file_format_type): Add missing enum values for
+ base/fmt/pool files.
+ * tex-file.c (kpse_init_format): Add cases for these.
+ From te@informatik.uni-hannover.de.
+
+ * lib.h (WARNING, FATAL): Use fputs instead of fprintf.
+ * Many files: Use DEBUGF instead of printf ("kdebug".
+ * debug.h (DEBUGF) [DEBUG]: Define this.
+
+ * xputenv.c (xputenv): Initialize that static saved_env_items to
+ null, just for documentation's sake.
+
+Tue Oct 18 13:19:06 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (KPSE_*_ENVS): Move environment variable list here.
+ * tex-file.h: Move them from here.
+
+ * tex-glyph.h: Doc fix.
+
+ * tex-file.c (kpse_find_file): Correct off-by-one in suffix
+ comparison. From toy@rtp.ericsson.se.
+
+Mon Oct 17 14:01:02 1994 Karl Berry <karl@cs.umb.edu>
+
+ * elt-dirs.c (do_subdir): Find a top-level subdir if it matches
+ the POST.
+
+ * db.c (kpse_db_search): Allow for the passed name including a
+ directory part, as in dpi600/cmr10.pk.
+ * tex-glyph.c (try_format): First search all specs with
+ must_exist=false.
+
+ * kpsexpand.c: New file, from te@informatik.uni-hannover.de.
+ * Makefile.in (kpsexpand): New target (a program).
+ (install-exec): Depend on, and install, kpsexpand.
+
+ * common.ac: Doc fix.
+
+ * cnf.c (do_line): Don't quit just because the variable is in the
+ environment. From te@informatik.uni-hannover.de.
+
+ * tex-glyph.c (PXL_BITMAP_SPEC): Remove this, we're not going to
+ support pxl1500.
+
+Sun Oct 16 20:46:26 1994 Karl Berry <karl@cs.umb.edu>
+
+ * kpathsea.texi: Make it clear that names of debugging bits can
+ never be used.
+
+Fri Oct 14 10:31:35 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Version 2.2.
+
+ * hash.c (hash_lookup) [DEBUG]: Cast to long, not int.
+
+Thu Oct 13 15:39:34 1994 Karl Berry <karl@owl>
+
+ * db.c (db_build): Warn if ls-R contains nothing useful.
+
+ * debug.c (fopen, fclose) [DEBUG]: fflush stdout.
+ * dir.c (dir_links),
+ * hash.c (hash_lookup),
+ * tex-file.c (kpse_init_format),
+ * elt-dirs.c (kpse_element_dirs): Likewise.
+
+Thu Oct 13 09:02:56 1994 Karl Berry <karl@cs.umb.edu>
+
+ * hash.c (kpse_debug_hash_lookup_int) [DEBUG]: New global.
+ (hash_lookup): Use it.
+ * hash.h [DEBUG]: Declare it.
+ * dir.c (dir_links) [DEBUG]: Set it and reset it.
+
+ * tex-glyph.c (PXL_BITMAP_SPEC): Add this (pxlNNN/cmr10.pk) for
+ the Bitstream utilities. From abrahams@acm.org.
+ (try_format): Search for this.
+
+Tue Oct 11 15:15:49 1994 Karl Berry <karl@cs.umb.edu>
+
+ * db.c (db_build): Use kpse_db_dir instead of KPSE_DB_DIR. This
+ avoids one variable expansion, and te@informatik.uni-hannover.de
+ says otherwise TeX sometimes can't find ls-R.
+
+Sun Oct 9 17:18:23 1994 Karl Berry <karl@cs.umb.edu>
+
+ * kdefault.c: Rename from default.c.
+ * Makefile.in (objects): Likewise.
+
+Fri Oct 7 12:58:33 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.c (kpse_init_format): Call INIT_MT for the any_glyph
+ case. From carson@lehman.com.
+
+Sun Oct 2 14:11:20 1994 Karl Berry <karl@cs.umb.edu>
+
+ * magstep.c: Doc fix.
+
+Sun Sep 25 17:11:40 1994 Karl Berry <karl@cs.umb.edu>
+
+ * Makefile.in: Include library.make.
+
+Thu Sep 22 15:34:40 1994 Karl Berry <karl@cs.umb.edu>
+
+ * tex-file.h (kpse_file_format_type): Don't make equal to the last
+ element index, make one more. From Eric Auborg.
+
+Thu Sep 15 19:24:30 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (distdir): Include install.texi in the distribution.
+
+Mon Sep 12 11:05:18 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Version 2.1.
+
+Sun Sep 11 15:03:18 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (install-data): Install texmf.cnf if it didn't exist.
+
+Sat Sep 10 13:28:29 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (texmf.sed, paths.h): Use tr 012 instead of \n.
+ From John Interrante.
+
+ * Makefile.in (distdir): Include the .aux and .cps files in the
+ distribution. Don't include paths.h (from John Interrante).
+
+ * kpathsea.texi: Fix overfull boxes and other TeX errors.
+
+Wed Sep 7 16:28:37 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Version 2.0.
+
+Tue Sep 6 10:33:18 1994 Karl Berry (karl@cs.umb.edu)
+
+ * dir.c (dir_links): Use %ld for ret, since it's now a long.
+
+Sat Sep 3 09:01:25 1994 Karl Berry (karl@cs.umb.edu)
+
+ * dir.c (dir_links): Use long instead of int for the cast and the
+ variable, to avoid warnings on the Alpha.
+
+ * c-std.h (SYSV, X_NOT_STDC_ENV): Don't define these here.
+ * c-memstr.h (SYSV): Define this.
+ (_XFUNCS_H_): And this.
+
+ * Makefile.in (distclean): Add texmf.cnf and texmf.sed.
+
+Thu Sep 1 14:22:48 1994 Karl Berry (karl@cs.umb.edu)
+
+ * xputenv.c (putenv): Declare this to avoid a warning.
+ * xstat.c (lstat): And this.
+
+ * common.ac (SMART_PUTENV): Use program to test for this. From
+ mike@cs.utah.edu.
+
+ * tex-glyph.c (try_fallback_resolutions): Quit early if there's no
+ resolutions in the list. From sanjoy@dope.caltech.edu.
+
+Tue Aug 30 14:26:48 1994 Karl Berry (karl@cs.umb.edu)
+
+ * acconfig.h (FOIL_X_WCHAR_T): New definition.
+
+ * c-std.h (hypot) [!hypot]: Conditionalize declaration.
+
+Fri Aug 26 09:00:24 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (install-data): Install headers into
+ $(includedir)/kpathsea, not just $(includedir). From john@wpi.edu.
+
+ * pathsearch.c (search): Show results of the search as well as the
+ start of it.
+
+Thu Aug 25 13:40:29 1994 Karl Berry (karl@cs.umb.edu)
+
+ * proginit.c (kpse_init_prog): Newline at end of fputs.
+
+ * pathsearch.c (search): Add debug statement.
+ * debug.h (KPSE_DEBUG_SEARCH): New bit.
+
+ * tex-file.h (kpse_format_info_type): Rename `font_override_p' from
+ `font_p'. Also `program_enabled' => `program_enabled_p'.
+ Also new member `suffix_search_only'.
+ * tex-file.c (kpse_find_file): Avoid searching for foo.tex.tex, etc.
+
+Tue Aug 16 09:29:59 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (maketex): Announce that we are running the script
+ before running it.
+
+Mon Aug 15 11:18:19 1994 Karl Berry (karl@cs.umb.edu)
+
+ * texmf.cnf.in (PKFONTS.xdvi): Write program-specific definition
+ to include gsftopk and ps2pk ``modes''.
+
+Sat Aug 13 16:34:43 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (lib): Rename to program to simplify rules.
+
+ * magstep.h: Doc fix.
+
+ * common.ac (AC_HAVE_FUNCS): Test for bcopy.
+
+Tue Aug 9 14:18:56 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (misstex): Prepend kpathsea: to the missfont.log
+ message.
+
+Mon Aug 8 17:53:58 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (set_maketex_mag): Rewrite to call kpse_magstep_fix.
+ * magstep.[ch]: New files.
+
+Fri Aug 5 14:07:51 1994 Karl Berry (karl@cs.umb.edu)
+
+ * db.c (match): Allow a trailing component in the filename.
+
+Tue Aug 2 08:55:21 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Change `debug:' to `kdebug:'.
+ * hash.c (hash_lookup): Print results of lookup if DEBUG_HASH.
+ * debug.h (KPSE_DEBUG_HASH): New bit, replacing DB_BUILD.
+ * db.c (db_build): Don't print the built hash table.
+
+ * db.c (match): Implement this. Petr Sojka and Zdenek Salvet(?)
+ supplied code for this, but I wound up writing my own.
+ * variable.c (expand): Do variable expansion on the value.
+
+ * texmf.cnf.in (TEXINPUTS): Put this after the .prog-specific entries.
+
+ * tex-file.c (kpse_pict_format): Remember to break after setting
+ the type.
+ (EXPAND_DEFAULT, init_path): Keep raw_path as pre-default expansion.
+
+Sun Jul 31 14:18:09 1994 Karl Berry (karl@cs.umb.edu)
+
+ * debug.c: Don't include debug.h, it's already in debug.h.
+
+ * Makefile.in (db.o,pathsearch.o): Don't need these special cases
+ since tossed db_dir from paths.make.
+ * db.h (DB_DIR): Change default to $TEXMF, rename to KPSE_DB_DIR.
+ (kpse_db_dir): New global variable (sigh).
+ * db.c (kpse_db_dir): Define.
+ * cnf.c: Include db.h for KPSE_DB_DIR.
+ (read_files): Set kpse_db_dir after all have been read.
+ * pathsearch.c (elt_in_db): Check if kpse_db_dir is null.
+ (path_search): Do not initialize db_dir.
+
+Sat Jul 30 06:12:12 1994 Karl Berry (karl@cs.umb.edu)
+
+ * c-dir.h [_POSIX_VERSION]: Remove this condition; just use DIRENT.
+
+Fri Jul 29 11:36:25 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.c (init_path): Look up cnf file value if no suffix.
+
+ * xstat.h (SAME_FILE_P): Move here.
+ * c-stat.h (SAME_FILE_P): From here.
+ * file-p.c: Change include.
+ * lib.h (dir_p, dir_links): Declare here.
+ * dir.h: Split into xopendir.h and c-dir.h; Sun 3 include files
+ get confused otherwise, according to john@minster.york.ac.uk.
+ * xopendir.c: Include xopendir.h.
+ * elt-dirs.c, dir.c: Change includes.
+
+Sun Jul 17 10:21:16 1994 Karl Berry (karl@cs.umb.edu)
+
+ * hash.c (hash_insert): Put new elements in at the end of the
+ list, instead of the beginning.
+ * hash.h: Document this.
+
+ * texmf.cnf.in (TEXMFROOT): Change to TEXMF.
+ * kpathsea.texi: Likewise.
+
+ * cnf.c (do_line): assert program_invocation_short_name.
+ * progname.c: Doc fix.
+
+ * absolute.[ch] (kpse_absolute_p): Take additional arg relative_ok.
+ * pathsearch.c (log_search): Call it (with false).
+ * tex-glyph.c: Change call.
+
+ * pathsearch.c (path_search): Initialize db_dir here.
+ (elt_in_db): Not here.
+
+Fri Jul 15 11:44:15 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.h: Doc fix.
+
+ * pathsearch.c (log_search): Pass in the whole str_list; anything
+ else is unreliable.
+
+ * proginit.[ch] (kpse_init_prog): Don't pass in argv0; we need it
+ earlier.
+
+Tue Jul 12 11:56:54 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.c (init_path): Use the first envvar that's *set*, not
+ the first in the list.
+
+ * tex-file.h (kpse_format_info_type): New member `type'.
+ * tex-file.c (kpse_init_format): Initialize it.
+
+ * pathsearch.c (log_search): New fn.
+ (search): Call it.
+
+Fri Jul 1 11:54:29 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.c: Doc fix.
+
+Mon Jun 27 10:18:59 1994 Karl Berry (karl@cs.umb.edu)
+
+ * db.c (db_build): Call kpse_var_expand on the db filename.
+ * pathsearch.c (elt_in_db): Likewise.
+
+ * tex-glyph.h (kpse_find_gf): By analogy with kpse_find_pk.
+
+Sat Jun 25 16:09:05 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (try_format): Try both Unix and DOS bitmap specs,
+ instead of just one or the other.
+ (bitmap_name): No longer needed.
+
+Fri Jun 24 11:52:32 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.c (kpse_find_file): Don't try the suffix if it doesn't
+ exist.
+
+ * tex-file.h (kpse_find_{dvips_header,pict}): New definition.
+
+Thu Jun 23 16:57:58 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.h (kpse_{pict,dvips_header}_format): New consts.
+ (KPSE_{PICT,DVIPS_HEADER}_ENVS): Likewise.
+
+Tue Jun 21 11:53:09 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.c (kpse_find_file): Try the name as given if the name
+ concatenated with the suffix fails, for the sake of, e.g., EPS files.
+
+ * tex-file.h (kpse_find_tex): New definition.
+
+ * absolute.[ch]: Make arg const.
+
+ * tex-glyph.[ch]: (kpse_bitmap_tolerance): Move here from tex-make.
+
+ * c-proto.h (P6[CH]): New definitions.
+
+ * Makefile.in (objects): Add proginit.o.
+ * proginit.[ch]: New files.
+
+Mon Jun 20 14:55:57 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.c (kpse_init_format): Make override path not apply to
+ TFM and VF files.
+
+ * tex-glyph.c (kpse_find_glyph_format): Rename to kpse_find_glyph,
+ and don't call MakeTeXPK if the filename is absolute.
+ * tex-glyph.h: Likewise.
+
+Sun Jun 19 11:00:50 1994 Karl Berry (karl@cs.umb.edu)
+
+ * common.ac (HAVE_PROGRAM_INVOCATION_NAME): Test for this.
+ * acconfig.h: #undef this by default.
+ * progname.[ch]: New files.
+ * Makefile.in (objects): Add progname.o.
+ * cnf.c (do_line): Check for .<progname> qualification.
+
+Sat Jun 18 16:55:36 1994 Karl Berry (karl@cs.umb.edu)
+
+ * elt-dirs.c (kpse_element_dirs): Avoid stats in leaf directories
+ found via a non-null post.
+
+Fri Jun 17 14:25:08 1994 Karl Berry (karl@cs.umb.edu)
+
+ * elt-dirs.c (kpse_element_dirs) [DEBUG]: Print the directory
+ expansion of the path element.
+
+ * str-llist.h: Doc fix.
+
+ * elt-dirs.c (do_subdir): Ignore anything beginning with ., not
+ just `.' and `..'.
+
+Tue Jun 14 11:53:49 1994 Karl Berry (karl@cs.umb.edu)
+
+ * dir.c (dir_links): Cache the lookups.
+
+ * elt-dirs.c (kpse_element_dirs): Don't expand the argument.
+ * expand.h (kpse_path_expand): New routine.
+ * expand.c: Define it.
+ * pathsearch.h: Doc fix.
+
+ * db.c, tex-file.c [DEBUG]: Prefix output lines with `debug:'.
+
+ * tex-file.h (kpse_format_info_type): Add cnf_path to the struct.
+ * tex-file.c (kpse_init_path): Print the cnf_path.
+ (init_path): Set it, instead of a local variable.
+
+ * pathsearch.c (path_search): Use !! for no-disk-search instead of
+ %%, because now % is the comment char in cnf files.
+ * kpathsea.texi: Document this. Also change all `Kpathsearch' to
+ `kpathsea'.
+
+Mon Jun 13 10:15:49 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.h (kpse_set_maketex_mag): Remove.
+ * tex-make.c (kpse_set_maketex_mag): Make static, remove kpse_
+ prefix, and use KPATHSEA_DPI and MAKETEX_BASE_DPI instead of args.
+
+Sun Jun 12 13:49:15 1994 Karl Berry (karl@cs.umb.edu)
+
+ * db.c (db_build): Put a header on the hash table.
+
+ * tex-glyph.c (try_format): Set extension and path after
+ kpse_init_format, natch.
+
+Sat Jun 11 14:26:34 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (objects): Add cnf.o.
+ * variable.c (expand): Call kpse_cnf_get if no envvar value.
+
+Fri Jun 10 11:20:23 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.h: Remove spec type and variable.
+
+Thu Jun 9 13:42:21 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (objects): Remove init-path.o.
+ * tex-file.c (kpse_find_file): Rewrite to initialize the paths
+ only once, and keep all path info in a structure.
+ * tex-file.h: Vastly simplify.
+ * tex-glyph.h (kpse_font_file_type): Move here, since it's really
+ only for glyphs.
+ * tex-glyph.c: Corresponding changes.
+ * debug.h (KPSE_DEBUG_PATHS): New debug bit.
+
+ * default.h, str-list.h: Doc fix.
+
+Tue May 31 10:06:51 1994 Karl Berry (karl@cs.umb.edu)
+
+ * debug.c: Doc fix.
+
+Mon May 23 11:50:03 1994 Karl Berry (karl@cs.umb.edu)
+
+ * c-fopen.h (FOPEN_A_MODE): Define this.
+ * tex-make.c (misstex, maketex): Split up kpse_make_tex into
+ these, and create missfont.log if appropriate.
+
+Sun May 22 17:39:52 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.h: Doc fix.
+
+Wed May 11 13:25:58 1994 Karl Berry (karl@cs.umb.edu)
+
+ * configure.in (AC_OUTPUT): Use just `Makefile' instead of
+ `./Makefile', to avoid a bug in Autoconf (through 1.10).
+
+Sun Apr 17 16:18:00 1994 Karl Berry (karl@ra.cs.umb.edu)
+
+ * debug.h: Prefix macros with KPSE_.
+ * db.c, dir.c: Change calls.
+
+ * common.ac: Remove :: VPATH stuff; that made it in to Autoconf 1.8.
+
+ * Makefile.in (top_srcdir): Define this for configure to substitute.
+
+Thu Apr 7 17:52:05 1994 Karl Berry (karl@ra.cs.umb.edu)
+
+ * debug.[ch]: Implement fopen/fclose tracing.
+
+Thu Mar 31 07:25:49 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.8.
+
+Thu Mar 24 10:01:20 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c: Doc fix.
+
+ * pathsearch.c (path_search): Don't search the disk if there is
+ magic in the path spec.
+
+ * db.c: Doc fix.
+
+Wed Mar 16 13:50:17 1994 Karl Berry (karl@cs.umb.edu)
+
+ * readable.c (kpse_readable_file): Complain if errno == EPERM.
+
+Sun Mar 13 11:14:19 1994 Karl Berry (karl@cs.umb.edu)
+
+ * pathsearch.h (kpse_path_search): Take an extra arg must_exist.
+ * pathsearch.c (kpse_path_search, search, path_search): Likewise.
+ * tex-file.c (kpse_find_file): Change call.
+ * tex-file.h (kpse_find_*): Change these calls, too.
+
+ * hash.c (hash_create): Don't use xcalloc to init pointers to null.
+
+ * db.c (kpse_db_search): Don't free the pointer after incrementing it.
+ From Frank Jensen.
+
+Sat Mar 12 17:55:36 1994 Karl Berry (karl@cs.umb.edu)
+
+ * db.h (kpse_db_search): Returns a pointer.
+ * db.c (kpse_db_search): If db can't be built, return NULL, else a
+ pointer to the (possibly empty) list.
+ (db_build): Return whether we found the file.
+ * pathsearch.c (path_search): Change call.
+
+Thu Mar 10 07:45:13 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (install-info): New target.
+
+Fri Mar 4 08:06:16 1994 Karl Berry (karl@cs.umb.edu)
+
+ * hash.c (hash): Change hash function to spread out the values a
+ bit better.
+
+ * debug.h (DEBUG_DB_BUILD): New debug bit.
+ * db.c (db_build) [DEBUG]: If bit is set, print hash table.
+ * hash.h (hash_print): Declare.
+
+Thu Mar 3 08:52:01 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.7.
+
+Sun Feb 27 15:57:30 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (objects): Add db.o, hash.o.
+ * db.[ch]: New files.
+ * hash.[ch]: Also new files.
+ * pathsearch.c (path_search): Try db search.
+ * tex-glyph.c, fontmap.c: Use general hash functions.
+
+Sat Feb 26 13:15:53 1994 Karl Berry (karl@cs.umb.edu)
+
+ * fontmap.c: Doc fix.
+
+ * pathsearch.c (INIT_ALLOC): Increase to 75, what the heck.
+
+Fri Feb 25 08:30:50 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-file.[ch]: Decare args const.
+
+Thu Feb 24 07:55:43 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.h: Include tex-file.h, not init-path.h.
+
+ * init-path.h (KPSE_*_{ENVS,PATHS}, kpse_font_override_path): Move
+ to tex-font.h.
+ * tex-font.h (kpse_find_{file,tfm,vf}): Also declare these.
+ * tex-font.c (kpse_find_file): Define these.
+ (kpse_font_override_path): Move definition here.
+
+ * tex-file.*: Rename from tex-font.*.
+ * GNUmakefile: Corresponding changes.
+
+ * elt-dirs.c (do_subdir): Only append the / once we know it's a
+ directory.
+
+Wed Feb 23 16:41:31 1994 Karl Berry (karl@cs.umb.edu)
+
+ * elt-dirs.c (do_subdir): Don't tack POST on if it is exactly the
+ d_name, so we can find a/b with a path of a//b.
+
+ * c-vararg.h (PVAR3[CH]): New defines.
+
+ * init-path.h: Include KPSE_*_{ENVS,PATHS} here.
+ (kpse_init_path): Take an additional arg font_p.
+ * init-path.c (kpse_override_path): Rename kpse_font_override_path.
+ (kpse_init_path): Only use kpse_font_override_font if font_p.
+
+Mon Feb 21 15:38:53 1994 Karl Berry (karl@cs.umb.edu)
+
+ * common.ac (extrasub): Define to remove VPATH lines if srcdir = `.'.
+
+Thu Feb 3 06:19:49 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.6.
+
+ * fn.c (fn_copy0): Remember to allocate space for the null.
+ Thanks, simon.
+
+Wed Feb 2 09:57:47 1994 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.h (KPSE_BITMAP_TOLERANCE): Move to here from tex-glyph.c
+ (kpse_check_bitmap_tolerance): Declare.
+ * tex-make.c (kpse_check_bitmap_tolerance): Define.
+
+Tue Feb 1 10:42:03 1994 Karl Berry (karl@cs.umb.edu)
+
+ * c-std.h (*alloc) [! _MALLOC_INTERNAL]: Make decl conditional.
+
+ * c-std.h [HAVE_STDLIB_H]: Change #if for including <stdlib.h> to this.
+ * common.ac (AC_HAVE_HEADERS): Check for stdlib.h.
+
+ * Makefile.in (paths.h): Do all substitutions globally.
+
+ * absolute.c [DOS]: Include c-ctype.h.
+ * tex-glyph.c (KPATHSEA_BITMAP_NAME) [DOS]: Double the backslash.
+ * elt-dirs.c (do_subdir) [!UNIX_ST_LINK]: Avoid dangling else.
+ From Wayne.
+
+ * paths.h.in: Doc fix.
+
+ * xputenv.c (xputenv): Check entire variable name for being saved,
+ not just a prefix of it.
+
+Mon Jan 31 12:05:30 1994 Karl Berry (karl@cs.umb.edu)
+
+ * fn.c (fn_copy0): Allocate LEN if that's bigger than CHUNK_SIZE.
+ (CHUNK_SIZE): Increase to 75.
+
+Sat Jan 22 15:36:08 1994 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.5.
+
+ * common.ac (AC_HAVE_FUNCS): Check for memmove.
+
+ * paths.h.in (DEFAULT_MF_PATH): Don't search just public/, cause
+ we need ams/.
+
+Mon Jan 17 15:09:36 1994 Karl Berry (karl@cs.umb.edu)
+
+ * paths.h.in (DEFAULT_{FMT,BASE}_PATH): Include `.'.
+
+Sun Jan 16 14:50:02 1994 Karl Berry (karl@cs.umb.edu)
+
+ * paths.h.in (DEFAULT_PK_PATH): Search subdirs of pk.
+
+Mon Jan 10 16:40:35 1994 Karl Berry (karl@cs.umb.edu)
+
+ * xputenv.c (xputenv): Don't try to be smart about saving/freeing
+ stuff if SMART_PUTENV is defined.
+
+ * c-std.h (assert) [!HAVE_ASSERT_H]: Define as nothing, to avoid
+ undefined references to assert.
+
+Tue Dec 21 16:28:13 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-std.h (SYSV) [STDC_HEADERS]: Define, to get around old X
+ include files under hpux.
+
+Sun Dec 19 13:06:15 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (objects): Put tex-font.o first.
+
+Sat Dec 18 15:03:57 1993 Karl Berry (karl@cs.umb.edu)
+
+ * config.h (GCC_WCHAR_T, _GCC_WCHAR_T): Remove these; I have
+ another theory now for wchar_t, done in xdvi.h and x11.c.
+
+Sat Dec 18 14:41:15 1993 Karl Berry (karl@owl.hq.ileaf.com)
+
+ * c-memstr.h ([r]index) [STDC_HEADERS]: Conditionalize #define.
+
+Tue Dec 14 17:43:30 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (paths.h): Change substitutions accordingly.
+ * paths.h.in (DEFAULT_FMT_PATH): Variable is now fmtdir.
+ (DEFAULT_{BIB,BST}_PATH): Variable is now texmf_prefix.
+
+Sat Dec 11 13:21:43 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (ABS): New macro.
+ (kpse_set_maketex_mag): Use it, instead of fabs.
+
+Fri Dec 10 15:31:16 1993 Karl Berry (karl@cs.umb.edu)
+
+ * xmalloc.c, xrealloc.c: Use exit instead of abort, remove abort
+ decls, and reword error messages to be less cryptic. From
+ john@minster.york.ac.uk.
+
+ * dir.h: use `defined' instead of just `DIRENT || _POSIX_VERSION'.
+ How annoying. From kretschm@aitxu3.ait.physik.uni-tuebingen.de.
+
+ * xputenv.c (putenv): Remove declaration, as different systems do
+ it differently. From kayvan@satyr.sylvan.com.
+
+Thu Dec 9 09:12:33 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (kpse_set_maketex_mag): Allow off-by-1 when deciding
+ if a dpi is a magstep.
+
+Tue Dec 7 11:03:51 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (kpse_set_maketex_mag): New routine from dvips,
+ called by dvipsk and xdvik to ensure consistency.
+ (magstep): Subroutine of above, also from dvips.
+ * tex-make.h: Declare it.
+
+ * tex-doc.texi: Correct menu item (from maechler@stat.math.ethz.ch).
+
+Fri Dec 3 12:53:38 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-pathmx.h: Doc fix.
+
+Sat Nov 27 14:36:11 1993 Karl Berry (karl@cs.umb.edu)
+
+ * default.h: Doc fix.
+
+ * paths.h.in (texfontdir): This has been renamed to fontdir.
+
+Sun Nov 21 08:28:41 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (distdir): Include HIER in the distribution, until
+ we merge it into the manual.
+
+Sun Nov 7 14:54:47 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-namemx.h (NAME_MAX): Avoid use of pathconf.
+ * c-pathmx.h: Doc fix.
+
+Thu Nov 4 14:50:45 1993 Karl Berry (karl@cs.umb.edu)
+
+ * config.h (_GCC_WCHAR_T) [!GCC_WCHAR]: Conditionalize.
+
+ * c-std.h (EXIT_SUCCESS) [!EXIT_SUCCESS]: Move these defines
+ outside of !STDC_HEADERS, for the sake of SunOS 4.1.1. (From
+ vonbrand@inf.utfsm.cl.)
+
+Wed Nov 3 14:43:05 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.4.
+
+Wed Nov 3 07:05:48 1993 Karl Berry (karl@cs.umb.edu)
+
+ * paths.h.in (DEFAULT_{BASE,FMT}_PATH): Had these definitions reversed.
+
+Fri Oct 29 19:27:36 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (try_fallback_resolutions): Initialize ret in all cases.
+
+Thu Oct 28 14:32:34 1993 Karl Berry (karl@cs.umb.edu)
+
+ * lib.h: Doc fix.
+
+ * common.h (AC_UNISTD_H): Replace this with unistd.h in the list
+ of HAVE_HEADERS.
+
+Tue Oct 26 13:59:33 1993 Karl Berry (karl@cs.umb.edu)
+
+ * str-llist.[ch]: New files.
+ * Makefile.in (objects): Add str_llist.o.
+ * elt-dirs.[ch]: Use str_llist_type throughout.
+ * pathsearch.c (dir_list_search): Take a str_llist_type, and float
+ a successful dir towards the top.
+ (path_search): Change call of kpse_element_dirs.
+
+Sun Oct 24 19:41:49 1993 Karl Berry (karl@cs.umb.edu)
+
+ * elt-dirs.c (do_optional): Remove this stub.
+ (expand_elt): Don't call it.
+
+Fri Oct 22 14:46:44 1993 Karl Berry (karl@cs.umb.edu)
+
+ * xmalloc.c, xrealloc.c, line.c, pathsearch.c: Doc fix.
+
+Tue Oct 19 12:11:32 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (try_fallback_resolutions): New routine.
+ (kpse_find_glyph_format): Call it, instead of repeating (the now
+ pretty complicated) code.
+ * tex-font.c (kpse_init_fallback_resolutions): Pass the value of
+ any environment variable, not its name. From R.Kooijman@et.tudelft.nl.
+
+ * c-memstr.h (str[r]chr) [!str[r]chr]: Conditionalize. From
+ maarrrk@seidel.ece.ucsb.edu.
+
+Tue Oct 12 16:26:48 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c: Doc fix.
+
+Thu Oct 7 13:13:57 1993 Karl Berry (karl@cs.umb.edu)
+
+ * xmalloc.c: Rewrite to not require <config.h>.
+ * xrealloc.c: Likewise.
+
+ * make-suffix.c (make_suffix): Declare variables const.
+ * remove-suffx.c (remove_suffix): Likewise. Also rename to
+ rm-suffix.c.
+ * xputenv.c (putenv): Declare with correct prototype.
+ * fontmap.c (internal routines): Likewise.
+ * line.c (xmalloc, xrealloc): Declare as void *.
+ (From john@minster.york.ac.uk.)
+
+Wed Oct 6 06:49:53 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.3.
+
+ * tilde.c (kpse_tilde_expand): Always return a malloc-ed value.
+ (From ken@cs.toronto.edu.)
+
+Sun Oct 3 14:11:33 1993 Karl Berry (karl@cs.umb.edu)
+
+ * config.h (_GCC_WCHAR_T): Define.
+
+Sat Oct 2 17:17:32 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (install-*): Don't reassign PATH, just invoke
+ mkdirchain explicitly.
+
+ * tex-glyph.c (KPATHSEA_BITMAP_NAME) [DOS]: Define what I think
+ will work for this ...
+
+ * paths.h.in: Doc fix.
+
+ * Makefile.in: Doc fix.
+
+ * tex-glyph.c (kpse_find_glyph_format): Unconditionally initialize
+ glyph_paths[*], since we might use them both in try_size. From
+ worsch@ira.uka.de.
+
+Fri Oct 1 12:02:11 1993 Karl Berry (karl@cs.umb.edu)
+
+ * expand.c: Doc fix.
+
+Wed Sep 29 15:21:49 1993 (karl@terminus.cs.umb.edu)
+
+ * Version 1.2.
+
+Sat Sep 25 14:12:00 1993 Karl Berry (karl@cs.umb.edu)
+
+ * pathsearch.c (path_search, absolute_search): Don't initialize
+ structs.
+
+Fri Sep 24 12:50:00 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (try_size): Skip the simultaneous stuff.
+ (try_format): Set the envvar here.
+ (bitmap_name): Not here.
+ * pathsearch.c (kpse_*_multi_search): Delete.
+ Change most other routines to take only a single name again,
+ instead of a name list.
+ * pathsearch.h: Delete decls.
+
+ * tex-glyph.c (init-path.h): Don't need to include this.
+
+ * tex-glyph.c (kpse_find_glyph_format): Try the fallback
+ resolutions for the fallback font.
+
+ * Makefile.in (warn_more, MAKEINFO_FLAGS) [hayley]: Define these
+ for development and distribution.
+
+ * Makefile.in (dvi): Make analogous to info (including use of new
+ suffix rule).
+
+ * tex-glyph.c (kpse_find_glyph_format): Set KPATHSEA_NAME to the
+ fallback font if we get that far.
+
+Wed Sep 15 19:29:56 1993 Karl Berry (karl@cs.umb.edu)
+
+ * filefmt.h (KPSE_*_PATH): Pass NULL as first arg.
+
+ * xputenv.c (xputenv): Rewrite again to save the variable names,
+ not the old items.
+
+Mon Sep 13 06:55:29 1993 Karl Berry (karl@cs.umb.edu)
+
+ * concatn.h: Doc fix.
+
+Sun Sep 12 15:54:55 1993 Karl Berry (karl@cs.umb.edu)
+
+ * lib.h (XTALLOC): Parenthesize the cast.
+
+ * xputenv.c (xputenv): Rewrite to collect some of the garbage.
+
+Fri Sep 10 14:00:35 1993 Karl Berry (karl@cs.umb.edu)
+
+ * lib.h (ENVVAR_SET_DEFAULT): No longer needed.
+
+ * xputenv.c (xputenv_int): New routine.
+
+Thu Sep 9 14:58:00 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c (MAKE_TEX_PK_SPEC): Change MAKETEX_DPI to
+ KPATHSEA_DPI.
+
+ * tex-glyph.c (try_fontmap): Use KPSE_GLYPH_PATH.
+ * filefmt.c (KPSE_GLYPH_{PATH,ENVS}): New macros.
+ (KPSE_{GF,PK}_ENVS): Use GLYPH_ENVS.
+
+ * tex-glyph.c (bitmap_name): Rewrite to use a variable spec,
+ introducing KPATHSEA_{BITMAP_NAME,FORMAT,DPI,NAME}.
+ (kpse_find_glyph_format): Set KPATHSEA_DPI instead of MAKETEX_DPI;
+ also set KPATHSEA_NAME.
+ (try_fontmap): Also set KPATHSEA_NAME here.
+ (try_size): Set KPATHSEA_DPI here.
+
+ * tex-glyph.c (try_name): Delete this routine.
+ (kpse_find_glyph_format): Try fallback resolutions here, call
+ try_resolution directly.
+ (try_fontmap): Call try_resolution directly.
+
+ * init-path.h: Need not include c-proto.h.
+
+Sun Aug 29 13:34:25 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-make.c: Doc fix.
+
+ * filefmt.h: Don't need c-proto.h or types.h.
+
+Fri Aug 27 10:36:46 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-vararg.h (PVAR2C): Take AP as an arg.
+
+ * init-path.[ch] (kpse_init_path): Take the current value as an
+ additional argument, separate from the default path, and always
+ expand_default.
+
+ * uppercasify.c (uppercasify): Don't discard upcased result!
+
+Thu Aug 26 10:36:28 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.1.
+
+Sun Aug 22 19:18:35 1993 Karl Berry (karl@cs.umb.edu)
+
+ * install-data (install-data): Replace nonexistent
+ $(kpath_includedir) with $(includedir), and define it. Also
+ remove c-auto.h.
+
+Thu Aug 5 09:03:22 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Version 1.0.
+
+Wed Aug 4 13:51:24 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (kpse_find_glyph_format): Fill in the font_file
+ struct in the maketex case.
+
+ * Makefile.in (info): Just depend on kpathsea.info, and rely on
+ new suffix rule to do the work.
+
+Tue Aug 3 17:50:40 1993 Karl Berry (karl@fishbowl.hq.ileaf.com)
+
+ * tex-glyph.c (try_name): Don't free expanded_name if we're
+ returning it.
+
+Tue Aug 3 10:13:43 1993 Karl Berry (karl@owl.hq.ileaf.com)
+
+ * version.c (kpathsea_version_string): Do not declare const.
+
+ * line.h (read_line): Protoize decl.
+
+Tue Aug 3 09:10:07 1993 Karl Berry (karl@blood.hq.ileaf.com)
+
+ * c-memstr.h (bcmp, bcopy, bzero) [!HAVE_BCOPY]: Conditionalize.
+
+ * putenv.c: Include <kpathsea/c-auto.h>, and use const when
+ calling memcpy.
+
+Sun Aug 1 08:48:49 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Add new features to manual.
+
+ * Makefile.in (objects): Include putenv.o.
+ * putenv.c: New file from gdb.
+ * common.ac: Test for putenv.
+
+Sat Jul 31 11:54:31 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (distclean): Remove paths.h.
+
+ * Most files: changes for traditional C compatibility.
+
+ * filefmt.h: Add new KPSE_..._PATH's for the other formats.
+ * paths.h.in: Add defaults.
+ * Makefile.in (paths.h): sed the values in.
+
+Fri Jul 30 17:23:10 1993 Karl Berry (karl@cs.umb.edu)
+
+ * filefmt.h (KPSE_VF_PATH): Add empty parens.
+
+ * tex-paths.h*: Rename to just paths.h*.
+
+Tue Jul 27 09:00:58 1993 Karl Berry (karl@cs.umb.edu)
+
+ * filefmt.h: Include tex-paths.h, and use default paths in
+ KPSE_..._PATH macros.
+
+ * find-suffix.c: Correct logic.
+
+ * filefmt.h: Include init-path.h.
+
+Sat Jul 24 10:44:21 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (kpse_find_glyph_format): Assign to it.
+ * tex-font.h (kpse_font_file_type): New member `source'.
+ (KPSE_FONT_FILE_SOURCE): Accessor macro.
+ (kpse_source_type): New type.
+
+Wed Jul 21 19:45:45 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (configclean): New target.
+
+Sun Jul 18 13:53:38 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tilde.[ch] (kpse_expand_tilde): Rename to kpse_tilde_expand.
+
+ * elt-dirs.c, pathsearch.c, tex-glyph.c: Replace calls to
+ kpse_expand_tilde with kpse_expand.
+ * expand.[ch]: New files.
+ * Makefile.in (objects): Add it.
+
+ * fn.[ch]: New files.
+ * elt-dirs.c (fn*): Moved to fn.c.
+ * tex-make.c, variable.c: Use the new routines.
+ * *obstack*: No longer needed.
+ * Makefile.in (objects): Appropriate changes.
+
+Sat Jul 17 13:25:25 1993 Karl Berry (karl@cs.umb.edu)
+
+ * concat.c: Doc fix.
+
+ * pathsearch.c (search, path_search): Expand variable references.
+
+ * itoa.c: New file.
+ * lib.h (itoa): Declare it.
+ * Makefile.in (objects): Add it.
+
+ * lib.h (ENVVAR_SET_DEFAULT): New macro.
+ * tex-glyph.c (kpse_find_glyph_format): Call it to set the dpi.
+
+Fri Jul 16 09:10:52 1993 Karl Berry (karl@cs.umb.edu)
+
+ * xputenv.c: New file.
+ * Makefile.in (objects): Add it.
+ * lib.h (xputenv): Declare it.
+
+ * c-obstack.h: New file.
+ * variable.[ch]: New files.
+ * Makefile.in (objects): Add it.
+
+ * uppercasify.c: New file.
+ * Makefile.in (objects): add it.
+ * lib.h (uppercasify): Declare it.
+
+Tue Jul 13 13:47:54 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (kpse_find_glyph_format): Simplify path initialization.
+ * filefmt.h: New file; add abbrevs for GF and PK inits.
+
+ * Makefile.in (objects): Add obstack.o and tex-make.o.
+ * obstack.[ch]: New files from GNU.
+ * concatn.[ch], tex-make.[ch]: New files.
+ * init-path.c: Doc fix.
+
+ * elt-dirs.c: Doc fix.
+ * readable.[ch]: Doc fixes.
+
+Sun Jul 11 13:37:02 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-font.h (kpse_font_format_type): Rename to kpse_file_format_type,
+ and include the other file formats.
+ * tex-glyph.c: Change uses.
+
+Tue Jul 6 08:09:10 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-font.c (kpse_fallback_font): Initialize to NULL.
+
+Mon Jul 5 08:23:09 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (try_size): Don't fill in FONT_FILE if it's null.
+
+ * tex-font.c (kpse_init_fallback_resolutions): Look for TEXSIZES
+ after the program-specific *SIZES var.
+
+ * tex-glyph.c (kpse_find_glyph_format): Use kpse_init_path.
+ * Makefile.in (objects): Add init_path.o.
+ * tex-font.[ch] (kpse_override_path): Move to init-path.[ch].
+ * init-path.[ch]: New files.
+ * c-vararg.h: New file.
+
+Sun Jul 4 11:26:17 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-font.c (kpse_init_fallback_resolutions): New routine.
+ * tex-font.h: Declare it, and companion return type.
+
+Fri Jul 2 10:43:11 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-glyph.c (kpse_find_glyph_format): Take first successful
+ fontmap entry.
+
+ * fontmap.c (map_file_parse): Take first % on line as starting the
+ comment, not the last.
+
+ * fontmap.c (map_insert): Always insert the new element.
+
+Thu Jul 1 19:21:35 1993 Karl Berry (karl@cs.umb.edu)
+
+ * fontmap.c (map_lookup): Return a list, not a single string.
+ (map_lookup_str): Likewise.
+ * fontmap.h (map_lookup): Change decl.
+ * tex-glyph.c (kpse_find_glyph_format): Change caller.
+
+Sat Jun 26 11:48:36 1993 Karl Berry (karl@cs.umb.edu)
+
+ * tex-font.h: Doc fix.
+
+Thu Jun 24 11:16:41 1993 Karl Berry (karl@cs.umb.edu)
+
+ * configure.in (MISSING_HEADERS): Toss in favor of HAVE_HEADERS. Sigh.
+ Also, move all this to an include file.
+ Change uses in several files.
+
+ * stat.h: Rename to c-stat.h, and change includers.
+
+ * Makefile.in (objects): Add tex-glyph.o.
+ * pathsearch.[ch] (kpse_*_multi_search): New routines.
+
+Sat Jun 19 11:37:18 1993 Karl Berry (karl@cs.umb.edu)
+
+ * str-list.c (str_list_free): New routine.
+
+Fri Jun 18 13:54:08 1993 Karl Berry (karl@cs.umb.edu)
+
+ * fontmap.c (map_create): Rewrite to use kpse_all_path_search.
+ Include const in various subroutines.
+
+Tue Jun 15 15:58:18 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Change <kpathsea/pathsrch.h> to pathsearch. Rename the files
+ themselves.
+
+ * elt-dirs.c (cache): Copy the key into our own storage, since it
+ comes from kpse_path_element and might get overwritten. Should we
+ copy all the values, too?
+
+Sun Jun 13 16:49:09 1993 Karl Berry (karl@cs.umb.edu)
+
+ * pathsearch.c (dir_list_search): Don't need to append the null
+ here; in fact, it's wrong, since then the final list might have
+ nulls in the middle.
+
+ * elt-dirs.c (dir_list_add): Correct check for new directory
+ already ending in /.
+
+Fri Jun 11 10:45:33 1993 Karl Berry (karl@cs.umb.edu)
+
+ * str-list.[ch]: New files.
+ * pathsrch.c: Use it for the dir_list routines.
+ * Many changes and new files throughout for new implementation
+ including TeX-font-lookup routines.
+
+Tue Jun 8 14:00:54 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Most files: Change `const string' (constant pointer) to `const
+ char *' (pointer to constant data). What a crock.
+
+Mon Jun 7 09:43:21 1993 Karl Berry (karl@cs.umb.edu)
+
+ * debug.[ch]: New files.
+ * config.h: Include debug.h.
+
+ * dir-p.c: Rename to dir.c.
+ (dir_links): New routine.
+
+ * c-std.h (assert.h) [!ASSERT_H_MISSING]: Include this.
+ * configure.in: Check for it with new macro AC_MISSING_HEADERS.
+
+Thu Jun 3 10:12:12 1993 Karl Berry (karl@cs.umb.edu)
+
+ * dirio.h (leaf_dir_p): No longer defined; rename to dir.h.
+ * xopendir.c, dir-p.c, pathsrch.c: Change include.
+
+Mon May 31 07:49:16 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-std.h (EXIT_{SUCCESS,FAILURE}): Define these if they're undefined.
+
+ * config.h: Use <kpathsea/...> instead "...".
+
+ * kpathlib.h: Had #ifndef protection messed up. Rename to lib.h.
+
+ * c-memstr.h (index, rindex) [!index, !rindex]: Make definitions
+ conditional.
+
+Tue May 25 10:07:00 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-{namemx,pathmx,pathch,...}.h: Doc fixes.
+
+ * c-systypes.h: New file.
+ * c-std.h: Include it.
+
+ * stat.h: New file.
+ * xstat.h: Include it.
+
+ * configure.in (AC_HAVE_HEADERS): Test for `pwd.h'.
+
+Sun May 23 19:06:22 1993 Karl Berry (karl@cs.umb.edu)
+
+ * pathsrch.[ch]: Doc fixes.
+
+Fri May 21 11:27:54 1993 Karl Berry (karl@cs.umb.edu)
+
+ * line.c (free): Declare.
+
+ * pathsrch.c, find-suffix.c: Change caller.
+ * c-pathch.h ({IS_,}{DIR,ENV}_SEP): Rename existing confusing
+ definitions to these. Suggested by rocky.
+
+Mon May 17 08:18:18 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Version 0.3.
+
+ * pathsrch.c (expand_default): Handle doubled colon and
+ nothing-but-colon cases.
+
+ * Write documentation, change Makefile accordingly.
+
+Thu May 13 16:32:34 1993 Karl Berry (karl@cs.umb.edu)
+
+ * c-std.h (popen) [VMS]: Make decl conditional, and include
+ <unixlib.h> and <unixio.h>.
+
+Mon May 10 07:12:50 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Version 0.2.
+
+ * version.c: Put in placeholder.
+
+Sun May 9 10:42:34 1993 Karl Berry (karl@cs.umb.edu)
+
+ * config.h (c-auto.h): Use <...> instead of "...".
+
+Tue May 4 14:54:41 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (info check dvi): New targets (that do nothing).
+
+Mon May 3 13:46:17 1993 Karl Berry (karl@claude.cs.umb.edu)
+
+ * Version 0.1.
+
+ * Use KPATHSEARCH_ prefix for various headers' cpp protections.
+
+Sun May 2 10:28:25 1993 Karl Berry (karl@cs.umb.edu)
+
+ * Makefile.in (dist): Depend on TAGS, and put it in the dist.
+
+ * Makefile.in (c-auto.h.in): Remove extra $(srcdir).
+
+Sun Apr 25 11:22:12 1993 Karl Berry (karl@cs.umb.edu)
+
+ * pathsrch.h: Include c-proto.h.
+
+ * make-suffix.c: New file.
+ * Makefile.in (objects): Add the .o.
+
+ * file-p.c: Use the SAME_FILE_P macro.
+
+ * fontmap.h: Include c-proto.h and types.h.
+
+ * lib.h: Rename to kpathlib.h.
+ * config.h: Include changed.
+
+ * c-proto.h, c-std.h: Doc fix.
+
+ * c-limits.h [LIMITS_H_MISSING]: Conditionalize include of c-std.h.
+
+ * xstat.h: Include c-std.h.
+
+ * Makefile.in (c-auto.h.in): Add unused warning to top.
+
+ * dirio.h: Include c-proto.h and types.h.
+
+Fri Apr 23 16:11:13 1993 Karl Berry (karl@cs.umb.edu)
+
+ * line.c: Don't include config.h, just declare xmalloc and
+ xrealloc explicitly.
+
+ * pathsrch.c: paths.h need not be included.
+
+ * Created.
+
+(This ChangeLog file public domain.)
diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am
new file mode 100644
index 00000000000..e118e001a54
--- /dev/null
+++ b/Build/source/texk/kpathsea/Makefile.am
@@ -0,0 +1,299 @@
+## $Id$
+## Makefile.am for the TeX Live subdirectory texk/kpathsea/
+##
+## Copyright 2015-2020 Karl Berry <tex-live@tug.org>
+## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+
+SUBDIRS = . doc man
+
+EXTRA_DIST = COPYING.LESSERv2 PROJECTS
+
+AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/..
+AM_CFLAGS = $(WARNING_CFLAGS)
+
+lib_LTLIBRARIES = libkpathsea.la
+
+libkpathsea_la_CPPFLAGS = $(AM_CPPFLAGS) -DMAKE_KPSE_DLL
+if have_EXEEXT
+libkpathsea_la_CPPFLAGS += -DEXEEXT=\"$(EXEEXT)\"
+endif have_EXEEXT
+
+libkpathsea_la_LDFLAGS = -bindir @bindir@ -no-undefined -version-info $(KPSE_LT_VERSINFO)
+
+libkpathsea_la_LIBADD = $(LTLIBOBJS)
+
+BUILT_SOURCES = paths.h
+
+## Put tex-file.c first, because it's what depends on the paths, and may
+## reduce frustration if the paths are wrong by doing it first.
+libkpathsea_la_SOURCES = \
+ tex-file.c \
+ absolute.c \
+ atou.c \
+ cnf.c \
+ concat.c \
+ concat3.c \
+ concatn.c \
+ db.c \
+ debug.c \
+ dir.c \
+ elt-dirs.c \
+ expand.c \
+ extend-fname.c \
+ file-p.c \
+ find-suffix.c \
+ fn.c \
+ fontmap.c \
+ hash.c \
+ kdefault.c \
+ kpathsea.c \
+ line.c \
+ magstep.c \
+ make-suffix.c \
+ path-elt.c \
+ pathsearch.c \
+ proginit.c \
+ progname.c \
+ readable.c \
+ rm-suffix.c \
+ str-list.c \
+ str-llist.c \
+ tex-glyph.c \
+ tex-hush.c \
+ tex-make.c \
+ tilde.c \
+ uppercasify.c \
+ variable.c \
+ version.c \
+ xbasename.c \
+ xcalloc.c \
+ xdirname.c \
+ xfopen.c \
+ xfseek.c \
+ xftell.c \
+ xgetcwd.c \
+ xmalloc.c \
+ xopendir.c \
+ xputenv.c \
+ xrealloc.c \
+ xstat.c \
+ xstrdup.c
+
+if !MINGW32
+libkpathsea_la_SOURCES += \
+ getopt.c \
+ getopt1.c
+endif !MINGW32
+
+if WIN32
+if MINGW32
+libkpathsea_la_SOURCES += \
+ mingw32.c \
+ xfseeko.c \
+ xftello.c
+else !MINGW32
+libkpathsea_la_SOURCES += \
+ win32lib.c
+endif !MINGW32
+libkpathsea_la_SOURCES += \
+ knj.c
+SUBDIRS += win32
+else !WIN32
+libkpathsea_la_SOURCES += \
+ xfseeko.c \
+ xftello.c
+endif !WIN32
+
+$(libkpathsea_la_OBJECTS): paths.h kpathsea.h
+
+EXTRA_DIST += \
+ putenv.c
+
+kpseincludedir = ${includedir}/kpathsea
+
+nodist_kpseinclude_HEADERS = \
+ c-auto.h \
+ kpathsea.h \
+ paths.h
+
+kpseinclude_HEADERS = config.h $(direct_headers) $(indirect_headers)
+
+# Headers included directly into kpathsea.h
+#
+direct_headers = \
+ absolute.h \
+ c-dir.h \
+ c-fopen.h \
+ c-namemx.h \
+ c-pathch.h \
+ c-pathmx.h \
+ c-stat.h \
+ cnf.h \
+ concatn.h \
+ expand.h \
+ getopt.h \
+ line.h \
+ magstep.h \
+ pathsearch.h \
+ proginit.h \
+ readable.h \
+ tex-glyph.h \
+ tex-hush.h \
+ tex-make.h \
+ variable.h \
+ version.h
+
+# Headers included indirectly into kpathsea.h
+#
+indirect_headers = \
+ c-ctype.h \
+ c-errno.h \
+ c-limits.h \
+ c-memstr.h \
+ c-minmax.h \
+ c-proto.h \
+ c-std.h \
+ c-unistd.h \
+ debug.h \
+ hash.h \
+ knj.h \
+ lib.h \
+ mingw32.h \
+ progname.h \
+ simpletypes.h \
+ str-list.h \
+ str-llist.h \
+ systypes.h \
+ tex-file.h \
+ types.h \
+ win32lib.h
+
+noinst_HEADERS = \
+ db.h \
+ default.h \
+ fn.h \
+ fontmap.h \
+ tilde.h \
+ xopendir.h \
+ xstat.h
+
+pkgconfigdir = ${libdir}/pkgconfig
+
+pkgconfig_DATA = kpathsea.pc
+
+## Handle backslash continuations, then null out comments and
+## leading/trailing whitespace. An awk script does the rest.
+##
+## We don't want to rewrite paths.h when we have only changed comments
+## in texmf.cnf that have no effect on paths.h, since that would cause
+## almost everything to be rebuilt.
+##
+paths.h: stamp-paths
+stamp-paths: texmf.cnf bsnl.awk cnf-to-paths.awk
+# ensure grep is not completely broken, e.g., from GREP_OPTIONS.
+ echo a | grep -v b >/dev/null || { echo "*** grep broken, goodbye."; exit 1; }
+#
+# generate paths.h without build machine directories.
+ echo "/* paths.h: Generated from texmf.cnf. */" >paths.tmp
+ $(AWK) -f $(srcdir)/bsnl.awk $(srcdir)/texmf.cnf \
+ | sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' \
+ | $(AWK) -f $(srcdir)/cnf-to-paths.awk \
+ >>paths.tmp
+ @if cmp -s paths.h paths.tmp 2>/dev/null; then \
+ echo "paths.h is unchanged"; \
+ else \
+ echo "cp paths.tmp paths.h"; \
+ cp paths.tmp paths.h; \
+ fi
+ rm -f paths.tmp
+ date >$@
+
+## Similarly we don't want to rewrite kpathsea.h when only Makefile has
+## been remade but kpathsea.h remains the same.
+##
+kpathsea.h: stamp-kpathsea
+stamp-kpathsea: Makefile paths.h
+ $(AM_V_GEN)rm -f $@; \
+ ( echo '/* This is a generated file */'; \
+ echo '/* collecting all public kpathsea headers. */'; \
+ for f in config.h paths.h $(direct_headers); do \
+ echo "#include <kpathsea/$$f>"; \
+ done ) >kpathsea.tmp && \
+ if cmp -s kpathsea.h kpathsea.tmp 2>/dev/null; then \
+ echo "kpathsea.h is unchanged"; \
+ else \
+ echo "generated kpathsea.h"; \
+ cp kpathsea.tmp kpathsea.h; \
+ fi && rm -f kpathsea.tmp && date >$@
+
+EXTRA_DIST += bsnl.awk cnf-to-paths.awk
+
+DISTCLEANFILES = paths.h stamp-paths kpathsea.h
+
+## The programs
+bin_PROGRAMS = kpseaccess kpsereadlink kpsestat kpsewhich
+
+kpseaccess_SOURCES = access.c
+
+kpsereadlink_SOURCES = readlink.c
+
+kpsewhich_LDADD = libkpathsea.la
+
+EXTRA_PROGRAMS = progname-test xdirtest
+
+progname_test_CPPFLAGS = $(AM_CPPFLAGS) -DMAKE_KPSE_DLL -DTEST
+progname_test_SOURCES = progname.c
+progname_test_LDADD = libkpathsea.la
+
+xdirtest_LDADD = libkpathsea.la
+
+## The scripts and their data
+web2cdir = $(datarootdir)/texmf-dist/web2c
+
+dist_noinst_DATA = texmf.cnf
+
+install-data-local: installdirs-am
+ $(MKDIR_P) '$(DESTDIR)$(web2cdir)'
+ @for f in $(dist_noinst_DATA); do \
+ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \
+ || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \
+ echo " $(INSTALL_DATA) '$(srcdir)/$$f' '$(DESTDIR)$(web2cdir)/$$f'"; \
+ $(INSTALL_DATA) "$(srcdir)/$$f" "$(DESTDIR)$(web2cdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-local:
+ @for f in $(dist_noinst_DATA); do \
+ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1; then \
+ echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(web2cdir)/$$f"; \
+ else :; fi; \
+ done
+
+## Tests
+AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S;
+AM_TESTS_ENVIRONMENT += LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
+#
+TESTS = tests/cnfline.test tests/cnfnewline.test
+TESTS += tests/cnfnull.test tests/cnfprog.test
+TESTS += tests/kpseaccess.test
+TESTS += tests/kpsereadlink.test tests/kpsestat.test tests/kpsewhich.test
+#
+tests/cnfline.log tests/cnfnewline.log tests/cnfnull.log tests/cnfprog.log \
+ tests/kpsewhich.log: kpsewhich$(EXEEXT)
+tests/kpseaccess.log: kpseaccess$(EXEEXT)
+tests/kpsereadlink.log: kpsereadlink$(EXEEXT)
+tests/kpsestat.log: kpsestat$(EXEEXT)
+#
+EXTRA_DIST += $(TESTS)
+EXTRA_DIST += tests/cnfline/texmf.cnf
+EXTRA_DIST += tests/cnfnewline/texmf.cnf
+EXTRA_DIST += tests/cnfprog/texmf.cnf
+
+# Rebuild
+rebuild_prereq =
+rebuild_target = all-am
+CLEANFILES =
+
+include $(srcdir)/../../am/rebuild.am
diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in
new file mode 100644
index 00000000000..8ddac691a32
--- /dev/null
+++ b/Build/source/texk/kpathsea/Makefile.in
@@ -0,0 +1,2465 @@
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2020 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@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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@
+@have_EXEEXT_TRUE@am__append_1 = -DEXEEXT=\"$(EXEEXT)\"
+@MINGW32_FALSE@am__append_2 = \
+@MINGW32_FALSE@ getopt.c \
+@MINGW32_FALSE@ getopt1.c
+
+@MINGW32_TRUE@@WIN32_TRUE@am__append_3 = \
+@MINGW32_TRUE@@WIN32_TRUE@ mingw32.c \
+@MINGW32_TRUE@@WIN32_TRUE@ xfseeko.c \
+@MINGW32_TRUE@@WIN32_TRUE@ xftello.c
+
+@MINGW32_FALSE@@WIN32_TRUE@am__append_4 = \
+@MINGW32_FALSE@@WIN32_TRUE@ win32lib.c
+
+@WIN32_TRUE@am__append_5 = \
+@WIN32_TRUE@ knj.c
+
+@WIN32_TRUE@am__append_6 = win32
+@WIN32_FALSE@am__append_7 = \
+@WIN32_FALSE@ xfseeko.c \
+@WIN32_FALSE@ xftello.c
+
+bin_PROGRAMS = kpseaccess$(EXEEXT) kpsereadlink$(EXEEXT) \
+ kpsestat$(EXEEXT) kpsewhich$(EXEEXT)
+EXTRA_PROGRAMS = progname-test$(EXEEXT) xdirtest$(EXEEXT)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \
+ $(top_srcdir)/../../m4/kpse-lib-version.m4 \
+ $(top_srcdir)/../../m4/kpse-mktex.m4 \
+ $(top_srcdir)/../../m4/kpse-warnings.m4 \
+ $(top_srcdir)/../../m4/kpse-win32.m4 \
+ $(top_srcdir)/../../m4/libtool.m4 \
+ $(top_srcdir)/../../m4/ltoptions.m4 \
+ $(top_srcdir)/../../m4/ltsugar.m4 \
+ $(top_srcdir)/../../m4/ltversion.m4 \
+ $(top_srcdir)/../../m4/lt~obsolete.m4 $(top_srcdir)/version.ac \
+ $(top_srcdir)/../../version.ac $(top_srcdir)/ac/mktex.ac \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(dist_noinst_DATA) \
+ $(kpseinclude_HEADERS) $(noinst_HEADERS) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = c-auto.h
+CONFIG_CLEAN_FILES = kpathsea.pc
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(kpseincludedir)" \
+ "$(DESTDIR)$(kpseincludedir)"
+PROGRAMS = $(bin_PROGRAMS)
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libkpathsea_la_DEPENDENCIES = $(LTLIBOBJS)
+am__libkpathsea_la_SOURCES_DIST = tex-file.c absolute.c atou.c cnf.c \
+ concat.c concat3.c concatn.c db.c debug.c dir.c elt-dirs.c \
+ expand.c extend-fname.c file-p.c find-suffix.c fn.c fontmap.c \
+ hash.c kdefault.c kpathsea.c line.c magstep.c make-suffix.c \
+ path-elt.c pathsearch.c proginit.c progname.c readable.c \
+ rm-suffix.c str-list.c str-llist.c tex-glyph.c tex-hush.c \
+ tex-make.c tilde.c uppercasify.c variable.c version.c \
+ xbasename.c xcalloc.c xdirname.c xfopen.c xfseek.c xftell.c \
+ xgetcwd.c xmalloc.c xopendir.c xputenv.c xrealloc.c xstat.c \
+ xstrdup.c getopt.c getopt1.c mingw32.c xfseeko.c xftello.c \
+ win32lib.c knj.c
+@MINGW32_FALSE@am__objects_1 = libkpathsea_la-getopt.lo \
+@MINGW32_FALSE@ libkpathsea_la-getopt1.lo
+@MINGW32_TRUE@@WIN32_TRUE@am__objects_2 = libkpathsea_la-mingw32.lo \
+@MINGW32_TRUE@@WIN32_TRUE@ libkpathsea_la-xfseeko.lo \
+@MINGW32_TRUE@@WIN32_TRUE@ libkpathsea_la-xftello.lo
+@MINGW32_FALSE@@WIN32_TRUE@am__objects_3 = libkpathsea_la-win32lib.lo
+@WIN32_TRUE@am__objects_4 = libkpathsea_la-knj.lo
+@WIN32_FALSE@am__objects_5 = libkpathsea_la-xfseeko.lo \
+@WIN32_FALSE@ libkpathsea_la-xftello.lo
+am_libkpathsea_la_OBJECTS = libkpathsea_la-tex-file.lo \
+ libkpathsea_la-absolute.lo libkpathsea_la-atou.lo \
+ libkpathsea_la-cnf.lo libkpathsea_la-concat.lo \
+ libkpathsea_la-concat3.lo libkpathsea_la-concatn.lo \
+ libkpathsea_la-db.lo libkpathsea_la-debug.lo \
+ libkpathsea_la-dir.lo libkpathsea_la-elt-dirs.lo \
+ libkpathsea_la-expand.lo libkpathsea_la-extend-fname.lo \
+ libkpathsea_la-file-p.lo libkpathsea_la-find-suffix.lo \
+ libkpathsea_la-fn.lo libkpathsea_la-fontmap.lo \
+ libkpathsea_la-hash.lo libkpathsea_la-kdefault.lo \
+ libkpathsea_la-kpathsea.lo libkpathsea_la-line.lo \
+ libkpathsea_la-magstep.lo libkpathsea_la-make-suffix.lo \
+ libkpathsea_la-path-elt.lo libkpathsea_la-pathsearch.lo \
+ libkpathsea_la-proginit.lo libkpathsea_la-progname.lo \
+ libkpathsea_la-readable.lo libkpathsea_la-rm-suffix.lo \
+ libkpathsea_la-str-list.lo libkpathsea_la-str-llist.lo \
+ libkpathsea_la-tex-glyph.lo libkpathsea_la-tex-hush.lo \
+ libkpathsea_la-tex-make.lo libkpathsea_la-tilde.lo \
+ libkpathsea_la-uppercasify.lo libkpathsea_la-variable.lo \
+ libkpathsea_la-version.lo libkpathsea_la-xbasename.lo \
+ libkpathsea_la-xcalloc.lo libkpathsea_la-xdirname.lo \
+ libkpathsea_la-xfopen.lo libkpathsea_la-xfseek.lo \
+ libkpathsea_la-xftell.lo libkpathsea_la-xgetcwd.lo \
+ libkpathsea_la-xmalloc.lo libkpathsea_la-xopendir.lo \
+ libkpathsea_la-xputenv.lo libkpathsea_la-xrealloc.lo \
+ libkpathsea_la-xstat.lo libkpathsea_la-xstrdup.lo \
+ $(am__objects_1) $(am__objects_2) $(am__objects_3) \
+ $(am__objects_4) $(am__objects_5)
+libkpathsea_la_OBJECTS = $(am_libkpathsea_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libkpathsea_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libkpathsea_la_LDFLAGS) $(LDFLAGS) -o \
+ $@
+am_kpseaccess_OBJECTS = access.$(OBJEXT)
+kpseaccess_OBJECTS = $(am_kpseaccess_OBJECTS)
+kpseaccess_LDADD = $(LDADD)
+am_kpsereadlink_OBJECTS = readlink.$(OBJEXT)
+kpsereadlink_OBJECTS = $(am_kpsereadlink_OBJECTS)
+kpsereadlink_LDADD = $(LDADD)
+kpsestat_SOURCES = kpsestat.c
+kpsestat_OBJECTS = kpsestat.$(OBJEXT)
+kpsestat_LDADD = $(LDADD)
+kpsewhich_SOURCES = kpsewhich.c
+kpsewhich_OBJECTS = kpsewhich.$(OBJEXT)
+kpsewhich_DEPENDENCIES = libkpathsea.la
+am_progname_test_OBJECTS = progname_test-progname.$(OBJEXT)
+progname_test_OBJECTS = $(am_progname_test_OBJECTS)
+progname_test_DEPENDENCIES = libkpathsea.la
+xdirtest_SOURCES = xdirtest.c
+xdirtest_OBJECTS = xdirtest.$(OBJEXT)
+xdirtest_DEPENDENCIES = libkpathsea.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = $(DEPDIR)/putenv.Plo ./$(DEPDIR)/access.Po \
+ ./$(DEPDIR)/kpsestat.Po ./$(DEPDIR)/kpsewhich.Po \
+ ./$(DEPDIR)/libkpathsea_la-absolute.Plo \
+ ./$(DEPDIR)/libkpathsea_la-atou.Plo \
+ ./$(DEPDIR)/libkpathsea_la-cnf.Plo \
+ ./$(DEPDIR)/libkpathsea_la-concat.Plo \
+ ./$(DEPDIR)/libkpathsea_la-concat3.Plo \
+ ./$(DEPDIR)/libkpathsea_la-concatn.Plo \
+ ./$(DEPDIR)/libkpathsea_la-db.Plo \
+ ./$(DEPDIR)/libkpathsea_la-debug.Plo \
+ ./$(DEPDIR)/libkpathsea_la-dir.Plo \
+ ./$(DEPDIR)/libkpathsea_la-elt-dirs.Plo \
+ ./$(DEPDIR)/libkpathsea_la-expand.Plo \
+ ./$(DEPDIR)/libkpathsea_la-extend-fname.Plo \
+ ./$(DEPDIR)/libkpathsea_la-file-p.Plo \
+ ./$(DEPDIR)/libkpathsea_la-find-suffix.Plo \
+ ./$(DEPDIR)/libkpathsea_la-fn.Plo \
+ ./$(DEPDIR)/libkpathsea_la-fontmap.Plo \
+ ./$(DEPDIR)/libkpathsea_la-getopt.Plo \
+ ./$(DEPDIR)/libkpathsea_la-getopt1.Plo \
+ ./$(DEPDIR)/libkpathsea_la-hash.Plo \
+ ./$(DEPDIR)/libkpathsea_la-kdefault.Plo \
+ ./$(DEPDIR)/libkpathsea_la-knj.Plo \
+ ./$(DEPDIR)/libkpathsea_la-kpathsea.Plo \
+ ./$(DEPDIR)/libkpathsea_la-line.Plo \
+ ./$(DEPDIR)/libkpathsea_la-magstep.Plo \
+ ./$(DEPDIR)/libkpathsea_la-make-suffix.Plo \
+ ./$(DEPDIR)/libkpathsea_la-mingw32.Plo \
+ ./$(DEPDIR)/libkpathsea_la-path-elt.Plo \
+ ./$(DEPDIR)/libkpathsea_la-pathsearch.Plo \
+ ./$(DEPDIR)/libkpathsea_la-proginit.Plo \
+ ./$(DEPDIR)/libkpathsea_la-progname.Plo \
+ ./$(DEPDIR)/libkpathsea_la-readable.Plo \
+ ./$(DEPDIR)/libkpathsea_la-rm-suffix.Plo \
+ ./$(DEPDIR)/libkpathsea_la-str-list.Plo \
+ ./$(DEPDIR)/libkpathsea_la-str-llist.Plo \
+ ./$(DEPDIR)/libkpathsea_la-tex-file.Plo \
+ ./$(DEPDIR)/libkpathsea_la-tex-glyph.Plo \
+ ./$(DEPDIR)/libkpathsea_la-tex-hush.Plo \
+ ./$(DEPDIR)/libkpathsea_la-tex-make.Plo \
+ ./$(DEPDIR)/libkpathsea_la-tilde.Plo \
+ ./$(DEPDIR)/libkpathsea_la-uppercasify.Plo \
+ ./$(DEPDIR)/libkpathsea_la-variable.Plo \
+ ./$(DEPDIR)/libkpathsea_la-version.Plo \
+ ./$(DEPDIR)/libkpathsea_la-win32lib.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xbasename.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xcalloc.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xdirname.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xfopen.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xfseek.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xfseeko.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xftell.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xftello.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xgetcwd.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xmalloc.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xopendir.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xputenv.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xrealloc.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xstat.Plo \
+ ./$(DEPDIR)/libkpathsea_la-xstrdup.Plo \
+ ./$(DEPDIR)/progname_test-progname.Po ./$(DEPDIR)/readlink.Po \
+ ./$(DEPDIR)/xdirtest.Po
+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_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+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_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libkpathsea_la_SOURCES) $(kpseaccess_SOURCES) \
+ $(kpsereadlink_SOURCES) kpsestat.c kpsewhich.c \
+ $(progname_test_SOURCES) xdirtest.c
+DIST_SOURCES = $(am__libkpathsea_la_SOURCES_DIST) \
+ $(kpseaccess_SOURCES) $(kpsereadlink_SOURCES) kpsestat.c \
+ kpsewhich.c $(progname_test_SOURCES) xdirtest.c
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-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 \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(dist_noinst_DATA) $(pkgconfig_DATA)
+HEADERS = $(kpseinclude_HEADERS) $(nodist_kpseinclude_HEADERS) \
+ $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope check recheck distdir distdir-am dist dist-all \
+ distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ c-auto.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# 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. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(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='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/../../build-aux/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+DIST_SUBDIRS = . doc man win32
+am__DIST_COMMON = $(srcdir)/../../am/rebuild.am $(srcdir)/Makefile.in \
+ $(srcdir)/c-auto.in $(srcdir)/kpathsea.pc.in \
+ $(top_srcdir)/../../build-aux/compile \
+ $(top_srcdir)/../../build-aux/config.guess \
+ $(top_srcdir)/../../build-aux/config.sub \
+ $(top_srcdir)/../../build-aux/depcomp \
+ $(top_srcdir)/../../build-aux/install-sh \
+ $(top_srcdir)/../../build-aux/ltmain.sh \
+ $(top_srcdir)/../../build-aux/missing \
+ $(top_srcdir)/../../build-aux/test-driver \
+ ../../build-aux/ar-lib ../../build-aux/compile \
+ ../../build-aux/config.guess ../../build-aux/config.sub \
+ ../../build-aux/depcomp ../../build-aux/install-sh \
+ ../../build-aux/ltmain.sh ../../build-aux/missing \
+ ../../build-aux/texinfo.tex ../../build-aux/ylwrap AUTHORS \
+ ChangeLog NEWS README putenv.c
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_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
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KPSEVERSION = @KPSEVERSION@
+KPSE_LT_VERSINFO = @KPSE_LT_VERSINFO@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_OBJDIR = @LT_OBJDIR@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+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@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WEB2CVERSION = @WEB2CVERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+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@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = . doc man $(am__append_6)
+#
+EXTRA_DIST = COPYING.LESSERv2 PROJECTS putenv.c bsnl.awk \
+ cnf-to-paths.awk $(TESTS) tests/cnfline/texmf.cnf \
+ tests/cnfnewline/texmf.cnf tests/cnfprog/texmf.cnf
+AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/..
+AM_CFLAGS = $(WARNING_CFLAGS)
+lib_LTLIBRARIES = libkpathsea.la
+libkpathsea_la_CPPFLAGS = $(AM_CPPFLAGS) -DMAKE_KPSE_DLL \
+ $(am__append_1)
+libkpathsea_la_LDFLAGS = -bindir @bindir@ -no-undefined -version-info $(KPSE_LT_VERSINFO)
+libkpathsea_la_LIBADD = $(LTLIBOBJS)
+BUILT_SOURCES = paths.h
+libkpathsea_la_SOURCES = tex-file.c absolute.c atou.c cnf.c concat.c \
+ concat3.c concatn.c db.c debug.c dir.c elt-dirs.c expand.c \
+ extend-fname.c file-p.c find-suffix.c fn.c fontmap.c hash.c \
+ kdefault.c kpathsea.c line.c magstep.c make-suffix.c \
+ path-elt.c pathsearch.c proginit.c progname.c readable.c \
+ rm-suffix.c str-list.c str-llist.c tex-glyph.c tex-hush.c \
+ tex-make.c tilde.c uppercasify.c variable.c version.c \
+ xbasename.c xcalloc.c xdirname.c xfopen.c xfseek.c xftell.c \
+ xgetcwd.c xmalloc.c xopendir.c xputenv.c xrealloc.c xstat.c \
+ xstrdup.c $(am__append_2) $(am__append_3) $(am__append_4) \
+ $(am__append_5) $(am__append_7)
+kpseincludedir = ${includedir}/kpathsea
+nodist_kpseinclude_HEADERS = \
+ c-auto.h \
+ kpathsea.h \
+ paths.h
+
+kpseinclude_HEADERS = config.h $(direct_headers) $(indirect_headers)
+
+# Headers included directly into kpathsea.h
+#
+direct_headers = \
+ absolute.h \
+ c-dir.h \
+ c-fopen.h \
+ c-namemx.h \
+ c-pathch.h \
+ c-pathmx.h \
+ c-stat.h \
+ cnf.h \
+ concatn.h \
+ expand.h \
+ getopt.h \
+ line.h \
+ magstep.h \
+ pathsearch.h \
+ proginit.h \
+ readable.h \
+ tex-glyph.h \
+ tex-hush.h \
+ tex-make.h \
+ variable.h \
+ version.h
+
+
+# Headers included indirectly into kpathsea.h
+#
+indirect_headers = \
+ c-ctype.h \
+ c-errno.h \
+ c-limits.h \
+ c-memstr.h \
+ c-minmax.h \
+ c-proto.h \
+ c-std.h \
+ c-unistd.h \
+ debug.h \
+ hash.h \
+ knj.h \
+ lib.h \
+ mingw32.h \
+ progname.h \
+ simpletypes.h \
+ str-list.h \
+ str-llist.h \
+ systypes.h \
+ tex-file.h \
+ types.h \
+ win32lib.h
+
+noinst_HEADERS = \
+ db.h \
+ default.h \
+ fn.h \
+ fontmap.h \
+ tilde.h \
+ xopendir.h \
+ xstat.h
+
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = kpathsea.pc
+DISTCLEANFILES = paths.h stamp-paths kpathsea.h
+kpseaccess_SOURCES = access.c
+kpsereadlink_SOURCES = readlink.c
+kpsewhich_LDADD = libkpathsea.la
+progname_test_CPPFLAGS = $(AM_CPPFLAGS) -DMAKE_KPSE_DLL -DTEST
+progname_test_SOURCES = progname.c
+progname_test_LDADD = libkpathsea.la
+xdirtest_LDADD = libkpathsea.la
+web2cdir = $(datarootdir)/texmf-dist/web2c
+dist_noinst_DATA = texmf.cnf
+AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S; \
+ LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
+#
+TESTS = tests/cnfline.test tests/cnfnewline.test tests/cnfnull.test \
+ tests/cnfprog.test tests/kpseaccess.test \
+ tests/kpsereadlink.test tests/kpsestat.test \
+ tests/kpsewhich.test
+
+# Rebuild
+rebuild_prereq =
+rebuild_target = all-am
+CLEANFILES = rebuild.stamp
+all: $(BUILT_SOURCES) c-auto.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../am/rebuild.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign 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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+ esac;
+$(srcdir)/../../am/rebuild.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+c-auto.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/c-auto.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status c-auto.h
+$(srcdir)/c-auto.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f c-auto.h stamp-h1
+kpathsea.pc: $(top_builddir)/config.status $(srcdir)/kpathsea.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ 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
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @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 " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ 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)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libkpathsea.la: $(libkpathsea_la_OBJECTS) $(libkpathsea_la_DEPENDENCIES) $(EXTRA_libkpathsea_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libkpathsea_la_LINK) -rpath $(libdir) $(libkpathsea_la_OBJECTS) $(libkpathsea_la_LIBADD) $(LIBS)
+
+kpseaccess$(EXEEXT): $(kpseaccess_OBJECTS) $(kpseaccess_DEPENDENCIES) $(EXTRA_kpseaccess_DEPENDENCIES)
+ @rm -f kpseaccess$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(kpseaccess_OBJECTS) $(kpseaccess_LDADD) $(LIBS)
+
+kpsereadlink$(EXEEXT): $(kpsereadlink_OBJECTS) $(kpsereadlink_DEPENDENCIES) $(EXTRA_kpsereadlink_DEPENDENCIES)
+ @rm -f kpsereadlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(kpsereadlink_OBJECTS) $(kpsereadlink_LDADD) $(LIBS)
+
+kpsestat$(EXEEXT): $(kpsestat_OBJECTS) $(kpsestat_DEPENDENCIES) $(EXTRA_kpsestat_DEPENDENCIES)
+ @rm -f kpsestat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(kpsestat_OBJECTS) $(kpsestat_LDADD) $(LIBS)
+
+kpsewhich$(EXEEXT): $(kpsewhich_OBJECTS) $(kpsewhich_DEPENDENCIES) $(EXTRA_kpsewhich_DEPENDENCIES)
+ @rm -f kpsewhich$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(kpsewhich_OBJECTS) $(kpsewhich_LDADD) $(LIBS)
+
+progname-test$(EXEEXT): $(progname_test_OBJECTS) $(progname_test_DEPENDENCIES) $(EXTRA_progname_test_DEPENDENCIES)
+ @rm -f progname-test$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(progname_test_OBJECTS) $(progname_test_LDADD) $(LIBS)
+
+xdirtest$(EXEEXT): $(xdirtest_OBJECTS) $(xdirtest_DEPENDENCIES) $(EXTRA_xdirtest_DEPENDENCIES)
+ @rm -f xdirtest$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(xdirtest_OBJECTS) $(xdirtest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/putenv.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kpsestat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kpsewhich.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-absolute.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-atou.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-cnf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-concat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-concat3.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-concatn.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-db.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-debug.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-dir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-elt-dirs.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-expand.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-extend-fname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-file-p.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-find-suffix.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-fn.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-fontmap.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-getopt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-getopt1.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-hash.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-kdefault.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-knj.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-kpathsea.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-line.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-magstep.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-make-suffix.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-mingw32.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-path-elt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-pathsearch.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-proginit.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-progname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-readable.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-rm-suffix.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-str-list.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-str-llist.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-tex-file.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-tex-glyph.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-tex-hush.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-tex-make.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-tilde.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-uppercasify.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-variable.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-version.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-win32lib.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xbasename.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xcalloc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xdirname.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xfopen.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xfseek.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xfseeko.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xftell.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xftello.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xgetcwd.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xmalloc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xopendir.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xputenv.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xrealloc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xstat.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libkpathsea_la-xstrdup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname_test-progname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdirtest.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.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
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+libkpathsea_la-tex-file.lo: tex-file.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-tex-file.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-tex-file.Tpo -c -o libkpathsea_la-tex-file.lo `test -f 'tex-file.c' || echo '$(srcdir)/'`tex-file.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-tex-file.Tpo $(DEPDIR)/libkpathsea_la-tex-file.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tex-file.c' object='libkpathsea_la-tex-file.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-tex-file.lo `test -f 'tex-file.c' || echo '$(srcdir)/'`tex-file.c
+
+libkpathsea_la-absolute.lo: absolute.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-absolute.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-absolute.Tpo -c -o libkpathsea_la-absolute.lo `test -f 'absolute.c' || echo '$(srcdir)/'`absolute.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-absolute.Tpo $(DEPDIR)/libkpathsea_la-absolute.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='absolute.c' object='libkpathsea_la-absolute.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-absolute.lo `test -f 'absolute.c' || echo '$(srcdir)/'`absolute.c
+
+libkpathsea_la-atou.lo: atou.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-atou.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-atou.Tpo -c -o libkpathsea_la-atou.lo `test -f 'atou.c' || echo '$(srcdir)/'`atou.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-atou.Tpo $(DEPDIR)/libkpathsea_la-atou.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='atou.c' object='libkpathsea_la-atou.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-atou.lo `test -f 'atou.c' || echo '$(srcdir)/'`atou.c
+
+libkpathsea_la-cnf.lo: cnf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-cnf.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-cnf.Tpo -c -o libkpathsea_la-cnf.lo `test -f 'cnf.c' || echo '$(srcdir)/'`cnf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-cnf.Tpo $(DEPDIR)/libkpathsea_la-cnf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cnf.c' object='libkpathsea_la-cnf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-cnf.lo `test -f 'cnf.c' || echo '$(srcdir)/'`cnf.c
+
+libkpathsea_la-concat.lo: concat.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-concat.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-concat.Tpo -c -o libkpathsea_la-concat.lo `test -f 'concat.c' || echo '$(srcdir)/'`concat.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-concat.Tpo $(DEPDIR)/libkpathsea_la-concat.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='concat.c' object='libkpathsea_la-concat.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-concat.lo `test -f 'concat.c' || echo '$(srcdir)/'`concat.c
+
+libkpathsea_la-concat3.lo: concat3.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-concat3.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-concat3.Tpo -c -o libkpathsea_la-concat3.lo `test -f 'concat3.c' || echo '$(srcdir)/'`concat3.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-concat3.Tpo $(DEPDIR)/libkpathsea_la-concat3.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='concat3.c' object='libkpathsea_la-concat3.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-concat3.lo `test -f 'concat3.c' || echo '$(srcdir)/'`concat3.c
+
+libkpathsea_la-concatn.lo: concatn.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-concatn.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-concatn.Tpo -c -o libkpathsea_la-concatn.lo `test -f 'concatn.c' || echo '$(srcdir)/'`concatn.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-concatn.Tpo $(DEPDIR)/libkpathsea_la-concatn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='concatn.c' object='libkpathsea_la-concatn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-concatn.lo `test -f 'concatn.c' || echo '$(srcdir)/'`concatn.c
+
+libkpathsea_la-db.lo: db.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-db.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-db.Tpo -c -o libkpathsea_la-db.lo `test -f 'db.c' || echo '$(srcdir)/'`db.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-db.Tpo $(DEPDIR)/libkpathsea_la-db.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='db.c' object='libkpathsea_la-db.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-db.lo `test -f 'db.c' || echo '$(srcdir)/'`db.c
+
+libkpathsea_la-debug.lo: debug.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-debug.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-debug.Tpo -c -o libkpathsea_la-debug.lo `test -f 'debug.c' || echo '$(srcdir)/'`debug.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-debug.Tpo $(DEPDIR)/libkpathsea_la-debug.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug.c' object='libkpathsea_la-debug.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-debug.lo `test -f 'debug.c' || echo '$(srcdir)/'`debug.c
+
+libkpathsea_la-dir.lo: dir.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-dir.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-dir.Tpo -c -o libkpathsea_la-dir.lo `test -f 'dir.c' || echo '$(srcdir)/'`dir.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-dir.Tpo $(DEPDIR)/libkpathsea_la-dir.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dir.c' object='libkpathsea_la-dir.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-dir.lo `test -f 'dir.c' || echo '$(srcdir)/'`dir.c
+
+libkpathsea_la-elt-dirs.lo: elt-dirs.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-elt-dirs.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-elt-dirs.Tpo -c -o libkpathsea_la-elt-dirs.lo `test -f 'elt-dirs.c' || echo '$(srcdir)/'`elt-dirs.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-elt-dirs.Tpo $(DEPDIR)/libkpathsea_la-elt-dirs.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elt-dirs.c' object='libkpathsea_la-elt-dirs.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-elt-dirs.lo `test -f 'elt-dirs.c' || echo '$(srcdir)/'`elt-dirs.c
+
+libkpathsea_la-expand.lo: expand.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-expand.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-expand.Tpo -c -o libkpathsea_la-expand.lo `test -f 'expand.c' || echo '$(srcdir)/'`expand.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-expand.Tpo $(DEPDIR)/libkpathsea_la-expand.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='expand.c' object='libkpathsea_la-expand.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-expand.lo `test -f 'expand.c' || echo '$(srcdir)/'`expand.c
+
+libkpathsea_la-extend-fname.lo: extend-fname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-extend-fname.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-extend-fname.Tpo -c -o libkpathsea_la-extend-fname.lo `test -f 'extend-fname.c' || echo '$(srcdir)/'`extend-fname.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-extend-fname.Tpo $(DEPDIR)/libkpathsea_la-extend-fname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='extend-fname.c' object='libkpathsea_la-extend-fname.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-extend-fname.lo `test -f 'extend-fname.c' || echo '$(srcdir)/'`extend-fname.c
+
+libkpathsea_la-file-p.lo: file-p.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-file-p.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-file-p.Tpo -c -o libkpathsea_la-file-p.lo `test -f 'file-p.c' || echo '$(srcdir)/'`file-p.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-file-p.Tpo $(DEPDIR)/libkpathsea_la-file-p.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file-p.c' object='libkpathsea_la-file-p.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-file-p.lo `test -f 'file-p.c' || echo '$(srcdir)/'`file-p.c
+
+libkpathsea_la-find-suffix.lo: find-suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-find-suffix.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-find-suffix.Tpo -c -o libkpathsea_la-find-suffix.lo `test -f 'find-suffix.c' || echo '$(srcdir)/'`find-suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-find-suffix.Tpo $(DEPDIR)/libkpathsea_la-find-suffix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='find-suffix.c' object='libkpathsea_la-find-suffix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-find-suffix.lo `test -f 'find-suffix.c' || echo '$(srcdir)/'`find-suffix.c
+
+libkpathsea_la-fn.lo: fn.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-fn.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-fn.Tpo -c -o libkpathsea_la-fn.lo `test -f 'fn.c' || echo '$(srcdir)/'`fn.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-fn.Tpo $(DEPDIR)/libkpathsea_la-fn.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fn.c' object='libkpathsea_la-fn.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-fn.lo `test -f 'fn.c' || echo '$(srcdir)/'`fn.c
+
+libkpathsea_la-fontmap.lo: fontmap.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-fontmap.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-fontmap.Tpo -c -o libkpathsea_la-fontmap.lo `test -f 'fontmap.c' || echo '$(srcdir)/'`fontmap.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-fontmap.Tpo $(DEPDIR)/libkpathsea_la-fontmap.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fontmap.c' object='libkpathsea_la-fontmap.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-fontmap.lo `test -f 'fontmap.c' || echo '$(srcdir)/'`fontmap.c
+
+libkpathsea_la-hash.lo: hash.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-hash.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-hash.Tpo -c -o libkpathsea_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-hash.Tpo $(DEPDIR)/libkpathsea_la-hash.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hash.c' object='libkpathsea_la-hash.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c
+
+libkpathsea_la-kdefault.lo: kdefault.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-kdefault.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-kdefault.Tpo -c -o libkpathsea_la-kdefault.lo `test -f 'kdefault.c' || echo '$(srcdir)/'`kdefault.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-kdefault.Tpo $(DEPDIR)/libkpathsea_la-kdefault.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kdefault.c' object='libkpathsea_la-kdefault.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-kdefault.lo `test -f 'kdefault.c' || echo '$(srcdir)/'`kdefault.c
+
+libkpathsea_la-kpathsea.lo: kpathsea.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-kpathsea.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-kpathsea.Tpo -c -o libkpathsea_la-kpathsea.lo `test -f 'kpathsea.c' || echo '$(srcdir)/'`kpathsea.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-kpathsea.Tpo $(DEPDIR)/libkpathsea_la-kpathsea.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='kpathsea.c' object='libkpathsea_la-kpathsea.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-kpathsea.lo `test -f 'kpathsea.c' || echo '$(srcdir)/'`kpathsea.c
+
+libkpathsea_la-line.lo: line.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-line.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-line.Tpo -c -o libkpathsea_la-line.lo `test -f 'line.c' || echo '$(srcdir)/'`line.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-line.Tpo $(DEPDIR)/libkpathsea_la-line.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='line.c' object='libkpathsea_la-line.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-line.lo `test -f 'line.c' || echo '$(srcdir)/'`line.c
+
+libkpathsea_la-magstep.lo: magstep.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-magstep.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-magstep.Tpo -c -o libkpathsea_la-magstep.lo `test -f 'magstep.c' || echo '$(srcdir)/'`magstep.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-magstep.Tpo $(DEPDIR)/libkpathsea_la-magstep.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='magstep.c' object='libkpathsea_la-magstep.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-magstep.lo `test -f 'magstep.c' || echo '$(srcdir)/'`magstep.c
+
+libkpathsea_la-make-suffix.lo: make-suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-make-suffix.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-make-suffix.Tpo -c -o libkpathsea_la-make-suffix.lo `test -f 'make-suffix.c' || echo '$(srcdir)/'`make-suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-make-suffix.Tpo $(DEPDIR)/libkpathsea_la-make-suffix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='make-suffix.c' object='libkpathsea_la-make-suffix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-make-suffix.lo `test -f 'make-suffix.c' || echo '$(srcdir)/'`make-suffix.c
+
+libkpathsea_la-path-elt.lo: path-elt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-path-elt.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-path-elt.Tpo -c -o libkpathsea_la-path-elt.lo `test -f 'path-elt.c' || echo '$(srcdir)/'`path-elt.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-path-elt.Tpo $(DEPDIR)/libkpathsea_la-path-elt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='path-elt.c' object='libkpathsea_la-path-elt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-path-elt.lo `test -f 'path-elt.c' || echo '$(srcdir)/'`path-elt.c
+
+libkpathsea_la-pathsearch.lo: pathsearch.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-pathsearch.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-pathsearch.Tpo -c -o libkpathsea_la-pathsearch.lo `test -f 'pathsearch.c' || echo '$(srcdir)/'`pathsearch.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-pathsearch.Tpo $(DEPDIR)/libkpathsea_la-pathsearch.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pathsearch.c' object='libkpathsea_la-pathsearch.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-pathsearch.lo `test -f 'pathsearch.c' || echo '$(srcdir)/'`pathsearch.c
+
+libkpathsea_la-proginit.lo: proginit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-proginit.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-proginit.Tpo -c -o libkpathsea_la-proginit.lo `test -f 'proginit.c' || echo '$(srcdir)/'`proginit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-proginit.Tpo $(DEPDIR)/libkpathsea_la-proginit.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='proginit.c' object='libkpathsea_la-proginit.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-proginit.lo `test -f 'proginit.c' || echo '$(srcdir)/'`proginit.c
+
+libkpathsea_la-progname.lo: progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-progname.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-progname.Tpo -c -o libkpathsea_la-progname.lo `test -f 'progname.c' || echo '$(srcdir)/'`progname.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-progname.Tpo $(DEPDIR)/libkpathsea_la-progname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='progname.c' object='libkpathsea_la-progname.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-progname.lo `test -f 'progname.c' || echo '$(srcdir)/'`progname.c
+
+libkpathsea_la-readable.lo: readable.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-readable.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-readable.Tpo -c -o libkpathsea_la-readable.lo `test -f 'readable.c' || echo '$(srcdir)/'`readable.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-readable.Tpo $(DEPDIR)/libkpathsea_la-readable.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readable.c' object='libkpathsea_la-readable.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-readable.lo `test -f 'readable.c' || echo '$(srcdir)/'`readable.c
+
+libkpathsea_la-rm-suffix.lo: rm-suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-rm-suffix.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-rm-suffix.Tpo -c -o libkpathsea_la-rm-suffix.lo `test -f 'rm-suffix.c' || echo '$(srcdir)/'`rm-suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-rm-suffix.Tpo $(DEPDIR)/libkpathsea_la-rm-suffix.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rm-suffix.c' object='libkpathsea_la-rm-suffix.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-rm-suffix.lo `test -f 'rm-suffix.c' || echo '$(srcdir)/'`rm-suffix.c
+
+libkpathsea_la-str-list.lo: str-list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-str-list.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-str-list.Tpo -c -o libkpathsea_la-str-list.lo `test -f 'str-list.c' || echo '$(srcdir)/'`str-list.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-str-list.Tpo $(DEPDIR)/libkpathsea_la-str-list.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='str-list.c' object='libkpathsea_la-str-list.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-str-list.lo `test -f 'str-list.c' || echo '$(srcdir)/'`str-list.c
+
+libkpathsea_la-str-llist.lo: str-llist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-str-llist.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-str-llist.Tpo -c -o libkpathsea_la-str-llist.lo `test -f 'str-llist.c' || echo '$(srcdir)/'`str-llist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-str-llist.Tpo $(DEPDIR)/libkpathsea_la-str-llist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='str-llist.c' object='libkpathsea_la-str-llist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-str-llist.lo `test -f 'str-llist.c' || echo '$(srcdir)/'`str-llist.c
+
+libkpathsea_la-tex-glyph.lo: tex-glyph.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-tex-glyph.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-tex-glyph.Tpo -c -o libkpathsea_la-tex-glyph.lo `test -f 'tex-glyph.c' || echo '$(srcdir)/'`tex-glyph.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-tex-glyph.Tpo $(DEPDIR)/libkpathsea_la-tex-glyph.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tex-glyph.c' object='libkpathsea_la-tex-glyph.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-tex-glyph.lo `test -f 'tex-glyph.c' || echo '$(srcdir)/'`tex-glyph.c
+
+libkpathsea_la-tex-hush.lo: tex-hush.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-tex-hush.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-tex-hush.Tpo -c -o libkpathsea_la-tex-hush.lo `test -f 'tex-hush.c' || echo '$(srcdir)/'`tex-hush.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-tex-hush.Tpo $(DEPDIR)/libkpathsea_la-tex-hush.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tex-hush.c' object='libkpathsea_la-tex-hush.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-tex-hush.lo `test -f 'tex-hush.c' || echo '$(srcdir)/'`tex-hush.c
+
+libkpathsea_la-tex-make.lo: tex-make.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-tex-make.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-tex-make.Tpo -c -o libkpathsea_la-tex-make.lo `test -f 'tex-make.c' || echo '$(srcdir)/'`tex-make.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-tex-make.Tpo $(DEPDIR)/libkpathsea_la-tex-make.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tex-make.c' object='libkpathsea_la-tex-make.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-tex-make.lo `test -f 'tex-make.c' || echo '$(srcdir)/'`tex-make.c
+
+libkpathsea_la-tilde.lo: tilde.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-tilde.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-tilde.Tpo -c -o libkpathsea_la-tilde.lo `test -f 'tilde.c' || echo '$(srcdir)/'`tilde.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-tilde.Tpo $(DEPDIR)/libkpathsea_la-tilde.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tilde.c' object='libkpathsea_la-tilde.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-tilde.lo `test -f 'tilde.c' || echo '$(srcdir)/'`tilde.c
+
+libkpathsea_la-uppercasify.lo: uppercasify.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-uppercasify.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-uppercasify.Tpo -c -o libkpathsea_la-uppercasify.lo `test -f 'uppercasify.c' || echo '$(srcdir)/'`uppercasify.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-uppercasify.Tpo $(DEPDIR)/libkpathsea_la-uppercasify.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uppercasify.c' object='libkpathsea_la-uppercasify.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-uppercasify.lo `test -f 'uppercasify.c' || echo '$(srcdir)/'`uppercasify.c
+
+libkpathsea_la-variable.lo: variable.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-variable.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-variable.Tpo -c -o libkpathsea_la-variable.lo `test -f 'variable.c' || echo '$(srcdir)/'`variable.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-variable.Tpo $(DEPDIR)/libkpathsea_la-variable.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='variable.c' object='libkpathsea_la-variable.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-variable.lo `test -f 'variable.c' || echo '$(srcdir)/'`variable.c
+
+libkpathsea_la-version.lo: version.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-version.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-version.Tpo -c -o libkpathsea_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-version.Tpo $(DEPDIR)/libkpathsea_la-version.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='version.c' object='libkpathsea_la-version.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c
+
+libkpathsea_la-xbasename.lo: xbasename.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xbasename.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xbasename.Tpo -c -o libkpathsea_la-xbasename.lo `test -f 'xbasename.c' || echo '$(srcdir)/'`xbasename.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xbasename.Tpo $(DEPDIR)/libkpathsea_la-xbasename.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xbasename.c' object='libkpathsea_la-xbasename.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xbasename.lo `test -f 'xbasename.c' || echo '$(srcdir)/'`xbasename.c
+
+libkpathsea_la-xcalloc.lo: xcalloc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xcalloc.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xcalloc.Tpo -c -o libkpathsea_la-xcalloc.lo `test -f 'xcalloc.c' || echo '$(srcdir)/'`xcalloc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xcalloc.Tpo $(DEPDIR)/libkpathsea_la-xcalloc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xcalloc.c' object='libkpathsea_la-xcalloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xcalloc.lo `test -f 'xcalloc.c' || echo '$(srcdir)/'`xcalloc.c
+
+libkpathsea_la-xdirname.lo: xdirname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xdirname.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xdirname.Tpo -c -o libkpathsea_la-xdirname.lo `test -f 'xdirname.c' || echo '$(srcdir)/'`xdirname.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xdirname.Tpo $(DEPDIR)/libkpathsea_la-xdirname.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xdirname.c' object='libkpathsea_la-xdirname.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xdirname.lo `test -f 'xdirname.c' || echo '$(srcdir)/'`xdirname.c
+
+libkpathsea_la-xfopen.lo: xfopen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xfopen.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xfopen.Tpo -c -o libkpathsea_la-xfopen.lo `test -f 'xfopen.c' || echo '$(srcdir)/'`xfopen.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xfopen.Tpo $(DEPDIR)/libkpathsea_la-xfopen.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfopen.c' object='libkpathsea_la-xfopen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xfopen.lo `test -f 'xfopen.c' || echo '$(srcdir)/'`xfopen.c
+
+libkpathsea_la-xfseek.lo: xfseek.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xfseek.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xfseek.Tpo -c -o libkpathsea_la-xfseek.lo `test -f 'xfseek.c' || echo '$(srcdir)/'`xfseek.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xfseek.Tpo $(DEPDIR)/libkpathsea_la-xfseek.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfseek.c' object='libkpathsea_la-xfseek.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xfseek.lo `test -f 'xfseek.c' || echo '$(srcdir)/'`xfseek.c
+
+libkpathsea_la-xftell.lo: xftell.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xftell.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xftell.Tpo -c -o libkpathsea_la-xftell.lo `test -f 'xftell.c' || echo '$(srcdir)/'`xftell.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xftell.Tpo $(DEPDIR)/libkpathsea_la-xftell.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xftell.c' object='libkpathsea_la-xftell.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xftell.lo `test -f 'xftell.c' || echo '$(srcdir)/'`xftell.c
+
+libkpathsea_la-xgetcwd.lo: xgetcwd.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xgetcwd.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xgetcwd.Tpo -c -o libkpathsea_la-xgetcwd.lo `test -f 'xgetcwd.c' || echo '$(srcdir)/'`xgetcwd.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xgetcwd.Tpo $(DEPDIR)/libkpathsea_la-xgetcwd.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xgetcwd.c' object='libkpathsea_la-xgetcwd.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xgetcwd.lo `test -f 'xgetcwd.c' || echo '$(srcdir)/'`xgetcwd.c
+
+libkpathsea_la-xmalloc.lo: xmalloc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xmalloc.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xmalloc.Tpo -c -o libkpathsea_la-xmalloc.lo `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xmalloc.Tpo $(DEPDIR)/libkpathsea_la-xmalloc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xmalloc.c' object='libkpathsea_la-xmalloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xmalloc.lo `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+libkpathsea_la-xopendir.lo: xopendir.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xopendir.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xopendir.Tpo -c -o libkpathsea_la-xopendir.lo `test -f 'xopendir.c' || echo '$(srcdir)/'`xopendir.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xopendir.Tpo $(DEPDIR)/libkpathsea_la-xopendir.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xopendir.c' object='libkpathsea_la-xopendir.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xopendir.lo `test -f 'xopendir.c' || echo '$(srcdir)/'`xopendir.c
+
+libkpathsea_la-xputenv.lo: xputenv.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xputenv.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xputenv.Tpo -c -o libkpathsea_la-xputenv.lo `test -f 'xputenv.c' || echo '$(srcdir)/'`xputenv.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xputenv.Tpo $(DEPDIR)/libkpathsea_la-xputenv.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xputenv.c' object='libkpathsea_la-xputenv.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xputenv.lo `test -f 'xputenv.c' || echo '$(srcdir)/'`xputenv.c
+
+libkpathsea_la-xrealloc.lo: xrealloc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xrealloc.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xrealloc.Tpo -c -o libkpathsea_la-xrealloc.lo `test -f 'xrealloc.c' || echo '$(srcdir)/'`xrealloc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xrealloc.Tpo $(DEPDIR)/libkpathsea_la-xrealloc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xrealloc.c' object='libkpathsea_la-xrealloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xrealloc.lo `test -f 'xrealloc.c' || echo '$(srcdir)/'`xrealloc.c
+
+libkpathsea_la-xstat.lo: xstat.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xstat.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xstat.Tpo -c -o libkpathsea_la-xstat.lo `test -f 'xstat.c' || echo '$(srcdir)/'`xstat.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xstat.Tpo $(DEPDIR)/libkpathsea_la-xstat.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xstat.c' object='libkpathsea_la-xstat.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xstat.lo `test -f 'xstat.c' || echo '$(srcdir)/'`xstat.c
+
+libkpathsea_la-xstrdup.lo: xstrdup.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xstrdup.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xstrdup.Tpo -c -o libkpathsea_la-xstrdup.lo `test -f 'xstrdup.c' || echo '$(srcdir)/'`xstrdup.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xstrdup.Tpo $(DEPDIR)/libkpathsea_la-xstrdup.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xstrdup.c' object='libkpathsea_la-xstrdup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xstrdup.lo `test -f 'xstrdup.c' || echo '$(srcdir)/'`xstrdup.c
+
+libkpathsea_la-getopt.lo: getopt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-getopt.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-getopt.Tpo -c -o libkpathsea_la-getopt.lo `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-getopt.Tpo $(DEPDIR)/libkpathsea_la-getopt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getopt.c' object='libkpathsea_la-getopt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-getopt.lo `test -f 'getopt.c' || echo '$(srcdir)/'`getopt.c
+
+libkpathsea_la-getopt1.lo: getopt1.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-getopt1.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-getopt1.Tpo -c -o libkpathsea_la-getopt1.lo `test -f 'getopt1.c' || echo '$(srcdir)/'`getopt1.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-getopt1.Tpo $(DEPDIR)/libkpathsea_la-getopt1.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='getopt1.c' object='libkpathsea_la-getopt1.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-getopt1.lo `test -f 'getopt1.c' || echo '$(srcdir)/'`getopt1.c
+
+libkpathsea_la-mingw32.lo: mingw32.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-mingw32.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-mingw32.Tpo -c -o libkpathsea_la-mingw32.lo `test -f 'mingw32.c' || echo '$(srcdir)/'`mingw32.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-mingw32.Tpo $(DEPDIR)/libkpathsea_la-mingw32.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mingw32.c' object='libkpathsea_la-mingw32.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-mingw32.lo `test -f 'mingw32.c' || echo '$(srcdir)/'`mingw32.c
+
+libkpathsea_la-xfseeko.lo: xfseeko.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xfseeko.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xfseeko.Tpo -c -o libkpathsea_la-xfseeko.lo `test -f 'xfseeko.c' || echo '$(srcdir)/'`xfseeko.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xfseeko.Tpo $(DEPDIR)/libkpathsea_la-xfseeko.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfseeko.c' object='libkpathsea_la-xfseeko.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xfseeko.lo `test -f 'xfseeko.c' || echo '$(srcdir)/'`xfseeko.c
+
+libkpathsea_la-xftello.lo: xftello.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-xftello.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-xftello.Tpo -c -o libkpathsea_la-xftello.lo `test -f 'xftello.c' || echo '$(srcdir)/'`xftello.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-xftello.Tpo $(DEPDIR)/libkpathsea_la-xftello.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xftello.c' object='libkpathsea_la-xftello.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-xftello.lo `test -f 'xftello.c' || echo '$(srcdir)/'`xftello.c
+
+libkpathsea_la-win32lib.lo: win32lib.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-win32lib.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-win32lib.Tpo -c -o libkpathsea_la-win32lib.lo `test -f 'win32lib.c' || echo '$(srcdir)/'`win32lib.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-win32lib.Tpo $(DEPDIR)/libkpathsea_la-win32lib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='win32lib.c' object='libkpathsea_la-win32lib.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-win32lib.lo `test -f 'win32lib.c' || echo '$(srcdir)/'`win32lib.c
+
+libkpathsea_la-knj.lo: knj.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libkpathsea_la-knj.lo -MD -MP -MF $(DEPDIR)/libkpathsea_la-knj.Tpo -c -o libkpathsea_la-knj.lo `test -f 'knj.c' || echo '$(srcdir)/'`knj.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libkpathsea_la-knj.Tpo $(DEPDIR)/libkpathsea_la-knj.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='knj.c' object='libkpathsea_la-knj.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libkpathsea_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libkpathsea_la-knj.lo `test -f 'knj.c' || echo '$(srcdir)/'`knj.c
+
+progname_test-progname.o: progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(progname_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT progname_test-progname.o -MD -MP -MF $(DEPDIR)/progname_test-progname.Tpo -c -o progname_test-progname.o `test -f 'progname.c' || echo '$(srcdir)/'`progname.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/progname_test-progname.Tpo $(DEPDIR)/progname_test-progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='progname.c' object='progname_test-progname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(progname_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o progname_test-progname.o `test -f 'progname.c' || echo '$(srcdir)/'`progname.c
+
+progname_test-progname.obj: progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(progname_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT progname_test-progname.obj -MD -MP -MF $(DEPDIR)/progname_test-progname.Tpo -c -o progname_test-progname.obj `if test -f 'progname.c'; then $(CYGPATH_W) 'progname.c'; else $(CYGPATH_W) '$(srcdir)/progname.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/progname_test-progname.Tpo $(DEPDIR)/progname_test-progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='progname.c' object='progname_test-progname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(progname_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o progname_test-progname.obj `if test -f 'progname.c'; then $(CYGPATH_W) 'progname.c'; else $(CYGPATH_W) '$(srcdir)/progname.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ 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)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+install-kpseincludeHEADERS: $(kpseinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(kpseinclude_HEADERS)'; test -n "$(kpseincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(kpseincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(kpseincludedir)" || exit 1; \
+ fi; \
+ 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)$(kpseincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(kpseincludedir)" || exit $$?; \
+ done
+
+uninstall-kpseincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(kpseinclude_HEADERS)'; test -n "$(kpseincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(kpseincludedir)'; $(am__uninstall_files_from_dir)
+install-nodist_kpseincludeHEADERS: $(nodist_kpseinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(nodist_kpseinclude_HEADERS)'; test -n "$(kpseincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(kpseincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(kpseincludedir)" || exit 1; \
+ fi; \
+ 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)$(kpseincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(kpseincludedir)" || exit $$?; \
+ done
+
+uninstall-nodist_kpseincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_kpseinclude_HEADERS)'; test -n "$(kpseincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(kpseincludedir)'; $(am__uninstall_files_from_dir)
+
+# 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.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ 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"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ 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; \
+ $(am__define_uniq_tagged_files); \
+ 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-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ 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"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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 \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ 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
+ -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) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_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*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(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/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+ && $(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__post_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:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { 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-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) $(HEADERS) \
+ c-auto.h
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(kpseincludedir)" "$(DESTDIR)$(kpseincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) 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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -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)
+ -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)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
+ clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f $(DEPDIR)/putenv.Plo
+ -rm -f ./$(DEPDIR)/access.Po
+ -rm -f ./$(DEPDIR)/kpsestat.Po
+ -rm -f ./$(DEPDIR)/kpsewhich.Po
+ -rm -f ./$(DEPDIR)/libkpathsea_la-absolute.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-atou.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-cnf.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-concat.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-concat3.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-concatn.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-db.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-debug.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-dir.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-elt-dirs.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-expand.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-extend-fname.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-file-p.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-find-suffix.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-fn.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-fontmap.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-getopt.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-getopt1.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-hash.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-kdefault.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-knj.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-kpathsea.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-line.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-magstep.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-make-suffix.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-mingw32.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-path-elt.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-pathsearch.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-proginit.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-progname.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-readable.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-rm-suffix.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-str-list.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-str-llist.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-file.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-glyph.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-hush.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-make.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tilde.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-uppercasify.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-variable.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-version.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-win32lib.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xbasename.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xcalloc.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xdirname.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xfopen.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xfseek.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xfseeko.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xftell.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xftello.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xgetcwd.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xmalloc.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xopendir.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xputenv.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xrealloc.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xstat.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xstrdup.Plo
+ -rm -f ./$(DEPDIR)/progname_test-progname.Po
+ -rm -f ./$(DEPDIR)/readlink.Po
+ -rm -f ./$(DEPDIR)/xdirtest.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-kpseincludeHEADERS \
+ install-nodist_kpseincludeHEADERS install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
+
+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 -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f $(DEPDIR)/putenv.Plo
+ -rm -f ./$(DEPDIR)/access.Po
+ -rm -f ./$(DEPDIR)/kpsestat.Po
+ -rm -f ./$(DEPDIR)/kpsewhich.Po
+ -rm -f ./$(DEPDIR)/libkpathsea_la-absolute.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-atou.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-cnf.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-concat.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-concat3.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-concatn.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-db.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-debug.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-dir.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-elt-dirs.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-expand.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-extend-fname.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-file-p.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-find-suffix.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-fn.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-fontmap.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-getopt.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-getopt1.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-hash.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-kdefault.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-knj.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-kpathsea.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-line.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-magstep.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-make-suffix.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-mingw32.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-path-elt.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-pathsearch.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-proginit.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-progname.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-readable.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-rm-suffix.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-str-list.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-str-llist.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-file.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-glyph.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-hush.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tex-make.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-tilde.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-uppercasify.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-variable.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-version.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-win32lib.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xbasename.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xcalloc.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xdirname.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xfopen.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xfseek.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xfseeko.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xftell.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xftello.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xgetcwd.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xmalloc.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xopendir.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xputenv.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xrealloc.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xstat.Plo
+ -rm -f ./$(DEPDIR)/libkpathsea_la-xstrdup.Plo
+ -rm -f ./$(DEPDIR)/progname_test-progname.Po
+ -rm -f ./$(DEPDIR)/readlink.Po
+ -rm -f ./$(DEPDIR)/xdirtest.Po
+ -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-kpseincludeHEADERS \
+ uninstall-libLTLIBRARIES uninstall-local \
+ uninstall-nodist_kpseincludeHEADERS uninstall-pkgconfigDATA
+
+.MAKE: $(am__recursive_targets) all check check-am install install-am \
+ install-exec install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles am--refresh check check-TESTS check-am clean \
+ clean-binPROGRAMS clean-cscope clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscope cscopelist-am ctags \
+ ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \
+ dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \
+ distclean distclean-compile distclean-generic distclean-hdr \
+ 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-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-kpseincludeHEADERS \
+ install-libLTLIBRARIES install-man \
+ install-nodist_kpseincludeHEADERS install-pdf install-pdf-am \
+ install-pkgconfigDATA 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 \
+ pdf pdf-am ps ps-am recheck tags tags-am uninstall \
+ uninstall-am uninstall-binPROGRAMS \
+ uninstall-kpseincludeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-local uninstall-nodist_kpseincludeHEADERS \
+ uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
+
+
+$(libkpathsea_la_OBJECTS): paths.h kpathsea.h
+
+paths.h: stamp-paths
+stamp-paths: texmf.cnf bsnl.awk cnf-to-paths.awk
+# ensure grep is not completely broken, e.g., from GREP_OPTIONS.
+ echo a | grep -v b >/dev/null || { echo "*** grep broken, goodbye."; exit 1; }
+#
+# generate paths.h without build machine directories.
+ echo "/* paths.h: Generated from texmf.cnf. */" >paths.tmp
+ $(AWK) -f $(srcdir)/bsnl.awk $(srcdir)/texmf.cnf \
+ | sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' \
+ | $(AWK) -f $(srcdir)/cnf-to-paths.awk \
+ >>paths.tmp
+ @if cmp -s paths.h paths.tmp 2>/dev/null; then \
+ echo "paths.h is unchanged"; \
+ else \
+ echo "cp paths.tmp paths.h"; \
+ cp paths.tmp paths.h; \
+ fi
+ rm -f paths.tmp
+ date >$@
+
+kpathsea.h: stamp-kpathsea
+stamp-kpathsea: Makefile paths.h
+ $(AM_V_GEN)rm -f $@; \
+ ( echo '/* This is a generated file */'; \
+ echo '/* collecting all public kpathsea headers. */'; \
+ for f in config.h paths.h $(direct_headers); do \
+ echo "#include <kpathsea/$$f>"; \
+ done ) >kpathsea.tmp && \
+ if cmp -s kpathsea.h kpathsea.tmp 2>/dev/null; then \
+ echo "kpathsea.h is unchanged"; \
+ else \
+ echo "generated kpathsea.h"; \
+ cp kpathsea.tmp kpathsea.h; \
+ fi && rm -f kpathsea.tmp && date >$@
+
+install-data-local: installdirs-am
+ $(MKDIR_P) '$(DESTDIR)$(web2cdir)'
+ @for f in $(dist_noinst_DATA); do \
+ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \
+ || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \
+ echo " $(INSTALL_DATA) '$(srcdir)/$$f' '$(DESTDIR)$(web2cdir)/$$f'"; \
+ $(INSTALL_DATA) "$(srcdir)/$$f" "$(DESTDIR)$(web2cdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-local:
+ @for f in $(dist_noinst_DATA); do \
+ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1; then \
+ echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(web2cdir)/$$f"; \
+ else :; fi; \
+ done
+#
+tests/cnfline.log tests/cnfnewline.log tests/cnfnull.log tests/cnfprog.log \
+ tests/kpsewhich.log: kpsewhich$(EXEEXT)
+tests/kpseaccess.log: kpseaccess$(EXEEXT)
+tests/kpsereadlink.log: kpsereadlink$(EXEEXT)
+tests/kpsestat.log: kpsestat$(EXEEXT)
+rebuild.stamp: $(rebuild_target)
+ echo timestamp >$@
+
+.PHONY: rebuild
+rebuild: $(rebuild_prereq)
+ @dry=; for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=*|--*);; \
+ *n*) dry=:;; \
+ esac; \
+ done; \
+ if test -f rebuild.stamp; then :; else \
+ $$dry trap 'rm -rf rebuild.lock' 1 2 13 15; \
+ if $$dry mkdir rebuild.lock 2>/dev/null; then \
+ $(MAKE) $(AM_MAKEFLAGS) rebuild.stamp; \
+ $$dry rmdir rebuild.lock; \
+ else \
+ while test -d rebuild.lock && test -z "$$dry"; do sleep 1; done; \
+ fi; \
+ $$dry test -f rebuild.stamp; exit $$?; \
+ fi
+
+# 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/Build/source/texk/kpathsea/NEWS b/Build/source/texk/kpathsea/NEWS
new file mode 100644
index 00000000000..0a6c267a678
--- /dev/null
+++ b/Build/source/texk/kpathsea/NEWS
@@ -0,0 +1,399 @@
+$Id$
+This file records noteworthy changes. (Public domain.)
+
+6.3.3 (for TeX Live 2021)
+* The library does not emit warnings for unrecognized filenames,
+ leaving it up to the caller.
+* Double save_size limit to 200,000 for tex4ht, l3regex, etc.
+
+6.3.2 (for TeX Live 2020, 27 March 2020)
+* New option --cnf-line for kpsewhich (and tex and mf) to support
+ arbitrary configuration settings on the command line.
+* Warn about unusual program name qualifiers.
+* The mktex* programs are no longer maintained or present here, but in
+ TeX Live's Master/texmf-dist/scripts/texlive (with copies in
+ Build/source/texk/texlive/linked_scripts as usual).
+
+6.3.1 (for TeX Live 2019, 7 April 2019)
+* kpsewhich --var-value does brace expansion as well as variable and
+ tilde expansion.
+* The kpathsea_path_search() and related functions always recognize either
+ common path separator (: or ;) when splitting paths into elements.
+ (Before, there were some unusual contexts where this did not happen.)
+
+6.3.0 (for TeX Live 2018, 14 April 2018)
+* New configuration value texmf_casefold_search to fall back to
+ case-insensitive search in non-system directories if there is no exact
+ match; only relevant on Unix.
+
+6.2.3 (for TeX Live 2017, 19 May 2017)
+* .OTF treated like .otf.
+* texmf.cnf: mpost removed from default shell_escape_commands.
+* texmf.cnf: TEXINPUTS.luajitlatex added.
+* texmf.cnf: default bibtex capacities increased.
+
+6.2.2 (for TeX Live 2016, 21 May 2016)
+* gregorio added to default shell_escape_commands.
+
+6.2.1 (for TeX Live 2015, 21 May 2015)
+* search path information output with new option --help-formats to kpsewhich,
+ no longer with --help.
+* install <kpathsea/c-auto.h> in an architecture dependent location
+ and use pkg-config to get the required flags.
+
+6.2.0 (for TeX Live 2014, 30 May 2013)
+* mktexlsr outputs normal msgs to stdout instead of stderr.
+* do not ignore a non-terminated last line of a file.
+* new texmf.cnf variables SELFAUTOGRANDPARENT, guess_input_kanji_encoding.
+* Numerous changes for Windows.
+
+6.1.1 (for TeX Live 2013, 30 May 2013)
+* just one tree: merge texmf into texmf-dist.
+
+6.1.0 (for TeX Live 2012, 1 July 2012)
+* texmf.cnf is found in the great-grandparent's texmf-local,
+ corresponding to the default TeX Live installation.
+* New formats for .ris, .bltxml.
+* Merge with W32TeX.
+
+6.0.1 (for TeX Live 2011, 5 July 2011)
+* Trailing comments and whitespace omitted from config values.
+* Add .tlu to type lua suffixes, and .dfont to truetype suffixes.
+* Prefix program_invocation{,_short}_name with kpse_.
+* Finally remove kpse_set_progname (deprecated since 1998).
+
+6.0.0 (for TeX Live 2010, 4 June 2010)
+* Change xmalloc and friends to use size_t, unfortunately changing the ABI.
+
+5.0.0 (for TeX Live 2009, 13 October 2009)
+* Make shared library version and general package version the same.
+* Make library re-entrant, thus unavoidable binary API changes.
+* Change build system to Automake.
+
+3.5.7 (for TeX Live 2008, 8 July 2008)
+* kpsewhich has new options --all (to report all matches) and --subdir
+ (to limit matches).
+* more file suffixes (.dtx, et al.) and special files (updmap.cfg, et al.)
+ found automatically.
+* add basic Lua support.
+* add 64-bit functions for pdftex.
+* autoconf support finally modernized.
+
+3.5.6 (for TeX Live 2006-07, 30 December 2006)
+* longstanding minor portability/warnings problems.
+
+3.5.5
+* Copyrights of some source files were erroneously attributed to FSF.
+* On Unix, accept the semicolon as well as the colon in environment
+ variables like TEXINPUTS.
+* Keep metafont from choking on large literals (> 4000) when calling
+ mktexpk.
+
+3.5.4 (7 March 2005)
+* Change of some standard environment/texmf.cnf variables:
+ HOMETEXMF -> TEXMFHOME
+ VARTEXMF -> TEXMFVAR
+ TEXMFVAR, TEXMFCONFIG: Always defined for the sake of teTeX 3.0.
+ TEXMFSYSVAR, TEXMFSYSCONFIG: Added for the sake of teTeX 3.0.
+* mktex*: A new option for MT_FEATURES in mktex.cnf: texmfvar. If
+ selected, files that would be written into a system texmf tree go
+ to the TEXMFVAR tree. Overriden by varfonts.
+
+3.5.3 (28 November 2004)
+* New options for kpsewhich
+ -var-value=VARIABLE to expand $VARIABLE without having to give an $
+ on the command line.
+ -engine=ENGINE to set the engine name, used in some search paths.
+* New formats: kpse_enc_format, kpse_cmap_format, kpse_sfd_format,
+ kpse_opentype_fomat, kpse_pdftex_config_format, kpse_lig_format,
+ kpse_texmfscript_format.
+* Add .afmt to the suffixes for kpse_fmt_format. Aleph uses this.
+* Rename access to kpseaccess.
+* Rename readlink to kpsereadlink.
+* Stop search early if we're given absolute or explicit relative names.
+* Add 'angle(0,0)' to the metafont errors mktexpk will ignore.
+* The withenable.ac script (used in configure) will fall back on using
+ kpsewhich to look for texmf trees.
+* If ls-R is not found check for ls-r as well.
+* kpsewhich: add -var-value option.
+
+3.5.2 (19 February 2003)
+* Critical bugfix to db.c.
+
+3.5.1 (17 February 2003)
+* No news.
+
+3.5.0 (15 February 2003)
+* Use libtool.
+* Do absolute searches again.
+* Retain '${prefix}' in Makefile for texmf if that's how we found the tree.
+
+3.4.6 (7 February 2003)
+* Support for e-Omega.
+* Change to the search algorithm: when there are several possibilities, look
+ for all of them in one directory before moving to the next directory.
+
+3.4.5 (28 January 2003)
+* Remove "." from the TEXCONFIG path.
+
+3.4.4 (16 January 2003)
+* Add VARTEXMF HOMETEXMF to the default paths of texmf.in.
+
+3.4.3 (11 January 2003)
+* Minor fixes.
+* Use both .w and .web suffixes for cweb.
+
+3.4.2 (23 December 2002)
+* Minor fixes to makefiles.
+* A Win32 implementation of the fork/exec path in mktex. This leaves
+ MSDOS to be done.
+
+3.4.1 (20 December 2002)
+* A couple of fixes for the fork/exec code.
+
+3.4.0 (14 December 2002)
+* 3.4.x number as ABI is certainly broken now.
+* Change the way the mktex* command lines are set up on unix systems.
+ Now we call fork/exec directly instead of using popen.
+ This code is not yet implemented for Windows/DOS.
+* We're now (un?)fairly restrictive on what names are allowed for fonts.
+ That part of the code probably need improvement.
+* When reading names from the ls-R file, they are no longer case-smashed.
+ So on platforms where this matters, the case-smashing should occur before
+ names are inserted into the ls-R file -- only lowercase should be used in
+ that file.
+
+3.3.11 (13 November 2002)
+* Minor fixes.
+
+3.3.10 (11 November 2002)
+* Minor fixes.
+
+3.3.9 (22 October 2002)
+* New extension: .oft for Omega formats.
+
+3.3.8 (11 October 2002)
+* Add support for mktexfmt (which is normally a link to fmtutil).
+* Check both VAR.progname and VAR_progname in the environment.
+
+3.3.7 (27 November 2001)
+* Minor fixes/changes to assist Omega development.
+
+3.3.6 (18 November 2001)
+* Minor fixes/changes to assist Omega development.
+
+3.3.5 (10 November 2001)
+* Minor bug fixes.
+
+3.3.4 (30 October 2001)
+* Minor bug fixes.
+
+3.3.3 (5 August 2000)
+* On NeXT, 'rm -rf' will not fail, but uses the cwd as its argument.
+ mktexlsr counted on it to fail, with sometimes disastrous results.
+
+3.3.2 (25 April 1999)
+* Minor bug fixes.
+
+3.3.1 (29 May 1999)
+* Minor bug fixes.
+
+3.3 (26 March 1999)
+* Minor bugfixes.
+
+3.2 (15 March 1998)
+* Brace expansion will accept the path separator as well as the comma,
+ e.g., {foo:bar}.
+* For TeX, we only recognize one suffix, because there is no such thing
+ as a canonical list of TeX suffixes.
+* We distinguish between two kinds of suffixes in the code: the standard
+ suffixes which may be appended to filenames when searching; and the
+ alternative suffixes which are never appended, but when found this
+ prevents a search with one of the standard suffixes.
+* kpse_reset_program_name: change assumed program name, resets the search
+ paths, so that searches will work as expected for the new name.
+* kpse_set_program_name: new function, replaces kpse_set_progname.
+* The MakeTeX* scripts have been renamed to mktex* forms.
+
+3.1 (10 November 1997)
+* The support for multiple texmf trees is much improved.
+* New MakeTeX* scripts, based on teTeX's. These scripts now use
+ heuristics to decide where generated files are placed and which
+ permissions they should have.
+* The varfonts feature is enabled by default.
+* Some MSDOS/Win32 support added to the sources.
+* Change in searching algorithm: if a name doesn't have the default suffix
+ we append it for the first search. Then we search for the bare name.
+ Thus if you have foo.bar and foo.bar.tex, the latter will now be found
+ first. Under the old system, you had to specify boo.bar.tex.tex to get
+ foo.bar.tex instead of foo.bar.
+* Prepend the value of KPSE_DOT to relative paths from texmf.cnf if it
+ defined in the environment. This means we can use . instead of
+ $KPSE_DOT in paths.
+* Define brace expansion so that {a,b}{1,2} expands to a1:b1:a2:b2. This
+ is different from how shells do it, and exploited in texmf.in.
+* Renamed texmf.cnf.in to texmf.in.
+* New value for debugging: DEBUG_VARS, equal to 64.
+* If a file format has no suffix, allow its long name as the argument to
+ kpsewhich --format.
+
+3.0 (7 February 1997)
+* Distribution terms changed to the GNU Library General Public License.
+* Default directory structure matches the TDS standard. The most
+ important change is in the fonts/ directory: the file type (tfm, pk)
+ is now directly underneath fonts/. Also, mft/ is now at the top level.
+ `modeless' is used for gsftopk/ps2pk/etc.-generated fonts.
+* Change in searching algorithm: if the name already has a suffix
+ (foo.sty), search for it by itself first, before appending the default
+ suffix (foo.sty.tex). This loses if you have an executable named
+ foo.bar, with documentation in foo.bar.tex (foo.bar will be found
+ first). But this is unusual, and the other case is common.
+* Environment variables PATH_program (e.g., TEXINPUTS_latex) checked
+ for, as with configuration file values (TEXINPUTS.latex).
+* Multiple TEXMF trees supported, via the following new facility:
+* Shell brace expansion {foo,bar} implemented, thanks to Bash.
+* Multiple ls-R files supported via the TEXMFDBS path.
+* An ``alias'' database for files in ls-R supported, to handle 8.3 problems.
+* Directories in the ls-R file can be relative (./) as well as absolute (/).
+* New MakeTeX{PK,TFM,MF} scripts with more features, based on teTeX's.
+* DVIPSMAKEPK (etc.) actually overrides the name `MakeTeXPK', as documented.
+* MakeTeX* can be globally disabled via configure options.
+* Support for building as a shared library with configure --enable-shared.
+* Directories whose names begin with `.' are ignored.
+* Some warnings can be suppressed by TEX_HUSH cnf value or envvar.
+* kpsewhich has many new capabilities, documented via --help and in the manual.
+* texfonts.map parsing has an include directive, and @c is a comment.
+* Input lines in texmf.cnf can be continued with \.
+* TEXMFLOG can be set in texmf.cnf, as previously documented.
+* SELFAUTODIR and SELFAUTOPARENT are defined according to the location
+ of the binary, and used to search for texmf.cnf.
+* /// (or more) is equivalent to //.
+* If $HOME = / (as with root on some systems), avoid creating // in paths.
+* Support for AFM, PostScript Type 1 font, source, documentation, Omega,
+ and MetaPost-related file formats.
+* New header kpathsea.h with all #include files.
+* Under DOS, ls-R lines need not start with . or / or \ (e.g., c:).
+* Amiga support.
+
+2.6 (9 January 1995)
+* MakeTeXPK installed from kpathsea, instead of each driver.
+* MakeTeXPK.site looked for in texmf/web2c, instead of texmf/dvips.
+* texmf.cnf installed and looked for in texmf/web2c, instead of texmf.
+* If a mode is not explicitly specified, search all subdirectories (this
+ was actually in a previous release).
+* install-sh only looked for in the top-level directory.
+* kpsewhich replaces and generalizes kpsexpand.
+
+2.5 (15 December 1994)
+* Go back to calling db_insert after a successful MakeTeXPK, and check
+ for lack of an ls-R.
+* Handle case of magstep -.5 for MakeTeXPK properly.
+
+2.4 (28 October 1994)
+* Avoid calling db_insert, which caused a segmentation fault.
+
+2.3 (26 October 1994)
+* Extra :'s in an envvar value, referring to the texmf.cnf value, work.
+* Names like dpi600/cmr10.pk can be found in ls-R.
+* KPATHSEA_DEBUG environment variable checked.
+* Directories like pk/ljfour directly under $TEXMF/fonts are found.
+* New standalone program, kpsexpand, optionally compiled and installed,
+ to do variable expansion (not path searching).
+* Debugging output written to stderr instead of stdout.
+* pxlNNN support removed; I never intended to support `pxl1500', and
+ pxl300 is never used.
+
+2.2 (14 October 1994)
+* MakeTeXPK invoked for the any_glyph type; this is for xdvik.
+* MakeTeXPK sources $(psheaderdir)/MakeTeXPK.site if it exists.
+* pxlNNN/cmr10.pk searched for (as well as dpiNNN/cmr10.pk and cmr10.NNNpk)
+
+2.1 (12 September 1994)
+* Manual goes through TeX, and .cps/.aux files are in the distribution.
+* INSTALL* variables set at the top level.
+* Dependency on GNU tr making paths.h and texmf.sed (->texmf.cnf) removed.
+* texmf.cnf installed if it didn't previously exist.
+
+2.0 (8 September 1994)
+* Runtime configuration file support; see the manual.
+* Both dpi600/cmr10.pk and cmr10.600pk are searched for.
+* ls-R matches $TEXMF//latex2e vs. $TEXMF//latex209.
+* $TEXMFLOG, if set, specifies a filename for logging successful searches.
+* All directory entries beginning with `.' are ignored, not just `.' and `..'.
+* Default path for PK and GF fonts includes the mode name.
+* ls-R is in $TEXMFROOT instead of hardwired at compile time.
+* More debugging flags, and they can be set with client program options.
+* If MakeTeX{PK,TFM} fail, or aren't invoked, a file missfont.log is
+ written with the requisite commands, as in dvips.
+* More 328/329/330 fixes, maybe for the last time.
+* The override font paths (XDVIFONTS etc.) apply only to glyph (PK/GF)
+ searches, not TFM or VF.
+* -g is not the default when linking, to avoid unnecessarily large binaries
+ (due to static libraries) under Linux.
+* configure checks for a smart putenv.
+* Stat results are cached to speed up disk searches.
+
+1.8 (2 April 1994)
+* New target install-info, so the documentation can be installed without
+ the headers.
+* Existing but unreadable files are complained about, instead of just ignored.
+* A leading %% in a path element forbids searching the disk for that
+ element; only a db will be searched (if it exists).
+* The db is only used if it might be relevant to a given path element,
+ not searched first regardless.
+
+1.7 (1 March 1994)
+* Searches can use an externally-built ls-R ``database'', for speed.
+* `VPATH = .' lines removed from generated Makefile, for broken Sun make.
+* A path foo//tfm finds foo/tfm as well as foo/*/tfm.
+
+1.6 (3 February 1994)
+* Memory fault in copying long paths fixed.
+* More variables passed down from the top-level Makefile.
+* Mention SMART_PUTENV in the INSTALL file, and fix bug in xputenv.c
+ when one envvar is a proper prefix of another.
+* More attempts at eliminating magstephalf annoyances.
+* Directory name substitutions are done globally when creating paths.h.
+* Various changes for DOS.
+
+1.5 (24 January 1994)
+* Default paths changed.
+* Defining GCC_WCHAR lets GCC define wchar_t.
+* EXIT_FAILURE and EXIT_SUCCESS defined in all cases (if they're not already).
+* str[r]chr never redefined (I hope).
+
+1.4 (3 November 1993)
+* Check closest fallback font size.
+* All default paths (including dvips') in paths.h.in, not the Makefile.
+* Rearrange directory lists so that dirs in which a file is found
+ migrate to the top.
+* Update for Autoconf 1.7.
+
+1.3 (6 October 1993)
+* Fix free of non-malloced memory bug.
+* Fix uninitialized gf path bug.
+* mkdirchain invoked as an absolute filename.
+
+1.2 (27 September 1993)
+* Running MakeTeXPK is tried before the fallback resolutions.
+* The final bitmap name uses a variable spec, so DOS & OS/2 can get
+ dpi300/cmr10.pk.
+* Document TeX-specific features.
+* Dpi passed to MakeTeXPK via the envvar KPATHSEA_DPI instead of MAKETEX_DPI.
+
+1.1 (26 August 1993)
+* Installation fixes.
+
+1.0 (5 August 1993)
+* Routines to look up TeX font files, default path specifications, etc.
+* Sort-of pattern matching: /foo//bar matches subdirectories
+ /foo/a/bar, /foo/b/bar, /foo/a1/a2/bar, etc.
+* $var and ${var} expansion.
+* Support for MakeTeX... scripts.
+* Support for fallback resolutions and font.
+* Lazy evaluation of path elements.
+* Some runtime debugging support.
+
+0.2 (12 May 1993)
+
+First general release as a standalone library.
diff --git a/Build/source/texk/kpathsea/PROJECTS b/Build/source/texk/kpathsea/PROJECTS
new file mode 100644
index 00000000000..4db45d395de
--- /dev/null
+++ b/Build/source/texk/kpathsea/PROJECTS
@@ -0,0 +1,23 @@
+(This file is public domain.)
+
+Here are some ideas for improvements. If you would like to contribute,
+please send mail to tex-k@tug.org first.
+
+Kpathsea has never officially been released as a standalone library,
+even though in practice it is used that way by OS distributions.
+It would be good to support a standalone release.
+
+It would be cleaner to always do a case-insensitive search for all
+suffixes, instead explicitly listing (for example) both ".otf" and ".OTF".
+
+For multiple texmf.cnf files (or multiple dvips configuration files),
+replace extra :'s by the value from the next file in the path, rather
+than the value from the next level. But compatibility probably requires
+that this not be done.
+
+Support runtime registration of file types to search for, not just
+compile-time. Either by a procedure call, or by reading a configuration
+file. Implies putting the envvar list into the kpse_format_info_type struct.
+
+cd during filesystem operations, to minimize the pathname
+length. Implies always using xgetwd.
diff --git a/Build/source/texk/kpathsea/README b/Build/source/texk/kpathsea/README
new file mode 100644
index 00000000000..9b2bbcc59c2
--- /dev/null
+++ b/Build/source/texk/kpathsea/README
@@ -0,0 +1,15 @@
+(This file is public domain.)
+
+This directory contains the Kpathsea[rch] library, which implements
+generic path searching, configuration, and TeX-specific file searching.
+
+See `NEWS' for changes by release, `ChangeLog` for all changes.
+See `PROJECTS' for future improvements you might consider working on.
+
+The principal mailing list is http://lists.tug.org/tex-k.
+Kpathsea is maintained as part of TeX Live, http://tug.org/texlive.
+
+The top-level headers are `pathsearch.h' for the generic path searching
+support, and `tex-{file,glyph}.h' for the TeX-specific support.
+
+This is free software, released under the GNU LGPL, version 2.1 or later.
diff --git a/Build/source/texk/kpathsea/absolute.c b/Build/source/texk/kpathsea/absolute.c
new file mode 100644
index 00000000000..6fc386b053b
--- /dev/null
+++ b/Build/source/texk/kpathsea/absolute.c
@@ -0,0 +1,96 @@
+/* absolute.c: test if a filename is absolute or explicitly relative.
+
+ Copyright 1993, 1994, 1995, 2008, 2009, 2010, 2011 Karl Berry.
+ Copyright 1997, 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/absolute.h>
+#include <kpathsea/c-pathch.h>
+
+/* Sorry this is such a system-dependent mess, but I can't see any way
+ to usefully generalize. */
+
+boolean
+kpathsea_absolute_p (kpathsea kpse, const_string filename, boolean relative_ok)
+{
+#ifdef VMS
+#include <string.h>
+ (void)kpse; /* currenty not used */
+ return strcspn (filename, "]>:") != strlen (filename);
+#else /* not VMS */
+ boolean absolute;
+ boolean explicit_relative;
+
+ absolute = IS_DIR_SEP (*filename)
+#ifdef DOSISH
+ /* Novell allows non-alphanumeric drive letters. */
+ || (*filename && IS_DEVICE_SEP (filename[1]))
+#endif /* DOSISH */
+#ifdef WIN32
+ /* UNC names */
+ || (*filename == '\\' && filename[1] == '\\')
+ || (*filename == '/' && filename[1] == '/')
+#endif /* WIN32 */
+#ifdef AMIGA
+ /* Colon anywhere means a device. */
+ || strchr (filename, ':')
+#endif /* AMIGA */
+ ;
+ explicit_relative
+ = relative_ok
+#ifdef AMIGA
+ /* Leading / is like `../' on Unix and DOS. Allow Unix syntax,
+ too, though, because of possible patch programs like
+ `UnixDirsII' by Martin Scott. */
+ && IS_DIR_SEP (*filename) || 0
+#endif /* AMIGA */
+ && (*filename == '.' && (IS_DIR_SEP (filename[1])
+ || (filename[1] == '.' && IS_DIR_SEP (filename[2]))));
+
+ (void)kpse; /* currenty not used */
+ /* FIXME: On UNIX an IS_DIR_SEP of any but the last character in the name
+ implies relative. */
+ return absolute || explicit_relative;
+#endif /* not VMS */
+}
+
+#if defined (KPSE_COMPAT_API)
+boolean
+kpse_absolute_p (const_string filename, boolean relative_ok)
+{
+ return kpathsea_absolute_p (kpse_def, filename, relative_ok);
+}
+#endif
+
+#ifdef TEST
+int main()
+{
+ char **name;
+ char *t[] = { "./foo", "\\\\server\\foo\\bar", "ftp://localhost/foo" };
+
+ for (name = t; name - t < sizeof(t)/sizeof(char*); name++) {
+ printf ("Path `%s' %s absolute.\n", *name,
+ kpse_absolute_p(*name, true) ? "is" : "is not");
+ }
+}
+#endif /* TEST */
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST absolute.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/absolute.h b/Build/source/texk/kpathsea/absolute.h
new file mode 100644
index 00000000000..a75b3b43ae6
--- /dev/null
+++ b/Build/source/texk/kpathsea/absolute.h
@@ -0,0 +1,44 @@
+/* absolute.h: declare absolute filename predicate.
+
+ Copyright 1993, 1994, 2008, 2009 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_ABSOLUTE_H
+#define KPATHSEA_ABSOLUTE_H
+
+#include <kpathsea/types.h>
+#include <kpathsea/c-proto.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* True if FILENAME is absolute (/foo) or, if RELATIVE_OK is true,
+ explicitly relative (./foo, ../foo), else false (foo). */
+
+extern KPSEDLL boolean kpathsea_absolute_p (kpathsea kpse,
+ const_string filename, boolean relative_ok);
+
+#if defined(KPSE_COMPAT_API)
+extern KPSEDLL boolean kpse_absolute_p (const_string filename,
+ boolean relative_ok);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_ABSOLUTE_H */
diff --git a/Build/source/texk/kpathsea/ac/kpathsea.ac b/Build/source/texk/kpathsea/ac/kpathsea.ac
new file mode 100644
index 00000000000..fc90d33ca1d
--- /dev/null
+++ b/Build/source/texk/kpathsea/ac/kpathsea.ac
@@ -0,0 +1,11 @@
+## texk/kpathsea/ac/kpathsea.ac: configure.ac fragment for the TeX Live subdirectory texk/kpathsea/
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## basic check of system kpathsea
+KPSE_TRY_LIB([kpathsea],
+ [#include <kpathsea/kpathsea.h>
+#include <kpathsea/version.h>],
+ [const char *version = kpathsea_version_string;
+kpse_set_program_name("prog", "name");])
diff --git a/Build/source/texk/kpathsea/ac/mktex.ac b/Build/source/texk/kpathsea/ac/mktex.ac
new file mode 100644
index 00000000000..fe8deeb9dbd
--- /dev/null
+++ b/Build/source/texk/kpathsea/ac/mktex.ac
@@ -0,0 +1,20 @@
+## texk/kpathsea/ac/mktex.ac: configure.ac fragment for the TeX Live
+## subdirectory texk/kpathsea.
+dnl
+dnl Copyright (C) 2009, 2011 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## configure defaults for mktexfmt & Co.
+m4_define_default([kpse_indent_26], [26])[]dnl
+m4_define([kpse_mktex_opts], [dnl
+[[mktexmf], [yes], [MF source], [TEX_MF]],
+[[mktexpk], [yes], [PK font], [TEX_PK]],
+[[mktextfm], [yes], [TFM file], [TEX_TFM]],
+[[mkocp], [yes], [OCP file], [OMEGA_OCP]],
+[[mkofm], [yes], [OFM file], [OMEGA_OFM]],
+[[mktexfmt], [yes], [format file], [TEX_FMT]],
+[[mktextex], [no], [TeX source], [TEX_TEX]],
+])[]dnl
+m4_foreach([Kpse_Mktex], [kpse_mktex_opts],
+ [m4_ifset([Kpse_Mktex],
+ [KPSE_WITH_MKTEX(Kpse_Mktex)])])[]dnl
diff --git a/Build/source/texk/kpathsea/ac/withenable.ac b/Build/source/texk/kpathsea/ac/withenable.ac
new file mode 100644
index 00000000000..1dfc28533bc
--- /dev/null
+++ b/Build/source/texk/kpathsea/ac/withenable.ac
@@ -0,0 +1,8 @@
+## texk/kpathsea/ac/withenable.ac: configure.ac fragment for the TeX Live subdirectory texk/kpathsea/
+dnl
+dnl Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
+dnl You may freely use, modify and/or distribute this file.
+dnl
+## configure options and TL libraries required for kpathsea
+KPSE_WITH_TEXLIB([kpathsea])
+m4_include(kpse_TL[texk/kpathsea/ac/mktex.ac])
diff --git a/Build/source/texk/kpathsea/access.c b/Build/source/texk/kpathsea/access.c
new file mode 100644
index 00000000000..5e53d2965bf
--- /dev/null
+++ b/Build/source/texk/kpathsea/access.c
@@ -0,0 +1,95 @@
+/* access -- test for access permissions of a file.
+
+ Copyright 2008, 2009-2019 Karl Berry.
+ Copyright 1997-2001, 2005 Olaf Weber.
+
+ This program is free software; you can 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this software; if not, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-unistd.h>
+#include <kpathsea/c-memstr.h>
+
+/*
+ * access mode x
+ * Returns 0 is x exists and can be accessed in accordance with mode.
+ * We use this rather than test because test looks at the permissions
+ * only, which doesn't take read-only file systems into account.
+ */
+
+int
+main (int argc, char **argv)
+{
+ int mode;
+ int status;
+ char * i;
+
+ if (argc > 1 && strcmp (argv[1], "--help") == 0) {
+ printf("Usage: %s -MODE FILE\n\
+ MODE is one or more of rwx. Exit successfully if FILE exists and is\n\
+ readable (r), writable (w), or executable (x).\n\
+\n\
+--help display this help and exit\n\
+--version output version information and exit\n\n", argv[0]);
+ fputs ("Email bug reports to tex-k@tug.org.\n", stdout);
+ exit(0);
+ } else if (argc > 1 && strcmp (argv[1], "--version") == 0) {
+ printf ("%s (%s)\n\
+Copyright (C) 2009 Olaf Weber & Karl Berry.\n\
+There is NO warranty. You may redistribute this software\n\
+under the terms of the GNU General Public License\n\
+For more information about these matters, see the file named COPYING.\n\
+Primary author of %s: Olaf Weber.\n",
+argv[0], KPSEVERSION, argv[0]);
+ exit (0);
+ }
+
+ /* insist on exactly two args */
+ if (argc != 3) {
+ fprintf(stderr, "%s: Need exactly two arguments.\n\
+Try `%s --help' for more information.\n", argv[0], argv[0]);
+ exit(1);
+ }
+
+ /* The option parsing is somewhat primitive. The mode must be
+ * specified as a single parameter: an optional '-' followed by
+ * zero or more letters 'r', 'w', or 'x'. This may change.
+ */
+ mode = 0;
+ i = argv[1];
+ for (i = argv[1]; *i; ++i)
+ switch (*i) {
+ case 'r': mode |= R_OK; break;
+ case 'w': mode |= W_OK; break;
+#if defined(_WIN32)
+/* access() crashes for unsupported test of x bit */
+ case 'x': break;
+#else
+ case 'x': mode |= X_OK; break;
+#endif
+ case '-': if (i == argv[1]) break;
+ default:
+ fprintf(stderr, "%s: Invalid MODE.\n", argv[0]);
+ exit(1);
+ }
+
+ status = access(argv[2], mode);
+
+ /* fail if the access call failed */
+ if (status != 0) {
+ return 1;
+ }
+
+ /* otherwise, succeed */
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/aclocal.m4 b/Build/source/texk/kpathsea/aclocal.m4
new file mode 100644
index 00000000000..f5ed95d4077
--- /dev/null
+++ b/Build/source/texk/kpathsea/aclocal.m4
@@ -0,0 +1,1178 @@
+# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
+
+# Copyright (C) 1996-2020 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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+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-2020 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.16'
+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.16.3], [],
+ [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.16.3])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-2020 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],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2020 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_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$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-2020 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.
+
+
+# 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", "OBJC", "OBJCXX", "UPC", or "GJC".
+# 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
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" 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".
+ rm -rf conftest.dir
+ 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 10 /bin/sh.
+ echo '/* dummy */' > 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
+ ;;
+ msvc7 | msvc7msys | 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], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2020 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_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf 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.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
+}
+])# _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.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll 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" MAKE="${MAKE-make}"])])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2020 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 macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# 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.65])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],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [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([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). 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])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro 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
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+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-2020 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+set}" != 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-2020 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.
+
+# 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])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996-2020 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_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2020 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_MAKE_INCLUDE()
+# -----------------
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2020 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_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 is modern enough.
+# If it is, 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
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2020 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_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])])
+
+# Copyright (C) 1999-2020 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_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != 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
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2020 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_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+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); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2020 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_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# 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 (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ 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
+ 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
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ 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])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2020 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_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], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+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
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2020 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-2020 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_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-2020 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_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. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ 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])
+ AM_RUN_LOG([cat conftest.dir/file])
+ 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([../../m4/kpse-common.m4])
+m4_include([../../m4/kpse-lib-version.m4])
+m4_include([../../m4/kpse-mktex.m4])
+m4_include([../../m4/kpse-warnings.m4])
+m4_include([../../m4/kpse-win32.m4])
+m4_include([../../m4/libtool.m4])
+m4_include([../../m4/ltoptions.m4])
+m4_include([../../m4/ltsugar.m4])
+m4_include([../../m4/ltversion.m4])
+m4_include([../../m4/lt~obsolete.m4])
diff --git a/Build/source/texk/kpathsea/atou.c b/Build/source/texk/kpathsea/atou.c
new file mode 100644
index 00000000000..78afdfe7ce7
--- /dev/null
+++ b/Build/source/texk/kpathsea/atou.c
@@ -0,0 +1,28 @@
+/* atou.c: like atoi, but if the number is negative, abort.
+
+ Copyright 1992, 1995, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include "config.h"
+
+unsigned
+atou (const_string s)
+{
+ int i = atoi (s);
+
+ if (i < 0)
+ FATAL1 ("I expected a positive number, not %d", i);
+ return i;
+}
diff --git a/Build/source/texk/kpathsea/bsnl.awk b/Build/source/texk/kpathsea/bsnl.awk
new file mode 100644
index 00000000000..5464628b788
--- /dev/null
+++ b/Build/source/texk/kpathsea/bsnl.awk
@@ -0,0 +1,17 @@
+# bsnl.awk - eliminate backslash-newline sequences
+# Public domain. Originally written 2010, Karl Berry.
+
+# on a line ending with a backslash, save it (minus the backslash).
+/\\$/ {
+ buf = buf substr ($0, 1, length ($0) - 1);
+ next;
+ }
+
+# on other lines, print the buffer if there is one, then the regular line.
+ {
+ if (buf) {
+ printf "%s", buf; # don't print a newline
+ buf = "";
+ }
+ print;
+ }
diff --git a/Build/source/texk/kpathsea/c-auto.in b/Build/source/texk/kpathsea/c-auto.in
new file mode 100644
index 00000000000..c8498cd71aa
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-auto.in
@@ -0,0 +1,239 @@
+/* c-auto.in. Generated from configure.ac by autoheader. */
+
+/* c-auto.h: defines for kpathsea, as determined by configure.
+
+ Copyright 1994-97, 2008-2015 Karl Berry.
+ Copyright 1997-99, 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+/* Guard against double inclusion. */
+#ifndef KPATHSEA_C_AUTO_H
+#define KPATHSEA_C_AUTO_H
+
+/* kpathsea: the version string. */
+#define KPSEVERSION "kpathsea version 6.3.3"
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* Define to 1 if getcwd is implemented using fork or vfork. Let me know if
+ you have to add this by hand because configure failed to detect it. */
+#undef GETCWD_FORKS
+
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
+/* Define to 1 if you have the declaration of `isascii', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ISASCII
+
+/* Define to 1 if you have the declaration of `putenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_PUTENV
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* 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 `getwd' function. */
+#undef HAVE_GETWD
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `memcmp' function. */
+#undef HAVE_MEMCMP
+
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the `mktemp' function. */
+#undef HAVE_MKTEMP
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the `putenv' function. */
+#undef HAVE_PUTENV
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* 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 `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if `st_mtim' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_MTIM
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+#undef HAVE_SYS_NDIR_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/stat.h> header file. */
+#undef HAVE_SYS_STAT_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 <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Define to 1 if you want to run mkocp if OCP file is missing, and to 0 if
+ you don't */
+#undef MAKE_OMEGA_OCP_BY_DEFAULT
+
+/* Define to 1 if you want to run mkofm if OFM file is missing, and to 0 if
+ you don't */
+#undef MAKE_OMEGA_OFM_BY_DEFAULT
+
+/* Define to 1 if you want to run mktexfmt if format file is missing, and to 0
+ if you don't */
+#undef MAKE_TEX_FMT_BY_DEFAULT
+
+/* Define to 1 if you want to run mktexmf if MF source is missing, and to 0 if
+ you don't */
+#undef MAKE_TEX_MF_BY_DEFAULT
+
+/* Define to 1 if you want to run mktexpk if PK font is missing, and to 0 if
+ you don't */
+#undef MAKE_TEX_PK_BY_DEFAULT
+
+/* Define to 1 if you want to run mktextex if TeX source is missing, and to 0
+ if you don't */
+#undef MAKE_TEX_TEX_BY_DEFAULT
+
+/* Define to 1 if you want to run mktextfm if TFM file is missing, and to 0 if
+ you don't */
+#undef MAKE_TEX_TFM_BY_DEFAULT
+
+/* 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
+
+/* 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 size of `long', as computed by sizeof. */
+#undef SIZEOF_LONG
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if we need (v)snprintf wrapper functions. */
+#undef WRAP_SNPRINTF
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#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 for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* 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 the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#undef int64_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+#endif /* !KPATHSEA_C_AUTO_H */
diff --git a/Build/source/texk/kpathsea/c-ctype.h b/Build/source/texk/kpathsea/c-ctype.h
new file mode 100644
index 00000000000..5e453e08fbb
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-ctype.h
@@ -0,0 +1,85 @@
+/* c-ctype.h: ASCII-safe versions of the <ctype.h> macros.
+
+ Copyright 1992, 1994, 2008, 2010, 2011, 2015 Karl Berry.
+ Copyright 1998, 2000, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_CTYPE_H
+#define KPATHSEA_C_CTYPE_H
+
+#include <ctype.h>
+
+/* Be sure we have `isascii'. */
+#ifndef WIN32
+#if !(defined(HAVE_DECL_ISASCII) && HAVE_DECL_ISASCII)
+#define isascii(c) (((c) & ~0x7f) == 0)
+#endif
+#endif
+
+#define ISALNUM(c) (isascii (c) && isalnum((unsigned char)c))
+#define ISALPHA(c) (isascii (c) && isalpha((unsigned char)c))
+#define ISASCII isascii
+#define ISCNTRL(c) (isascii (c) && iscntrl((unsigned char)c))
+#define ISDIGIT(c) (isascii (c) && isdigit ((unsigned char)c))
+#define ISGRAPH(c) (isascii (c) && isgraph((unsigned char)c))
+#define ISLOWER(c) (isascii (c) && islower((unsigned char)c))
+#define ISPRINT(c) (isascii (c) && isprint((unsigned char)c))
+#define ISPUNCT(c) (isascii (c) && ispunct((unsigned char)c))
+#define ISSPACE(c) (isascii (c) && isspace((unsigned char)c))
+#define ISUPPER(c) (isascii (c) && isupper((unsigned char)c))
+#define ISXDIGIT(c) (isascii (c) && isxdigit((unsigned char)c))
+#define TOASCII toascii
+#define TOLOWER(c) (ISUPPER (c) ? tolower ((unsigned char)c) : (c))
+#define TOUPPER(c) (ISLOWER (c) ? toupper ((unsigned char)c) : (c))
+
+/* This isn't part of the usual <ctype.h>, but it's useful sometimes. */
+#ifndef isblank
+#define isblank(c) ((c) == ' ' || (c) == '\t')
+#endif
+
+#define ISBLANK(c) (isascii (c) && isblank ((unsigned char)c))
+
+
+/* Here's why this mess is necessary:
+
+From: meyering@cs.utexas.edu (Jim Meyering)
+Date: Wed, 25 Nov 1992 09:52:33 -0600
+Subject: ss-921123: using isascii with <ctype.h> macros
+
+ Yesterday some cursory regression testing found that GNU od
+ (in an upcoming release of textutils) generated incorrect output
+ when run on an SGI indigo because isprint ('\377') returned true.
+ Of course, '\377' is not a printing character; the problem lay
+ in using isprint without first making sure its integer argument
+ corresponded to an ascii code.
+
+ MORAL: always guard uses of ctype macros with isascii if it's available.
+ An obvious alternative is to avoid <ctype.h> and define and use your
+ own versions of the ctype macros.
+
+ A pretty clean approach to using <ctype.h> and isascii was
+ suggested by David MacKenzie:
+
+ #ifndef isascii
+ #define isascii(c) 1
+ #endif
+
+ #define ISDIGIT(c) (isascii (c) && isdigit (c))
+ #define ISPRINT(c) (isascii (c) && isprint (c))
+ ...
+
+ then, use ISDIGIT, etc. instead of isdigit, etc. */
+
+#endif /* not KPATHSEA_C_CTYPE_H */
diff --git a/Build/source/texk/kpathsea/c-dir.h b/Build/source/texk/kpathsea/c-dir.h
new file mode 100644
index 00000000000..ae177faf31e
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-dir.h
@@ -0,0 +1,52 @@
+/* c-dir.h: directory headers.
+
+ Copyright 1992, 1993, 1994, 2008 Karl Berry.
+ Copyright 1998, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_DIR_H
+#define KPATHSEA_C_DIR_H
+
+#ifdef WIN32
+
+#include <direct.h>
+
+#else /* not WIN32 */
+
+/* Use struct dirent instead of struct direct. */
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#define NAMLEN(dirent) strlen ((dirent)->d_name)
+#else /* not DIRENT */
+#define dirent direct
+#define NAMLEN(dirent) ((dirent)->d_namlen)
+
+#ifdef HAVE_SYS_NDIR_H
+#include <sys/ndir.h>
+#endif
+
+#ifdef HAVE_SYS_DIR_H
+#include <sys/dir.h>
+#endif
+
+#ifdef HAVE_NDIR_H
+#include <ndir.h>
+#endif
+
+#endif /* not DIRENT */
+
+#endif /* not WIN32 */
+
+#endif /* not KPATHSEA_C_DIR_H */
diff --git a/Build/source/texk/kpathsea/c-errno.h b/Build/source/texk/kpathsea/c-errno.h
new file mode 100644
index 00000000000..27380ec39a1
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-errno.h
@@ -0,0 +1,27 @@
+/* c-errno.h: <errno.h> and the errno variable.
+
+ Copyright 1992, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_ERRNO_H
+#define KPATHSEA_C_ERRNO_H
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+#endif /* not KPATHSEA_C_ERRNO_H */
diff --git a/Build/source/texk/kpathsea/c-fopen.h b/Build/source/texk/kpathsea/c-fopen.h
new file mode 100644
index 00000000000..7b64ef46352
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-fopen.h
@@ -0,0 +1,77 @@
+/* c-fopen.h: how to open files with fopen.
+
+ Copyright 1992, 1994, 1995, 1996, 2008, 2011 Karl Berry.
+ Copyright 1998, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef C_FOPEN_H
+#define C_FOPEN_H
+
+/* How to open a text file: */
+/* From Akira:
+ I'm using Unix style line ending character to write text files.
+ I find it is easiest to define FOPEN_W_MODE == FOPEN_WBIN_MODE etc. for
+ my purpose. */
+#ifndef FOPEN_A_MODE
+#define FOPEN_A_MODE "ab"
+#endif
+
+#ifndef FOPEN_R_MODE
+#define FOPEN_R_MODE "r"
+#endif
+
+#ifndef FOPEN_W_MODE
+#define FOPEN_W_MODE "wb"
+#endif
+
+/* How to open a binary file for reading: */
+#ifndef FOPEN_RBIN_MODE
+#define FOPEN_RBIN_MODE "rb"
+#endif /* not FOPEN_RBIN_MODE */
+
+/* How to open a binary file for writing: */
+#ifndef FOPEN_WBIN_MODE
+#define FOPEN_WBIN_MODE "wb"
+#endif /* not FOPEN_WBIN_MODE */
+
+/* How to open a binary file for appending: */
+#ifndef FOPEN_ABIN_MODE
+#define FOPEN_ABIN_MODE "ab"
+#endif /* not FOPEN_ABIN_MODE */
+
+/* How to switch an already open file handle to binary mode.
+ Used on DOSISH systems when we need to switch a standard
+ stream, such as stdin or stdout, to binary mode.
+ We never use the value return by setmode(). */
+#include <fcntl.h>
+#ifdef DOSISH
+#include <io.h>
+#ifndef O_BINARY
+#ifdef _O_BINARY
+#define O_BINARY _O_BINARY
+#endif
+#endif
+#if defined (__i386_pc_gnu__) || \
+ defined (WIN32) || defined (__WIN32__) || defined (_WIN32)
+#define SET_BINARY(f) (void)setmode((f), O_BINARY)
+#endif
+#else /* not DOSISH */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+#define SET_BINARY(f) (void)0
+#endif /* not DOSISH */
+
+#endif /* not C_FOPEN_H */
diff --git a/Build/source/texk/kpathsea/c-limits.h b/Build/source/texk/kpathsea/c-limits.h
new file mode 100644
index 00000000000..6a639a6f21d
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-limits.h
@@ -0,0 +1,36 @@
+/* c-limits.h: include the system parameter file.
+
+ Copyright 1992, 1993, 1996, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef C_LIMITS_H
+#define C_LIMITS_H
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#else
+#include <kpathsea/systypes.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#endif /* not HAVE_LIMITS_H */
+
+/* Some systems may have the floating-point limits in the above. */
+#if defined (HAVE_FLOAT_H) && !defined (FLT_MAX)
+#include <float.h>
+#endif
+
+#endif /* not C_LIMITS_H */
diff --git a/Build/source/texk/kpathsea/c-memstr.h b/Build/source/texk/kpathsea/c-memstr.h
new file mode 100644
index 00000000000..e8e107a6f98
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-memstr.h
@@ -0,0 +1,63 @@
+/* c-memstr.h: memcpy, strchr, etc.
+
+ Copyright 1992-2013 Karl Berry and Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_MEMSTR_H
+#define KPATHSEA_C_MEMSTR_H
+
+/* <X11/Xfuncs.h> tries to declare bcopy etc., which can only conflict. */
+#define _XFUNCS_H_
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+/* don't ever want both string.h and strings.h; fails on AIX. */
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
+/* An ANSI string.h and pre-ANSI memory.h might conflict. */
+#if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
+#include <memory.h>
+#endif /* not STDC_HEADERS and HAVE_MEMORY_H */
+
+/* For ancient systems that lack the system V/ANSI version of the
+ string functions we express them in terms of the BSD versions. */
+#if !defined(HAVE_STRCHR) && !defined(strchr)
+#define strchr index
+#endif
+
+#if !defined(HAVE_STRRCHR) && !defined(strrchr)
+#define strrchr rindex
+#endif
+
+#if !defined(HAVE_MEMCMP) && !defined(memcmp)
+#define memcmp(s1, s2, n) bcmp ((s1), (s2), (n))
+#endif
+
+#if !defined(HAVE_MEMCPY) && !defined(memcpy)
+#define memcpy(to, from, len) bcopy ((from), (to), (len))
+#endif
+
+#if !defined(HAVE_STRING_H)
+extern char *strtok ();
+#ifndef strstr
+extern char *strstr ();
+#endif
+#endif
+
+#endif /* not KPATHSEA_C_MEMSTR_H */
diff --git a/Build/source/texk/kpathsea/c-minmax.h b/Build/source/texk/kpathsea/c-minmax.h
new file mode 100644
index 00000000000..a46bd2f123e
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-minmax.h
@@ -0,0 +1,84 @@
+/* c-minmax.h: define INT_MIN, etc. Assume a 32-bit machine if the
+ values aren't defined.
+
+ Copyright 1992, 1993, 2008, 2017 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_MINMAX_H
+#define KPATHSEA_C_MINMAX_H
+
+#include <kpathsea/c-limits.h>
+
+/* Declared in <limits.h> on ANSI C systems. If the system doesn't
+ define it, we use the minimum ANSI values -- except for `int'; we
+ assume 32-bit integers. */
+
+#ifndef SCHAR_MIN
+#define SCHAR_MIN (-127)
+#endif
+#ifndef SCHAR_MAX
+#define SCHAR_MAX 127
+#endif
+#ifndef UCHAR_MAX
+#define UCHAR_MAX 255
+#endif
+
+#ifndef SHRT_MIN
+#define SHRT_MIN (-32767)
+#endif
+#ifndef SHRT_MAX
+#define SHRT_MAX 32767
+#endif
+#ifndef USHRT_MAX
+#define USHRT_MAX 65535
+#endif
+
+#ifndef INT_MIN
+#define INT_MIN (-2147483647)
+#endif
+#ifndef INT_MAX
+#define INT_MAX 2147483647
+#endif
+#ifndef UINT_MAX
+#define UINT_MAX 4294967295
+#endif
+
+#ifndef LONG_MIN
+#define LONG_MIN INT_MIN
+#endif
+#ifndef LONG_MAX
+#define LONG_MAX INT_MAX
+#endif
+#ifndef ULONG_MAX
+#define ULONG_MAX UINT_MAX
+#endif
+
+/* Declared in <float.h> on ANSI C systems. */
+#ifndef DBL_MIN
+#define DBL_MIN 1e-37
+#endif
+#ifndef DBL_MAX
+#define DBL_MAX 1e+37
+#endif
+
+#ifndef FLT_MIN
+#define FLT_MIN 1e-37
+#endif
+#ifndef FLT_MAX
+#define FLT_MAX 1e+37
+#endif
+
+#endif /* not KPATHSEA_C_MINMAX_H */
diff --git a/Build/source/texk/kpathsea/c-namemx.h b/Build/source/texk/kpathsea/c-namemx.h
new file mode 100644
index 00000000000..690f13d0a86
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-namemx.h
@@ -0,0 +1,36 @@
+/* c-namemx.h: define NAME_MAX, the maximum length of a single
+ component in a filename. No such limit may exist, or may vary
+ depending on the filesystem.
+
+ Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_NAME_MX_H
+#define KPATHSEA_C_NAME_MX_H
+
+#include <kpathsea/c-limits.h>
+
+/* Most likely the system will truncate filenames if it is not POSIX,
+ and so we can use the BSD value here. */
+#ifndef _POSIX_NAME_MAX
+#define _POSIX_NAME_MAX 255
+#endif
+
+#ifndef NAME_MAX
+#define NAME_MAX _POSIX_NAME_MAX
+#endif
+
+#endif /* not KPATHSEA_C_NAME_MX_H */
diff --git a/Build/source/texk/kpathsea/c-pathch.h b/Build/source/texk/kpathsea/c-pathch.h
new file mode 100644
index 00000000000..44b10103512
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-pathch.h
@@ -0,0 +1,111 @@
+/* c-pathch.h: define the characters which separate components of
+ filenames and environment variable paths.
+
+ Copyright 1992, 1993, 1995, 1997, 2008, 2018 Karl Berry.
+ Copyright 1997, 1999, 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef C_PATHCH_H
+#define C_PATHCH_H
+
+#include <kpathsea/c-ctype.h>
+
+/* What separates filename components? */
+#ifndef DIR_SEP
+# if defined(VMS)
+# define DIR_SEP ':'
+# define DIR_SEP_STRING ":"
+# elif defined(DOSISH) /* not VMS */
+/* Either \'s or 's work. Wayne Sullivan's web2pc prefers /, so we'll
+ go with that. */
+# define DIR_SEP '/'
+# define DIR_SEP_STRING "/"
+# define IS_DEVICE_SEP(ch) ((ch) == ':')
+# define NAME_BEGINS_WITH_DEVICE(name) (*(name) && IS_DEVICE_SEP((name)[1]))
+/* On DOS, it's good to allow both \ and / between directories. */
+# define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == '\\')
+# ifdef WIN32
+/* On win32, UNC names are authorized */
+# define IS_UNC_NAME(name) (strlen(name)>=3 && IS_DIR_SEP(*name) \
+ && IS_DIR_SEP(*(name+1)) && isalnum(*(name+2)))
+/* Used after converting '\\' into '/' */
+# define IS_DIR_SEP_CH(ch) ((ch) == '/')
+# endif
+# elif defined(AMIGA) /* not DOSISH */
+# define DIR_SEP '/'
+# define DIR_SEP_STRING "/"
+# define IS_DIR_SEP(ch) ((ch) == '/' || (ch) == ':')
+# define IS_DEVICE_SEP(ch) ((ch) == ':')
+# elif defined(VMCMS) /* not AMIGA */
+# define DIR_SEP ' '
+# define DIR_SEP_STRING " "
+# else /* not VMCMS */
+# define DIR_SEP '/'
+# define DIR_SEP_STRING "/"
+# endif /* not VMCMS */
+#endif /* not DIR_SEP */
+
+#ifndef IS_DIR_SEP
+#define IS_DIR_SEP(ch) ((ch) == DIR_SEP)
+#endif
+#ifndef IS_DIR_SEP_CH
+#define IS_DIR_SEP_CH(ch) IS_DIR_SEP(ch)
+#endif
+#ifndef IS_DEVICE_SEP /* No `devices' on, e.g., Unix. */
+#define IS_DEVICE_SEP(ch) 0
+#endif
+#ifndef NAME_BEGINS_WITH_DEVICE
+#define NAME_BEGINS_WITH_DEVICE(name) 0
+#endif
+#ifndef IS_UNC_NAME /* Unc names are in practice found on Win32 only. */
+#define IS_UNC_NAME(name) 0
+#endif
+
+/* What separates elements in environment variable path lists? */
+#ifndef ENV_SEP
+#ifdef VMS
+# define ENV_SEP ','
+# define ENV_SEP_STRING ","
+#elif defined (DOSISH)
+# define ENV_SEP ';'
+# define ENV_SEP_STRING ";"
+#elif defined (AMIGA)
+# define ENV_SEP ';'
+# define ENV_SEP_STRING ";"
+#elif defined (VMCMS)
+# define ENV_SEP ' '
+# define ENV_SEP_STRING " "
+#else
+# define ENV_SEP ':'
+# define ENV_SEP_STRING ":"
+/* Because paths in Kpathsea cnf files allow use of either ; or : separators
+ regardless of the current system, on Unix we sometimes need to check
+ for either . */
+# define IS_KPSE_SEP(ch) ((ch) == ':' || (ch) == ';')
+#endif
+#endif /* not ENV_SEP */
+
+#ifndef IS_ENV_SEP
+#define IS_ENV_SEP(ch) ((ch) == ENV_SEP)
+#endif
+
+#ifndef IS_KPSE_SEP
+/* But for Windows, we do not want to consider : as a path separator,
+ ever, because it is the drive separator (as in c:\tex). So just
+ check for the regular separator (;). */
+#define IS_KPSE_SEP(ch) (IS_ENV_SEP (ch))
+#endif
+
+#endif /* not C_PATHCH_H */
diff --git a/Build/source/texk/kpathsea/c-pathmx.h b/Build/source/texk/kpathsea/c-pathmx.h
new file mode 100644
index 00000000000..8b63023db01
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-pathmx.h
@@ -0,0 +1,45 @@
+/* c-pathmx.h: define PATH_MAX, the maximum length of a filename.
+ Since no such limit may exist (pace GNU Hurd), these constants should
+ not actually be used; filenames should be dynamically grown as
+ needed. Most of Kpathsea does this now, but not all, and not all
+ programs using it.
+
+ Copyright 1992, 1993, 2008, 2010 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_PATH_MX_H
+#define KPATHSEA_C_PATH_MX_H
+
+#include <kpathsea/c-limits.h>
+
+/* Cheat and define this as a manifest constant no matter what, instead
+ of using pathconf. Maybe it is too big otherwise on Hurd? */
+
+#ifndef _POSIX_PATH_MAX
+#define _POSIX_PATH_MAX 255
+#endif
+
+#ifndef PATH_MAX
+#ifdef MAXPATHLEN
+#define PATH_MAX MAXPATHLEN
+#elif defined (MAX_PATH)
+#define PATH_MAX MAX_PATH
+#else
+#define PATH_MAX _POSIX_PATH_MAX
+#endif
+#endif /* not PATH_MAX */
+
+#endif /* not KPATHSEA_C_PATH_MAX_H */
diff --git a/Build/source/texk/kpathsea/c-proto.h b/Build/source/texk/kpathsea/c-proto.h
new file mode 100644
index 00000000000..f2fb8ea2b83
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-proto.h
@@ -0,0 +1,36 @@
+/* c-proto.h: macros to include or discard prototypes.
+
+ Copyright 1992, 1993, 1995, 1996, 2008, 2009 Karl Berry.
+ Copyright 1999, 2000, 2001, 2003, 2004, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_PROTO_H
+#define KPATHSEA_C_PROTO_H
+
+#if defined (WIN32) && !defined (__MINGW32__) && !defined (NO_KPSE_DLL)
+#define KPSE_DLL 1
+#endif /* WIN32 && ! __MINGW32__ */
+
+#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
+#ifdef MAKE_KPSE_DLL
+#define KPSEDLL __declspec(dllexport)
+#else /* ! MAKE_KPSE_DLL */
+#define KPSEDLL __declspec(dllimport)
+#endif
+#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
+#define KPSEDLL
+#endif
+
+#endif /* not KPATHSEA_C_PROTO_H */
diff --git a/Build/source/texk/kpathsea/c-stat.h b/Build/source/texk/kpathsea/c-stat.h
new file mode 100644
index 00000000000..084c3a32624
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-stat.h
@@ -0,0 +1,56 @@
+/* c-stat.h: declarations for using stat(2).
+
+ Copyright 1993, 1996, 2008, 2010 Karl Berry.
+ Copyright 1998, 2000, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_STAT_H
+#define KPATHSEA_STAT_H
+
+#include <kpathsea/systypes.h>
+#include <sys/stat.h>
+
+/* POSIX predicates for testing file attributes. */
+
+#if !defined (S_ISBLK) && defined (S_IFBLK)
+#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+#endif
+#if !defined (S_ISCHR) && defined (S_IFCHR)
+#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+#endif
+#if !defined (S_ISDIR) && defined (S_IFDIR)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
+#if !defined (S_ISREG) && defined (S_IFREG)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+#if !defined (S_ISFIFO) && defined (S_IFIFO)
+#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+#endif
+#if !defined (S_ISLNK) && defined (S_IFLNK)
+#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+#endif
+#if !defined (S_ISSOCK) && defined (S_IFSOCK)
+#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+#endif
+#if !defined (S_ISMPB) && defined (S_IFMPB) /* V7 */
+#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+#endif
+#if !defined (S_ISNWK) && defined (S_IFNWK) /* HP/UX */
+#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+#endif
+
+#endif /* not KPATHSEA_STAT_H */
diff --git a/Build/source/texk/kpathsea/c-std.h b/Build/source/texk/kpathsea/c-std.h
new file mode 100644
index 00000000000..6d65d150802
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-std.h
@@ -0,0 +1,96 @@
+/* c-std.h: the first header files.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2008, 2012 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_STD_H
+#define KPATHSEA_C_STD_H
+
+/* Header files that essentially all of our sources need, and
+ that all implementations have. We include these first, to help with
+ NULL being defined multiple times. */
+/* Workaround against a <math.h> MSVC bug : it can't be declared
+ extern "C" in a c++ source file. */
+#ifndef __cplusplus
+#include <math.h>
+/* apparently M_PI isn't defined by <math.h> under older VC */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+#endif
+#include <stdio.h>
+#include <stdarg.h>
+
+/* Be sure we have constants from <unistd.h>. */
+#include <kpathsea/c-unistd.h>
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+/* Include <stdlib.h> before <stddef.h>, to help avoid NULL
+ redefinitions on some systems. (We don't include <stddef.h>
+ ourselves any more, but FYI.) */
+#else
+/* It's impossible to say for sure what the system will deign to put in
+ <stdlib.h>, but let's hope it's at least this. */
+extern char *getenv ();
+#endif /* not HAVE_STDLIB_H */
+
+#ifdef WIN32
+#include <malloc.h>
+#else
+#ifndef STDC_HEADERS
+#ifndef ALLOC_RETURN_TYPE
+#define ALLOC_RETURN_TYPE void
+#endif /* not ALLOC_RETURN_TYPE */
+extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
+#endif /* not STDC_HEADERS */
+#endif /* not WIN32 */
+
+/* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide
+ EXIT_FAILURE. So far no system has defined one of EXIT_FAILURE and
+ EXIT_SUCCESS without the other. */
+#ifndef EXIT_SUCCESS
+#ifdef VMS
+#define EXIT_SUCCESS 1
+#define EXIT_FAILURE 0
+#else
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+#endif
+#endif /* not EXIT_SUCCESS */
+
+/* strchr vs. index, memcpy vs. bcopy, etc. */
+#include <kpathsea/c-memstr.h>
+
+/* Error numbers and errno declaration. */
+#include <kpathsea/c-errno.h>
+
+/* Numeric minima and maxima. */
+#include <kpathsea/c-minmax.h>
+
+/* Assertions are too useful to not make generally available. */
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#else
+#define assert(expr) /* as nothing */
+#endif
+
+#ifdef VMS
+#include <unixlib.h>
+#include <unixio.h>
+#endif /* not VMS */
+
+#endif /* not KPATHSEA_C_STD_H */
diff --git a/Build/source/texk/kpathsea/c-unistd.h b/Build/source/texk/kpathsea/c-unistd.h
new file mode 100644
index 00000000000..1f5f2fcb964
--- /dev/null
+++ b/Build/source/texk/kpathsea/c-unistd.h
@@ -0,0 +1,57 @@
+/* c-unistd.h: ensure we have constants from <unistd.h>. Included from
+ c-std.h.
+
+ Copyright 1992, 1993, 2008, 2012 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_C_UNISTD_H
+#define KPATHSEA_C_UNISTD_H
+
+/* <unistd.h> is allowed to depend on <sys/types.h>. */
+#include <kpathsea/systypes.h>
+
+#if HAVE_UNISTD_H
+#if defined (WIN32) || defined (__CYGWIN__)
+# define __need_getopt
+#include <kpathsea/getopt.h>
+#endif
+#include <unistd.h>
+#endif
+
+#include <kpathsea/c-std.h>
+
+/* For fseek. */
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#define SEEK_CUR 1
+#define SEEK_END 2
+#endif /* not SEEK_SET */
+
+/* For access. */
+#ifndef F_OK
+#define F_OK 0
+#define X_OK 1
+#define W_OK 2
+#define R_OK 4
+#endif /* not F_OK */
+
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#define STDOUT_FILENO 1
+#define STDERR_FILENO 2
+#endif /* not STDIN_FILENO */
+
+#endif /* not KPATHSEA_C_UNISTD_H */
diff --git a/Build/source/texk/kpathsea/cnf-to-paths.awk b/Build/source/texk/kpathsea/cnf-to-paths.awk
new file mode 100644
index 00000000000..d06f871c313
--- /dev/null
+++ b/Build/source/texk/kpathsea/cnf-to-paths.awk
@@ -0,0 +1,61 @@
+# $Id$
+# cnf-to-paths.awk - convert texmf.cnf assignments to paths.h #define's.
+# Public domain. Originally written 2011, Karl Berry.
+
+# We assume comments have been stripped.
+#
+# we only care about definitions with a valid C identifier (e.g.,
+# TEXINPUTS, not TEXINPUTS.latex), that is, lines that look like this:
+# <name> = <value>
+# (whitespace around the = is optional)
+#
+/^[ \t]*[A-Z0-9_]+[ \t]*=/ {
+ # On these lines, we distinguish three cases:
+ #
+ # 1) definitions referring to SELFAUTO*, which we want to keep. In
+ # particular, this is how the compile-time TEXMFCNF gets defined and
+ # thus how texmf.cnf gets found. In fact, TEXMFCNF is the only
+ # relevant compile-time value at all, and since its value is not used
+ # from texmf.cnf, we could simplify this whole process in both
+ # directions. Maybe someday.
+ #
+ # 2) definitions starting with a /, which we also want to keep. Here
+ # we assume a distro maintainer has changed a variable, e.g.,
+ # TEXMFMAIN=/usr/share/texmf, so keep it. (This also preserves the
+ # default values for OSFONTDIR and TRFONTS, but that's ok.)
+ #
+ # 3) anything else, which we want to convert to a constant /nonesuch.
+ # That way, the binaries don't get changed just because we change
+ # definitions in texmf.cnf.
+ #
+ # The definition of DEFAULT_TEXMFROOT (and other variables)
+ # that winds up in the final paths.h will not be used.
+
+ # Extract the identifier and the value from the line. Since
+ # gawk's subexpression matching is an extension, do it with copies.
+ ident = $0;
+ sub(/^[ \t]*/, "", ident);
+ sub(/[ \t]*=.*/, "", ident);
+
+ val = $0;
+ sub(/^.*=[ \t]*/, "", val);
+ sub(/[ \t]*$/, "", val);
+ #print "got ident", ident, "and val", val >"/dev/stderr";
+
+ if (val ~ /\$SELFAUTO/) {
+ # Replace all semicolons with colons in the SELFAUTO paths we're keeping.
+ # (The path-splitting code should be changed to understand both.)
+ gsub(/;/, ":", val);
+ } else if (val ~ /^\//) {
+ # If the value starts with /, presume we're compiling with changes
+ # made for a distro, and keep it. Likewise switch to :.
+ gsub(/;/, ":", val);
+ } else {
+ val = "/nonesuch";
+ }
+
+ print "#ifndef DEFAULT_" ident;
+ print "#define DEFAULT_" ident " \"" val "\"";
+ print "#endif";
+ print "";
+}
diff --git a/Build/source/texk/kpathsea/cnf.c b/Build/source/texk/kpathsea/cnf.c
new file mode 100644
index 00000000000..14f7e04e706
--- /dev/null
+++ b/Build/source/texk/kpathsea/cnf.c
@@ -0,0 +1,359 @@
+/* cnf.c: read config files.
+
+ Copyright 1994, 1995, 1996, 1997, 2008, 2009, 2011, 2012, 2016,
+ 2017, 2018, 2019 Karl Berry.
+ Copyright 1997-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-fopen.h>
+#include <kpathsea/c-ctype.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/cnf.h>
+#include <kpathsea/db.h>
+#include <kpathsea/hash.h>
+#include <kpathsea/line.h>
+#include <kpathsea/paths.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/tex-file.h>
+#include <kpathsea/variable.h>
+
+/* By using our own hash table, instead of the environment, we
+ complicate variable expansion (because we have to look in two
+ places), but we don't bang so much on the system. DOS and System V
+ have very limited environment space. Also, this way
+ `kpse_init_format' can distinguish between values originating from
+ the cnf file and ones from environment variables, which can be useful
+ for users trying to figure out what's going on. */
+
+#define CNF_HASH_SIZE 751
+#define CNF_NAME "texmf.cnf"
+
+
+/* Do a single line LINE in a cnf file: if it's blank or a comment or
+ erroneous, skip it. Otherwise, parse
+ <variable>[.<program>] [=] <value>
+ and insert it either into the cnf_hash structure in KPSE (if
+ ENV_PROGNAME is false), or in the environment (if ENV_PROGNAME is true).
+
+ Furthermore, if ENV_PROGNAME is true, and there is no .<program> in
+ LINE, then also insert <variable> "_" `kpse->program_name' with <value>
+ into the environment; see kpathsea_cnf_line_env_progname in cnf.h.
+
+ The name without _<progname> will usually never be looked up, but
+ just in case the program name changes, or whatever.
+
+ We return NULL if ok, an error string otherwise. */
+
+static string
+do_line (kpathsea kpse, string line, boolean env_progname)
+{
+ unsigned len;
+ string start;
+ string value, var;
+ string prog = NULL;
+
+ /* Skip leading whitespace. */
+ while (*line && ISSPACE (*line))
+ line++;
+
+ /* More to do only if we have non-comment material left. */
+ if (*line == 0 || *line == '%' || *line == '#')
+ return NULL;
+
+ /* Remove trailing comment: a % or # preceded by whitespace. Also
+ remove any whitespace before that. For example, the value for
+ foo = a#b %something
+ is a#b. */
+ value = line + strlen (line) - 1; /* start at end of line */
+ while (value > line) {
+ if (*value == '%' || *value == '#') {
+ value--; /* move before comment char */
+ while (ISSPACE (*value))
+ *value-- = 0; /* wipe out as much preceding whitespace
+ continue; (and comment) as we find */
+ }
+ value--; /* move before the new null byte */
+ }
+
+ /* The variable name is everything up to the next space or = or `.'. */
+ start = line;
+ while (*line && !ISSPACE (*line) && *line != '=' && *line != '.')
+ line++;
+
+ /* `line' is now one character past the end of the variable name. */
+ len = line - start;
+ if (len == 0) {
+ return ("No cnf variable name");
+ }
+
+ var = (string) xmalloc (len + 1);
+ strncpy (var, start, len);
+ var[len] = 0;
+
+ /* If the variable is qualified with a program name, extract it. */
+ while (*line && ISSPACE (*line))
+ line++;
+ if (*line == '.') {
+ /* Skip spaces, then everything up to the next space or =. */
+ line++;
+ while (ISSPACE (*line))
+ line++;
+ start = line;
+ while (*line && !ISSPACE (*line) && *line != '=')
+ line++;
+
+ /* The program name is what's in between. */
+ len = line - start;
+ prog = (string) xmalloc (len + 1);
+ strncpy (prog, start, len);
+ prog[len] = 0;
+ /* If the name is empty, or contains one of our usual special
+ characters, it's probably a mistake. For instance, a cnf line
+ foo .;bar
+ is interpreted as a program name ";bar", because the = between
+ the variable name and value is optional. We don't try to guess
+ the user's intentions, but just give a warning. */
+ if (len == 0) {
+ return ("Empty program name qualifier");
+ } else {
+ unsigned i;
+ for (i = 0; i < len; i++) {
+ if (prog[i] == '$' || prog[i] == '{' || prog[i] == '}'
+ || IS_KPSE_SEP (prog[i])) {
+ string msg = xmalloc (50);
+ sprintf (msg, "Unlikely character %c in program name", prog[i]);
+ return msg;
+ }
+ }
+ }
+ }
+
+ /* Skip whitespace, an optional =, more whitespace. */
+ while (*line && ISSPACE (*line))
+ line++;
+ if (*line == '=') {
+ line++;
+ while (*line && ISSPACE (*line))
+ line++;
+ }
+
+ /* The value is whatever remains. Remove trailing whitespace. */
+ start = line;
+ len = strlen (start);
+ while (len > 0 && ISSPACE (start[len - 1]))
+ len--;
+ if (len == 0) {
+ return ("No cnf value");
+ }
+
+ value = (string) xmalloc (len + 1);
+ strncpy (value, start, len);
+ value[len] = 0;
+
+ /* Suppose we want to write a single texmf.cnf that can be used under
+ both Windows and Unix. This is feasible except for the path
+ separators: : on Unix, ; on Windows. We can't switch Windows to
+ allowing :, since : is the drive separator. So we switch Unix to
+ allowing ;. On the other hand, we don't want to change IS_ENV_SEP
+ and all the rest.
+
+ So, translate all ;'s in the path values to :'s if we'd normally
+ use :. (Fortunately we don't use ; as a normal character in values.) */
+
+ if (IS_ENV_SEP(':')) {
+ string loc;
+ for (loc = value; *loc; loc++) {
+ if (*loc == ';')
+ *loc = ':';
+ }
+ }
+
+ /* If we're supposed to make the setting in the environment ... */
+ if (env_progname) {
+ string this_prog = prog ? prog : kpse->program_name; /* maybe with .prog */
+ /* last-ditch debug */
+ /* fprintf (stderr, "kpse/cnf.c xputenv(%s,%s)\n", var, value); */
+ xputenv (var, value);
+ /* Use the .prog name on the input line if specified. Otherwise,
+ although kpse->program_name should always be set at this point,
+ check just in case. */
+ if (this_prog) {
+ string var_prog = concat3 (var, "_", this_prog);
+ /* fprintf (stderr, "kpse/cnf.c xputenv(%s,%s) [implicit]\n",
+ var_prog, value); */
+ xputenv (var_prog, value);
+ free (var_prog); /* xputenv allocates its own */
+ }
+ free (var); /* again, xputenv allocated a copy */
+
+ } else {
+ /* Normal case of not ENV_PROGNAME, insert in cnf_hash, with .prog
+ if specified, which will override non-.prog. */
+ string lhs = prog ? concat3 (var, ".", prog) : var;
+ /* last-ditch debug */
+ /* fprintf (stderr, "kpse/cnf.c hash_insert(%s,%s)\n", lhs, value); */
+ hash_insert (&(kpse->cnf_hash), lhs, value);
+ if (prog) { /* the lhs string is new memory if we had .prog */
+ free (var);
+ /* If there was no .prog on the line, the original `var' memory gets
+ inserted into the hash table, so do not free. */
+ }
+ }
+
+ /* We should check that anything remaining is preceded by a comment
+ character, but we don't. Sorry. */
+ return NULL;
+}
+
+
+/* Just passing along env_progname = true to do_line. */
+
+void
+kpathsea_cnf_line_env_progname (kpathsea kpse, string line)
+{
+ string msg = do_line (kpse, line, /* env_progname = */ true);
+ if (msg) {
+ WARNING2 ("command line (kpathsea): %s in argument: %s",
+ msg, line);
+ }
+}
+
+
+/* Read all the kpathsea configuration files in the path. */
+
+static void
+read_all_cnf (kpathsea kpse)
+{
+ string *cnf_files;
+ string *cnf;
+ const_string cnf_path = kpathsea_init_format (kpse, kpse_cnf_format);
+
+ cnf_files = kpathsea_all_path_search (kpse, cnf_path, CNF_NAME);
+ if (cnf_files && *cnf_files) {
+ for (cnf = cnf_files; *cnf; cnf++) {
+ string line;
+ string msg;
+ unsigned lineno = 0;
+ FILE *cnf_file = xfopen (*cnf, FOPEN_R_MODE);
+ if (kpse->record_input)
+ kpse->record_input (*cnf);
+
+ while ((line = read_line (cnf_file)) != NULL) {
+ unsigned len;
+ lineno++;
+ len = strlen (line);
+ /* Strip trailing spaces. */
+ while (len > 0 && ISSPACE(line[len-1])) {
+ line[len - 1] = 0;
+ --len;
+ }
+ /* Concatenate consecutive lines that end with \. */
+ while (len > 0 && line[len - 1] == '\\') {
+ string next_line = read_line (cnf_file);
+ lineno++;
+ line[len - 1] = 0;
+ if (!next_line) {
+ WARNING2 ("%s:%d: (kpathsea) Last line of file ends with \\",
+ *cnf, lineno);
+ } else {
+ string new_line;
+ new_line = concat (line, next_line);
+ free (line);
+ line = new_line;
+ len = strlen (line);
+ }
+ }
+
+ msg = do_line (kpse, line, /* env_progname= */ false);
+ if (msg) {
+ WARNING4 ("%s:%d: (kpathsea) %s on line: %s",
+ *cnf, lineno, msg, line);
+ }
+ free (line);
+ }
+
+ xfclose (cnf_file, *cnf);
+ free (*cnf);
+ }
+ free (cnf_files);
+ } else {
+ string warn = getenv ("KPATHSEA_WARNING");
+ if (!(warn && STREQ (warn, "0"))) {
+ WARNING1
+ ("kpathsea: configuration file texmf.cnf not found in these directories: %s",
+ cnf_path);
+ }
+ }
+}
+
+/* Read the cnf files on the first call. Return the first value in the
+ returned list -- this will be from the last-read cnf file. */
+
+const_string
+kpathsea_cnf_get (kpathsea kpse, const_string name)
+{
+ string ctry;
+ const_string ret, *ret_list;
+
+ /* When we expand the compile-time value for DEFAULT_TEXMFCNF,
+ we end up needing the value for assorted variables,
+ so kpse_var_expand ends up calling us again. Just return. */
+ if (kpse->doing_cnf_init)
+ return NULL;
+
+ /* If no cnf hash yet, initialize. */
+ if (kpse->cnf_hash.size == 0) {
+ kpse->cnf_hash = hash_create (CNF_HASH_SIZE);
+
+ /* Read configuration files and initialize databases. */
+ kpse->doing_cnf_init = true;
+ read_all_cnf (kpse);
+ kpse->doing_cnf_init = false;
+
+ /* Since `kpse_init_db' recursively calls us, we must call it from
+ outside a `kpse_path_element' loop (namely, the one in
+ `read_all_cnf' above): `kpse_path_element' is not reentrant. */
+ kpathsea_init_db (kpse);
+ }
+
+ /* First look up NAME.`kpse->program_name', then NAME. */
+ assert (kpse->program_name);
+ ctry = concat3 (name, ".", kpse->program_name);
+ ret_list = hash_lookup (kpse->cnf_hash, ctry);
+ free (ctry);
+ if (ret_list) {
+ ret = *ret_list;
+ free (ret_list);
+ } else {
+ ret_list = hash_lookup (kpse->cnf_hash, name);
+ if (ret_list) {
+ ret = *ret_list;
+ free (ret_list);
+ } else {
+ ret = NULL;
+ }
+ }
+
+ return ret;
+}
+
+#if defined(KPSE_COMPAT_API)
+const_string
+kpse_cnf_get (const_string name)
+{
+ return kpathsea_cnf_get(kpse_def, name);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/cnf.h b/Build/source/texk/kpathsea/cnf.h
new file mode 100644
index 00000000000..e218964b5b6
--- /dev/null
+++ b/Build/source/texk/kpathsea/cnf.h
@@ -0,0 +1,63 @@
+/* cnf.h: runtime config files.
+
+ Copyright 1994, 1995, 2008, 2012, 2019 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_CNF_H
+#define KPATHSEA_CNF_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the value in the last-read cnf file for VAR, or NULL if none.
+ On the first call, also read all the `texmf.cnf' files in the path
+ for kpse_cnf_format (and initialize the path). Any error messages are
+ written to stderr. */
+
+extern KPSEDLL const_string kpathsea_cnf_get (kpathsea kpse, const_string var);
+
+
+/* Parse L as a texmf.cnf configuration line for the KPSE instance,
+ and insert any <variable> assignment in the environment, both as-is and
+ with the value (if all non-NULL) of <variable> "_" KPSE->program_name.
+ If <variable>[_<progname>] is already set in the environment, it is
+ overwritten.
+
+ All of this behavior is because if the user runs tex with
+ --cnf-line=TEXINPUTS=/foo:, it's not unreasonable to expect that
+ cmdline option to override both environment variables TEXINPUTS and
+ TEXINPUTS_tex, and also both configuration values TEXINPUTS and
+ TEXINPUTS.tex -- even though ordinarily <var>.<progname> overrides
+ plain <var>.
+
+ Any error message is written to stderr. */
+
+extern KPSEDLL void kpathsea_cnf_line_env_progname (kpathsea kpse,
+ string l);
+
+#if defined(KPSE_COMPAT_API)
+extern KPSEDLL const_string kpse_cnf_get (const_string var);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_CNF_H */
diff --git a/Build/source/texk/kpathsea/concat.c b/Build/source/texk/kpathsea/concat.c
new file mode 100644
index 00000000000..fe5298fcbfa
--- /dev/null
+++ b/Build/source/texk/kpathsea/concat.c
@@ -0,0 +1,35 @@
+/* concat.c: dynamic string concatenation.
+
+ Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+/* Return the concatenation of S1 and S2. See `concatn.c' for a
+ `concatn', which takes a variable number of arguments. */
+
+string
+concat (const_string s1, const_string s2)
+{
+ unsigned s1len = strlen(s1);
+ unsigned s2len = strlen(s2);
+ string answer = (string) xmalloc (s1len + s2len + 1);
+ strcpy (answer, s1);
+ strcat (answer + s1len, s2);
+
+ return answer;
+}
diff --git a/Build/source/texk/kpathsea/concat3.c b/Build/source/texk/kpathsea/concat3.c
new file mode 100644
index 00000000000..6e98a13dac6
--- /dev/null
+++ b/Build/source/texk/kpathsea/concat3.c
@@ -0,0 +1,33 @@
+/* concat3.c: concatenate three strings.
+
+ Copyright 1992, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+string
+concat3 (const_string s1, const_string s2, const_string s3)
+{
+ int s2l = s2 ? strlen (s2) : 0;
+ int s3l = s3 ? strlen (s3) : 0;
+ string answer
+ = (string) xmalloc (strlen(s1) + s2l + s3l + 1);
+ strcpy (answer, s1);
+ if (s2) strcat (answer, s2);
+ if (s3) strcat (answer, s3);
+
+ return answer;
+}
diff --git a/Build/source/texk/kpathsea/concatn.c b/Build/source/texk/kpathsea/concatn.c
new file mode 100644
index 00000000000..4e0b9eb923d
--- /dev/null
+++ b/Build/source/texk/kpathsea/concatn.c
@@ -0,0 +1,72 @@
+/* concatn.c: concatenate an arbitrary number of strings.
+
+ Copyright 1993, 1995, 2008, 2009 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/concatn.h>
+
+
+/* OK, it would be epsilon more efficient to compute the total length
+ and then do the copying ourselves, but I doubt it matters in reality. */
+
+string
+concatn (const_string str1, ...)
+{
+ string arg;
+ string ret;
+ va_list ap;
+
+ if (!str1)
+ return NULL;
+
+ ret = xstrdup (str1);
+
+ va_start (ap, str1);
+ while ((arg = va_arg (ap, string)) != NULL)
+ {
+ string temp = concat (ret, arg);
+ free (ret);
+ ret = temp;
+ }
+ va_end (ap);
+
+ return ret;
+}
+
+#ifdef TEST
+int
+main ()
+{
+ printf ("null = \"%s\"\n", concatn (NULL));
+ printf ("\"a\" = \"%s\"\n", concatn ("a", NULL));
+ printf ("\"ab\" = \"%s\"\n", concatn ("a", "b", NULL));
+ printf ("\"abc\" = \"%s\"\n", concatn ("a", "b", "c", NULL));
+ printf ("\"abcd\" = \"%s\"\n", concatn ("ab", "cd", NULL));
+ printf ("\"abcde\" = \"%s\"\n", concatn ("ab", "c", "de", NULL));
+ printf ("\"abcdef\" = \"%s\"\n", concatn ("", "a", "", "bcd", "ef", NULL));
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -posix -g -I. -I.. -DTEST concatn.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/concatn.h b/Build/source/texk/kpathsea/concatn.h
new file mode 100644
index 00000000000..76140275026
--- /dev/null
+++ b/Build/source/texk/kpathsea/concatn.h
@@ -0,0 +1,41 @@
+/* concatn.h: concatenate a variable number of strings.
+ This is a separate include file only because I don't see the point of
+ having every source file include <stdarg.h>. The declarations for
+ the other concat routines are in lib.h.
+
+ Copyright 1993, 1996, 2008 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_CONCATN_H
+#define KPATHSEA_CONCATN_H
+
+#include <kpathsea/c-proto.h>
+#include <stdarg.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Concatenate a null-terminated list of strings and return the result
+ in malloc-allocated memory. */
+extern KPSEDLL string concatn(const_string str1, ...);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_CONCATN_H */
diff --git a/Build/source/texk/kpathsea/config.h b/Build/source/texk/kpathsea/config.h
new file mode 100644
index 00000000000..081173d48a9
--- /dev/null
+++ b/Build/source/texk/kpathsea/config.h
@@ -0,0 +1,235 @@
+/* config.h: master configuration file, included first by all compilable
+ source files (not headers).
+
+ Copyright 1993, 1995, 1996, 1997, 2008, 2010, 2011, 2016 Karl Berry.
+ Copyright 2000, 2003, 2004, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_CONFIG_H
+#define KPATHSEA_CONFIG_H
+
+/* System defines are for non-Unix systems only. (Testing for all Unix
+ variations should be done in configure.) Presently the defines used
+ are: AMIGA DOS OS2 WIN32. I do not use any of these systems myself;
+ if you do, I'd be grateful for any changes. */
+
+#if defined(DJGPP) || defined(__DJGPP__) || \
+ defined(CYGWIN) || defined(__CYGWIN__) || \
+ defined(CYGWIN32) || defined(__CYGWIN32__) || \
+ defined(MINGW32) || defined(__MINGW32__)
+#define __i386_pc_gnu__
+#endif
+
+/* If we have either DOS or OS2, we are DOSISH. Cygwin pretends to be
+ Unix, mostly, so don't include it here. */
+#if defined(OS2) || \
+ defined(MSDOS) || defined(__MSDOS__) || defined(DOS) || \
+ defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || \
+ defined(DJGPP) || defined(__DJGPP__) || \
+ defined(MINGW32) || defined(__MINGW32__)
+#define DOSISH
+#endif
+
+/* case-insensitive filename comparisons? */
+#if defined (DOSISH)
+#define MONOCASE_FILENAMES
+#endif
+
+/* NULL device. */
+#if defined (DOSISH)
+#define DEV_NULL "NUL"
+#else
+#define DEV_NULL "/dev/null"
+#endif
+
+#if defined (WIN32) && !defined (__STDC__)
+#define __STDC__ 1
+#endif
+
+/* System dependencies that are figured out by `configure'. */
+#include <kpathsea/c-auto.h>
+
+#ifdef __DJGPP__
+#include <fcntl.h> /* for long filenames' stuff */
+#include <dir.h> /* for `getdisk' */
+#include <io.h> /* for `setmode' */
+#endif
+
+/* Some drivers have partially integrated kpathsea changes. */
+#ifndef KPATHSEA
+#define KPATHSEA 34
+#endif
+
+#ifdef __MINGW32__
+/* In mingw32, the eof() function is part of the !_NO_OLDNAMES section
+ of <io.h>, that is read in automatically via <unistd.h>. We cannot
+ allow that because web2c/lib/eofeoln.c defines a private,
+ incompatible function named eof().
+ But many of the other things defined via !_NO_OLDNAMES are needed,
+ so #define _NO_OLDNAMES cannot be used. So, temporarily define eof
+ as a macro.
+*/
+#define eof saved_eof
+#include <kpathsea/c-std.h> /* <stdio.h>, <math.h>, etc. */
+#undef eof
+#else
+#include <kpathsea/c-std.h> /* <stdio.h>, <math.h>, etc. */
+#endif
+
+#include <kpathsea/c-proto.h> /* KPSEDLL. */
+
+/*
+ This must be included after "c-proto.h"
+ but before "lib.h". FP.
+*/
+#if defined (WIN32) || defined (_WIN32)
+#ifdef __MINGW32__
+#include <kpathsea/mingw32.h>
+#else
+#include <kpathsea/win32lib.h>
+#endif
+#include <kpathsea/types.h>
+#include <kpathsea/knj.h>
+#endif
+
+#if defined(WIN32) || defined(WRAP_SNPRINTF)
+/* All Unix systems known to us have snprintf() and vsnprintf(),
+ while all known Windows systems have _snprintf() and _vsnprintf().
+
+ Consider a call
+ RET = snprintf(BUF, SIZE, FMT, ...)
+ and let LEN be the number that would be written to BUF if SIZE were
+ sufficiently large (not counting the trailing null byte).
+
+ C99 requires that snprintf
+ (A) modifies at most the first SIZE bytes of BUF,
+ (B) writes a trailing null byte except when SIZE=0, and
+ (C) always returns LEN.
+
+ All known implementations (except some ancient buggy ones, e.g., for
+ 64-bit Solaris 7 from Oct. 1998) satisfy (A). As long as LEN<SIZE
+ they all write a trailing null byte and return LEN.
+
+ Condition (C) is, however, violated for LEN>=SIZE by some older
+ implementations (SUSv2, glibc <= 2.0.6, etc.) and for Windows even
+ (B) is violated..
+
+ TeX Live does not require the full C99 semantics, but will need that
+ (1) there is always a trailing null byte, and
+ (2) for LEN>=SIZE the return value is either >=SIZE or <0, i.e.,
+ (unsigned)RET >= (unsigned)SIZE.
+
+ A violation of (2) is detected by configure (except when cross
+ compiling) and by a runtime check in the initialization routine
+ kpathsea_set_program_name.
+
+ A violation of (1) is handled here through static inline wrapper
+ functions. */
+
+
+#undef snprintf
+#undef vsnprintf
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static inline int
+kpse_vsnprintf (char *str, size_t size, const char *format, va_list ap)
+{
+#ifdef WIN32
+ int ret = _vsnprintf (str, size, format, ap);
+#else
+ int ret = vsnprintf (str, size, format, ap);
+#endif
+ if (size > 0 && (unsigned)ret >= (unsigned)size)
+ str [size - 1] = '\0';
+ return ret;
+}
+
+static inline int
+kpse_snprintf (char *str, size_t size, const char *format, ...)
+{
+ int ret;
+ va_list ap;
+
+ va_start (ap, format);
+ ret = kpse_vsnprintf (str, size, format, ap);
+ va_end (ap);
+ return ret;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#define snprintf kpse_snprintf
+#define vsnprintf kpse_vsnprintf
+
+#endif /* WIN32 || WRAP_SNPRINTF */
+
+/* Transform filename characters for use in hash tables. */
+#if defined(MONOCASE_FILENAMES)
+#if defined(WIN32) && !defined(__i386_pc_gnu__)
+/* This is way faster under Win32. */
+#define TRANSFORM(x) ((unsigned)CharLower((LPTSTR)(BYTE)(x)))
+#else
+#define TRANSFORM(x) (tolower(x))
+#endif
+#else
+#define TRANSFORM(x) (x)
+#endif
+
+#include <kpathsea/debug.h> /* Runtime tracing. */
+#include <kpathsea/lib.h> /* STREQ, etc. */
+#include <kpathsea/types.h> /* <sys/types.h>, boolean, string, etc. */
+#include <kpathsea/progname.h> /* for kpse_invocation_*name */
+
+
+/* If you want to find subdirectories in a directory with non-Unix
+ semantics (specifically, if a directory with no subdirectories does
+ not have exactly two links), define this. */
+#if !defined (VMS) && !defined (VMCMS)
+#if !defined (DOSISH) || defined(__DJGPP__)
+/* Surprise! DJGPP returns st_nlink exactly like on Unix. */
+#define ST_NLINK_TRICK
+#endif /* either not DOSISH or __DJGPP__ */
+#endif /* not DOS and not VMS and not VMCMS */
+
+#ifdef AMIGA
+/* No popen/pclose on Amiga, but rather than put #ifdef's in tex-make.c,
+ let's get rid of the functions here. (CallMF will automatically
+ generate fonts.) pclose must not be simply empty, since it still
+ occurs in a comparison. */
+#define popen(cmd, mode) NULL
+#define pclose(file) 0
+#endif /* AMIGA */
+
+#ifdef OS2
+#define access ln_access
+#define chmod ln_chmod
+#define creat ln_creat
+#define fopen ln_fopen
+#define freopen ln_freopen
+#define lstat ln_lstat
+#define open ln_open
+#define remove ln_remove
+#define rename ln_rename
+#define sopen ln_sopen
+#define stat ln_stat
+#define unlink ln_unlink
+#endif /* OS2 */
+
+#endif /* not KPATHSEA_CONFIG_H */
diff --git a/Build/source/texk/kpathsea/configure b/Build/source/texk/kpathsea/configure
new file mode 100755
index 00000000000..25d3323b39b
--- /dev/null
+++ b/Build/source/texk/kpathsea/configure
@@ -0,0 +1,16464 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for Kpathsea 6.3.3.
+#
+# Report bugs to <tex-k@tug.org>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 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.
+as_myself=
+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
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # 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.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+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
+test -x / || 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 -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || 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 :
+ export CONFIG_SHELL
+ # 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.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+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 tex-k@tug.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_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_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; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # 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 -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+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
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# 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'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+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='Kpathsea'
+PACKAGE_TARNAME='kpathsea'
+PACKAGE_VERSION='6.3.3'
+PACKAGE_STRING='Kpathsea 6.3.3'
+PACKAGE_BUGREPORT='tex-k@tug.org'
+PACKAGE_URL=''
+
+ac_unique_file="pathsearch.c"
+# 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"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+have_EXEEXT_FALSE
+have_EXEEXT_TRUE
+LT_OBJDIR
+MINGW32_FALSE
+MINGW32_TRUE
+WIN32_FALSE
+WIN32_TRUE
+LIBOBJS
+CPP
+LT_SYS_LIBRARY_PATH
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+WARNING_CFLAGS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+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
+WEB2CVERSION
+KPSE_LT_VERSINFO
+KPSEVERSION
+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
+am__quote'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_maintainer_mode
+enable_dependency_tracking
+enable_compiler_warnings
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_aix_soname
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_largefile
+enable_mktexmf_default
+enable_mktexpk_default
+enable_mktextfm_default
+enable_mkocp_default
+enable_mkofm_default
+enable_mktexfmt_default
+enable_mktextex_default
+with_snprintf_wrapper
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+LT_SYS_LIBRARY_PATH
+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
+ 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 Kpathsea 6.3.3 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/kpathsea]
+ --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 Kpathsea 6.3.3:";;
+ 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")
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-compiler-warnings=[no|min|yes|max|all]
+ Turn on compiler warnings [default: yes if
+ maintainer-mode, min otherwise]
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --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)
+ --disable-largefile omit support for large files
+ --disable-mktexmf-default do not run mktexmf if MF source missing
+ --disable-mktexpk-default do not run mktexpk if PK font missing
+ --disable-mktextfm-default
+ do not run mktextfm if TFM file missing
+ --disable-mkocp-default do not run mkocp if OCP file missing
+ --disable-mkofm-default do not run mkofm if OFM file missing
+ --disable-mktexfmt-default
+ do not run mktexfmt if format file missing
+ --enable-mktextex-default run mktextex if TeX source missing
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-snprintf-wrapper use (v)snprintf wrapper functions [automatic for
+ native compilation or Windows]
+
+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>
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
+ 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 <tex-k@tug.org>.
+_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
+Kpathsea configure 6.3.3
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 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; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_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 ||
+ 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; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_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; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# 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; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# 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 \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; 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 tex-k@tug.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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+$as_echo_n "checking for int$2_t... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in int$2_t 'int' 'long int' \
+ 'long long int' 'short int' 'signed char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+ < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ case $ac_type in #(
+ int$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+ break
+fi
+ done
+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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_intX_t
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ case $ac_type in #(
+ uint$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+ break
+fi
+ done
+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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_uintX_t
+
+# 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
+# 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 \${$4+:} false; 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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+
+# 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 test_array [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 test_array [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 test_array [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 test_array [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 test_array [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; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+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 Kpathsea $as_me 6.3.3, which was
+generated by GNU Autoconf 2.69. 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
+
+# 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.
+
+
+
+
+KPSEVERSION=6.3.3
+
+
+KPSE_LT_VERSINFO=9:3:3
+
+
+
+ WEB2CVERSION=" (TeX Live 2021)"
+
+
+am__api_version='1.16'
+
+# 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 ${ac_cv_path_install+:} false; 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 as_fn_executable_p "$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; }
+# 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 (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ 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
+ 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
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ 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; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+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
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+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+set}" != 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 ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_mkdir+:} false; 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
+ as_fn_executable_p "$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; }
+
+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 ${ac_cv_prog_AWK+:} false; 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 as_fn_executable_p "$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 \${ac_cv_prog_make_${ac_make}_set+:} false; 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_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+$as_echo "${_am_result}" >&6; }
+
+# 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='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+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
+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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_CC+:} false; 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 as_fn_executable_p "$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 ${ac_cv_objext+:} false; 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 ${ac_cv_c_compiler_gnu+:} false; 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 ${ac_cv_prog_cc_g+:} false; 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 ${ac_cv_prog_cc_c89+:} false; 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>
+struct stat;
+/* 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
+
+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 whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; 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.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != 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
+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
+
+
+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 ${am_cv_CC_dependencies_compiler_type+:} false; 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".
+ rm -rf conftest.dir
+ 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 10 /bin/sh.
+ echo '/* dummy */' > 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
+ ;;
+ msvc7 | msvc7msys | 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
+
+
+
+# Check whether --enable-compiler-warnings was given.
+if test "${enable_compiler_warnings+set}" = set; then :
+ enableval=$enable_compiler_warnings;
+fi
+case $enable_compiler_warnings in #(
+ no | min | yes | max | all) :
+ ;; #(
+ *) :
+ if test "x$enable_maintainer_mode" = xyes; then :
+ enable_compiler_warnings=yes
+else
+ enable_compiler_warnings=min
+fi ;;
+esac
+
+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.4.6'
+macro_revision='2.4.6'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# 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 ${ac_cv_build+:} false; 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 ${ac_cv_host+:} false; 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
+
+
+# Backslashify 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'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO ""
+}
+
+case $ECHO in
+ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $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 ${ac_cv_path_SED+:} false; 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"
+ as_fn_executable_p "$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//"
+
+
+
+
+
+
+
+
+
+
+
+{ $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 ${ac_cv_path_GREP+:} false; 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"
+ as_fn_executable_p "$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 ${ac_cv_path_EGREP+:} false; 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"
+ as_fn_executable_p "$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 fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if ${ac_cv_path_FGREP+:} false; 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"
+ as_fn_executable_p "$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 no = "$withval" || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; 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 yes = "$with_gnu_ld"; 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 ${lt_cv_path_LD+:} false; 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 no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && 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 ${lt_cv_prog_gnu_ld+:} false; 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 ${lt_cv_path_NM+:} false; 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
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ 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 no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ 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 ${ac_cv_prog_DUMPBIN+:} false; 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 as_fn_executable_p "$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 "link -dump"
+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 ${ac_cv_prog_ac_ct_DUMPBIN+:} false; 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 as_fn_executable_p "$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
+
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ 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 ${lt_cv_nm_interface+:} false; 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:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: 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 ${lt_cv_sys_max_cmd_len+:} false; 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;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ 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;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # 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
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ 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" && \
+ test undefined != "$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`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 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
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+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 how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $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 ${lt_cv_ld_reload_flag+:} false; 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
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; 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 ${ac_cv_prog_OBJDUMP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; 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 as_fn_executable_p "$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 ${lt_cv_deplibs_check_method+:} false; 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
+# that 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
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ 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
+ ;;
+
+haiku*)
+ 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])(-bit)?( [LM]SB)? 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 glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ 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* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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
+ ;;
+os2*)
+ 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_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+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}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 ${ac_cv_prog_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DLLTOOL+:} false; 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 as_fn_executable_p "$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
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ 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 ${ac_cv_prog_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$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
+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
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+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 ${ac_cv_prog_ac_ct_AR+:} false; 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$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_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
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ 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
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+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 ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_RANLIB+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_RANLIB+:} false; 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 as_fn_executable_p "$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
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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 ${lt_cv_sys_global_symbol_pipe+:} false; 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 ia64 = "$host_cpu"; 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
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# 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"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$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"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/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,
+ # D for any global variable and I for any imported 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};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,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
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # 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
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#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. */
+LT_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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_globsym_save_LIBS=$LIBS
+ lt_globsym_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_globsym_save_LIBS
+ CFLAGS=$lt_globsym_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 yes = "$pipe_works"; 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
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+ withval=$with_sysroot;
+else
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_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 dd; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test no = "$enable_libtool_lock" || 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 what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ 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 what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "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 yes = "$lt_cv_prog_gnu_ld"; 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*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "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
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ 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*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ 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"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ 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 ${lt_cv_cc_needs_belf+:} false; 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 yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ 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*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ 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
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ $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
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ $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_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ 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
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ 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 ${ac_cv_prog_DSYMUTIL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_NMEDIT+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_NMEDIT+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_LIPO+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_LIPO+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_OTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_OTOOL64+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OTOOL64+:} false; 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 as_fn_executable_p "$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 ${lt_cv_apple_cc_single_mod+:} false; 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 there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&5
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; 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 ${lt_cv_ld_exported_symbols_list+:} false; 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; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR cru libconftest.a conftest.o" >&5
+ $AR cru libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&5
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&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 yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; 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" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $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 ${ac_cv_prog_CPP+:} false; 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 ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; 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
+
+
+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" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+##tldbg KPSE_COMMON: kpathsea ().
+##tldbg KPSE_BASIC: Remember kpathsea () as Kpse_Package (for future messages).
+
+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='kpathsea'
+ VERSION='6.3.3'
+
+
+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"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+ # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+ if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts prototypes" >&5
+$as_echo_n "checking whether the compiler accepts prototypes... " >&6; }
+if ${kb_cv_c_prototypes+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+extern void foo(int i,...);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ kb_cv_c_prototypes=yes
+else
+ kb_cv_c_prototypes=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: $kb_cv_c_prototypes" >&5
+$as_echo "$kb_cv_c_prototypes" >&6; }
+if test "x$kb_cv_c_prototypes" = xno; then
+ as_fn_error $? "Sorry, your compiler does not understand prototypes." "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what warning flags to pass to the C compiler" >&5
+$as_echo_n "checking what warning flags to pass to the C compiler... " >&6; }
+if ${kpse_cv_warning_cflags+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$GCC" = xyes; then
+ kpse_cv_warning_cflags=
+if test "x$enable_compiler_warnings" != xno; then
+ kpse_cv_warning_cflags="-Wimplicit -Wreturn-type"
+ case `$CC -dumpversion` in #(
+ 3.4.* | 4.* | 5.*) :
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #(
+ *) :
+ ;;
+esac
+ case `$CC -dumpversion` in #(
+ 3.[234].* | 4.* | 5.*) :
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #(
+ *) :
+ ;;
+esac
+ if test "x$enable_compiler_warnings" != xmin; then
+ kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags"
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations"
+ if test "x$enable_compiler_warnings" != xyes; then
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith"
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings"
+ case `$CC -dumpversion` in #(
+ 3.4.* | 4.* | 5.*) :
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #(
+ *) :
+ ;;
+esac
+ if test "x$enable_compiler_warnings" != xmax; then
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow"
+ fi
+ fi
+ fi
+fi
+elif test "x$enable_compiler_warnings" = xno; then
+ kpse_cv_warning_cflags=
+else
+ kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_warning_cflags" >&5
+$as_echo "$kpse_cv_warning_cflags" >&6; }
+WARNING_CFLAGS=$kpse_cv_warning_cflags
+
+
+
+
+
+
+
+
+
+
+
+
+# Set options
+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 ${ac_cv_prog_AS+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_AS+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_DLLTOOL+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_OBJDUMP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_OBJDUMP+:} false; 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 as_fn_executable_p "$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
+
+
+
+
+
+
+
+ enable_dlopen=no
+
+
+
+ # 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
+
+
+
+
+
+
+
+
+
+ # 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; lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac
+else
+ pic_mode=default
+fi
+
+
+
+
+
+
+
+
+ # 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
+
+
+
+
+
+
+
+
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+# 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 ${lt_cv_objdir+:} false; 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 set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# 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
+
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+# 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 ${lt_cv_path_MAGIC_CMD+:} false; 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 ${lt_cv_path_MAGIC_CMD+:} false; 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 yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { $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 ${lt_cv_prog_compiler_rtti_exceptions+:} false; 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" ## exclude from sc_useless_quotes_in_assignment
+ # 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:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 yes = "$lt_cv_prog_compiler_rtti_exceptions"; 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=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ 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'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ 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
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ 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 ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ 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'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ 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 | 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'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # 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* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # 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=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ 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* | sunf77* | sunf90* | sunf95*)
+ 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 that 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}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# 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 ${lt_cv_prog_compiler_pic_works+:} false; 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" ## exclude from sc_useless_quotes_in_assignment
+ # 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:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 yes = "$lt_cv_prog_compiler_pic_works"; 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 ${lt_cv_prog_compiler_static_works+:} false; 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 "$_lt_linker_boilerplate" | $SED '/^$/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 yes = "$lt_cv_prog_compiler_static_works"; 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 ${lt_cv_prog_compiler_c_o+:} false; 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:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 ${lt_cv_prog_compiler_c_o+:} false; 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:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; 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 no = "$hard_links"; 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_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 yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+ *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; 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 | $SED -e 's/(^)\+)\s\+//' 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 ia64 != "$host_cpu"; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, 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 install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_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'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
+ 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/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ 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, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; 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
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ 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 linux-dietlibc = "$host_os"; 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 no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ 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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # 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; func_echo_all \"$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' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ compiler_needs_object=yes
+ ;;
+ 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; func_echo_all \"$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 yes = "$supports_anon_versioning"; 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
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # 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='$wl-rpath $wl$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ 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 $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $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 $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $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 cannot
+*** 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 $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $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 no = "$ld_shlibs"; 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 yes = "$GCC" && 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 ia64 = "$host_cpu"; 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 GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX 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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | 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
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ 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,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; 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 yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; 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 yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; 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.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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
+ }
+ }'
+ lt_cv_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 "$lt_cv_aix_libpath_"; then
+ lt_cv_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 "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+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 -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; 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.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if ${lt_cv_aix_libpath_+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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
+ }
+ }'
+ lt_cv_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 "$lt_cv_aix_libpath_"; then
+ lt_cv_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 "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+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'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ 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.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ 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 `func_echo_all "$deplibs" | $SED '\''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'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ 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
+ ;;
+
+ # 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 $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$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 "x$output_objdir/$soname" = "x$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 yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $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 no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$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 yes,no = "$GCC,$with_gnu_ld"; 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 $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag $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'
+ ;;
+ *)
+
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -b"
+ 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 "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $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
+
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; 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 yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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.
+ # This should be the same for all languages, so no per-tag cache variable.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_irix_exported_symbol=yes
+else
+ lt_cv_irix_exported_symbol=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_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -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
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ 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* | bitrig*)
+ 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__`"; 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
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; 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" && func_echo_all "$wl-set_version $wl$verstring"` $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" && func_echo_all "-set_version $verstring"` -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 yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $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" && func_echo_all "-set_version $verstring"` -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 "-set_version $verstring"` -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 yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $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 $pic_flag $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 yes = "$GCC"; 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 sequent = "$host_vendor"; 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 yes = "$GCC"; 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 CANNOT 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 yes = "$GCC"; 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 sni = "$host_vendor"; 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 no = "$ld_shlibs" && 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 yes,yes = "$GCC,$enable_shared"; 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; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ $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
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ 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 yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # 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 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # 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`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ 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"
+ elif test -n "$lt_multi_os_dir"; then
+ 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; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+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 # correct to gnu/linux during the next big refactor
+ 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 # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; 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
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # 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'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
+ # 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'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ 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=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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 # correct to gnu/linux during the next big refactor
+ 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,$cc_basename in
+ yes,*)
+ # gcc
+ 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="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ ;;
+ 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
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH.
+ 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
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # 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'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # 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 # correct to gnu/linux during the next big refactor
+ 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
+ ;;
+
+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[23].*) 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$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ 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
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ 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=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ 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 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ 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'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[3-9]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ 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 yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ 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
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # 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
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ 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
+ if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_shlibpath_overrides_runpath=no
+ 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 :
+ lt_cv_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
+
+fi
+
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # 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
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) 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;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'
+ ;;
+
+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 # correct to gnu/linux during the next big refactor
+ 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* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ 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
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ 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'
+ ;;
+
+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 # correct to gnu/linux during the next big refactor
+ 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 yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ 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 # correct to gnu/linux during the next big refactor
+ 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=sco
+ 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 yes = "$with_gnu_ld"; 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 # correct to gnu/linux during the next big refactor
+ 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 # correct to gnu/linux during the next big refactor
+ 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 no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $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 yes = "$hardcode_automatic"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct" &&
+ # 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 no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; 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 relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test yes != "$enable_dlopen"; 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 ${ac_cv_lib_dl_dlopen+:} false; 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" = xyes; 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
+
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes; 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 ${ac_cv_lib_dld_shl_load+:} false; 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" = xyes; 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" = xyes; 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 ${ac_cv_lib_dl_dlopen+:} false; 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" = xyes; 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 ${ac_cv_lib_svld_dlopen+:} false; 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" = xyes; 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 ${ac_cv_lib_dld_dld_link+:} false; 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" = xyes; then :
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && 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 ${lt_cv_dlopen_self+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test yes = "$cross_compiling"; 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 $LINENO "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
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+ else puts (dlerror ());
+ }
+ /* 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 yes = "$lt_cv_dlopen_self"; 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 ${lt_cv_dlopen_self_static+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test yes = "$cross_compiling"; 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 $LINENO "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
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 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;
+ else puts (dlerror ());
+ }
+ /* 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 what 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 no = "$can_build_shared" && 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 yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ 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 yes = "$enable_shared" || 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:
+
+
+# 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 ${ac_cv_sys_largefile_CC+:} false; 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 ${ac_cv_sys_file_offset_bits+:} false; 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 ${ac_cv_sys_large_files+:} false; 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
+
+{ $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 ${ac_cv_sys_largefile_source+:} false; 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
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_ac_Header=yes"
+else
+ eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; 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 opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; 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_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_opendir+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; 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 opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; 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_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_opendir+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+{ $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 ${ac_cv_header_stdc+:} false; 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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
+$as_echo_n "checking whether closedir returns void... " >&6; }
+if ${ac_cv_func_closedir_void+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_closedir_void=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header_dirent>
+#ifndef __cplusplus
+int closedir ();
+#endif
+
+int
+main ()
+{
+return closedir (opendir (".")) != 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_closedir_void=no
+else
+ ac_cv_func_closedir_void=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: $ac_cv_func_closedir_void" >&5
+$as_echo "$ac_cv_func_closedir_void" >&6; }
+if test $ac_cv_func_closedir_void = yes; then
+
+$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
+
+fi
+
+for ac_header in assert.h float.h limits.h pwd.h stdlib.h sys/param.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
+
+for ac_func in putenv
+do :
+ ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
+if test "x$ac_cv_func_putenv" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PUTENV 1
+_ACEOF
+
+fi
+done
+
+for ac_func in getcwd getwd memcmp memcpy mkstemp mktemp strchr strrchr
+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 an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+ const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=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_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; 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
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+ no|yes) ;; #(
+ *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+ no|yes) ;; #(
+ *)
+
+$as_echo "#define _UINT64_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+ esac
+
+case :$ac_cv_c_int64_t:$ac_cv_c_int64_t: in #(
+ *':no:'*) :
+ as_fn_error $? "Sorry, your compiler does not support 64-bit integer types." "$LINENO" 5 ;; #(
+ *) :
+ ;;
+esac
+ac_fn_c_check_decl "$LINENO" "isascii" "ac_cv_have_decl_isascii" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isascii" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISASCII $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_MTIM 1
+_ACEOF
+
+
+fi
+
+
+
+## texk/kpathsea/ac/mktex.ac: configure.ac fragment for the TeX Live
+## subdirectory texk/kpathsea.
+## configure defaults for mktexfmt & Co.
+# Check whether --enable-mktexmf-default was given.
+if test "${enable_mktexmf_default+set}" = set; then :
+ enableval=$enable_mktexmf_default;
+fi
+# Check whether --enable-mktexpk-default was given.
+if test "${enable_mktexpk_default+set}" = set; then :
+ enableval=$enable_mktexpk_default;
+fi
+# Check whether --enable-mktextfm-default was given.
+if test "${enable_mktextfm_default+set}" = set; then :
+ enableval=$enable_mktextfm_default;
+fi
+# Check whether --enable-mkocp-default was given.
+if test "${enable_mkocp_default+set}" = set; then :
+ enableval=$enable_mkocp_default;
+fi
+# Check whether --enable-mkofm-default was given.
+if test "${enable_mkofm_default+set}" = set; then :
+ enableval=$enable_mkofm_default;
+fi
+# Check whether --enable-mktexfmt-default was given.
+if test "${enable_mktexfmt_default+set}" = set; then :
+ enableval=$enable_mktexfmt_default;
+fi
+# Check whether --enable-mktextex-default was given.
+if test "${enable_mktextex_default+set}" = set; then :
+ enableval=$enable_mktextex_default;
+fi
+
+
+case $enable_mktexmf_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mktexmf_default=yes ;;
+esac
+if test "x$enable_mktexmf_default" = xyes; then :
+
+$as_echo "#define MAKE_TEX_MF_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_TEX_MF_BY_DEFAULT 0" >>confdefs.h
+
+fi
+case $enable_mktexpk_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mktexpk_default=yes ;;
+esac
+if test "x$enable_mktexpk_default" = xyes; then :
+
+$as_echo "#define MAKE_TEX_PK_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_TEX_PK_BY_DEFAULT 0" >>confdefs.h
+
+fi
+case $enable_mktextfm_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mktextfm_default=yes ;;
+esac
+if test "x$enable_mktextfm_default" = xyes; then :
+
+$as_echo "#define MAKE_TEX_TFM_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_TEX_TFM_BY_DEFAULT 0" >>confdefs.h
+
+fi
+case $enable_mkocp_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mkocp_default=yes ;;
+esac
+if test "x$enable_mkocp_default" = xyes; then :
+
+$as_echo "#define MAKE_OMEGA_OCP_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_OMEGA_OCP_BY_DEFAULT 0" >>confdefs.h
+
+fi
+case $enable_mkofm_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mkofm_default=yes ;;
+esac
+if test "x$enable_mkofm_default" = xyes; then :
+
+$as_echo "#define MAKE_OMEGA_OFM_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_OMEGA_OFM_BY_DEFAULT 0" >>confdefs.h
+
+fi
+case $enable_mktexfmt_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mktexfmt_default=yes ;;
+esac
+if test "x$enable_mktexfmt_default" = xyes; then :
+
+$as_echo "#define MAKE_TEX_FMT_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_TEX_FMT_BY_DEFAULT 0" >>confdefs.h
+
+fi
+case $enable_mktextex_default in #(
+ yes | no) :
+ ;; #(
+ *) :
+ enable_mktextex_default=no ;;
+esac
+if test "x$enable_mktextex_default" = xyes; then :
+
+$as_echo "#define MAKE_TEX_TEX_BY_DEFAULT 1" >>confdefs.h
+
+else
+ $as_echo "#define MAKE_TEX_TEX_BY_DEFAULT 0" >>confdefs.h
+
+fi
+
+# So we can use reasonable awk in the Makefile.
+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 ${ac_cv_prog_AWK+:} false; 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 as_fn_executable_p "$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
+
+
+# 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" >&5
+$as_echo_n "checking size of long... " >&6; }
+if ${ac_cv_sizeof_long+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long" = 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)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+ac_fn_c_check_decl "$LINENO" "putenv" "ac_cv_have_decl_putenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putenv" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTENV $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
+if test "x$ac_cv_func_putenv" = xyes; then :
+ $as_echo "#define HAVE_PUTENV 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" putenv.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS putenv.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+
+if test "x$ac_cv_func_getcwd" = xyes; then
+# We only need to run this if we have getcwd.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd uses fork or vfork" >&5
+$as_echo_n "checking whether getcwd uses fork or vfork... " >&6; }
+if ${kb_cv_func_getcwd_forks+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ kb_cv_func_getcwd_forks=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int fork() { exit(1); }
+ int vfork() { exit(1); }
+ extern char *getcwd();
+ char path[100];
+int
+main ()
+{
+getcwd(path,100);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ kb_cv_func_getcwd_forks=no
+else
+ kb_cv_func_getcwd_forks=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: $kb_cv_func_getcwd_forks" >&5
+$as_echo "$kb_cv_func_getcwd_forks" >&6; }
+if test "x$kb_cv_func_getcwd_forks" = xyes; then
+
+$as_echo "#define GETCWD_FORKS 1" >>confdefs.h
+
+fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5
+$as_echo_n "checking for native WIN32 or MINGW32... " >&6; }
+if ${kpse_cv_have_win32+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef WIN32
+ 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. */
+#ifndef __MINGW32__
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ kpse_cv_have_win32=mingw32
+else
+ kpse_cv_have_win32=native
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ kpse_cv_have_win32=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5
+$as_echo "$kpse_cv_have_win32" >&6; }
+
+ if test "x$kpse_cv_have_win32" != xno; then
+ WIN32_TRUE=
+ WIN32_FALSE='#'
+else
+ WIN32_TRUE='#'
+ WIN32_FALSE=
+fi
+
+
+ if test "x$kpse_cv_have_win32" = xmingw32; then
+ MINGW32_TRUE=
+ MINGW32_FALSE='#'
+else
+ MINGW32_TRUE='#'
+ MINGW32_FALSE=
+fi
+
+
+
+LT_OBJDIR="$lt_cv_objdir"
+
+
+# Checking snprintf and vsnprintf
+
+# Check whether --with-snprintf-wrapper was given.
+if test "${with_snprintf_wrapper+set}" = set; then :
+ withval=$with_snprintf_wrapper; kpse_cv_wrap_snprintf=$withval
+else
+ test "x$kpse_cv_have_win32" != xno && kpse_cv_wrap_snprintf=yes
+fi
+if test "x$kpse_cv_have_win32" = xno; then
+ snfunc=snprintf vsnfunc=vsnprintf
+else
+ snfunc=_snprintf vsnfunc=_vsnprintf
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $snfunc and $vsnfunc" >&5
+$as_echo_n "checking for $snfunc and $vsnfunc... " >&6; }
+if ${kpse_cv_have_snfuncs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+ #include <stdio.h>
+ char buf[16];
+ va_list ap;
+int
+main ()
+{
+$snfunc (buf, 16, "%s", "abc");
+ $vsnfunc (buf, 16, "%s", ap);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ kpse_cv_have_snfuncs=yes
+else
+ kpse_cv_have_snfuncs=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: $kpse_cv_have_snfuncs" >&5
+$as_echo "$kpse_cv_have_snfuncs" >&6; }
+if test "x$kpse_cv_have_snfuncs" != xyes; then
+ as_fn_error $? "Sorry, you need $snfunc and $vsnfunc." "$LINENO" 5
+fi
+if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";
+int
+main ()
+{
+if ($snfunc (buf, 1, "%s", "x") == 0 || buf[1] != 'b')
+ return 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ as_fn_error $? "Sorry, your $snfunc is badly broken." "$LINENO" 5
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need (v)snprintf wrapper functions" >&5
+$as_echo_n "checking if we need (v)snprintf wrapper functions... " >&6; }
+if ${kpse_cv_wrap_snprintf+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ kpse_cv_wrap_snprintf=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";
+int
+main ()
+{
+$snfunc (buf, 3, "xyz");
+ if (buf[2] != 0) return 1;
+ $snfunc (buf, 2, "xyz");
+ if (buf[1] != 0) return 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ kpse_cv_wrap_snprintf=no
+else
+ kpse_cv_wrap_snprintf=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: $kpse_cv_wrap_snprintf" >&5
+$as_echo "$kpse_cv_wrap_snprintf" >&6; }
+if test "x$kpse_cv_wrap_snprintf" = xyes; then
+
+$as_echo "#define WRAP_SNPRINTF 1" >>confdefs.h
+
+fi
+
+ if test -n "$EXEEXT"; then
+ have_EXEEXT_TRUE=
+ have_EXEEXT_FALSE='#'
+else
+ have_EXEEXT_TRUE='#'
+ have_EXEEXT_FALSE=
+fi
+
+
+ac_config_headers="$ac_config_headers c-auto.h:c-auto.in"
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile doc/Makefile man/Makefile win32/Makefile kpathsea.pc"
+
+
+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
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ 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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+ as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+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 "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
+ as_fn_error $? "conditional \"WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then
+ as_fn_error $? "conditional \"MINGW32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${have_EXEEXT_TRUE}" && test -z "${have_EXEEXT_FALSE}"; then
+ as_fn_error $? "conditional \"have_EXEEXT\" 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.
+as_myself=
+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 -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+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
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# 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 Kpathsea $as_me 6.3.3, which was
+generated by GNU Autoconf 2.69. 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_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 commands:
+$config_commands
+
+Report bugs to <tex-k@tug.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+Kpathsea config.status 6.3.3
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 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" MAKE="${MAKE-make}"
+
+
+# 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'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+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_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ 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 \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path; do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+ac_aux_dir='$ac_aux_dir'
+
+# See if we are running on zsh, and set the options that 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'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+_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
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "c-auto.h") CONFIG_HEADERS="$CONFIG_HEADERS c-auto.h:c-auto.in" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+ "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;;
+ "kpathsea.pc") CONFIG_FILES="$CONFIG_FILES kpathsea.pc" ;;
+
+ *) 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_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= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_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 -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# 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 {' >"$ac_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 >>"\$ac_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 >>"\$ac_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 < "$ac_tmp/subs1.awk" > "$ac_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 >"$ac_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_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; 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 :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="$ac_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 >"$ac_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 "$ac_tmp/subs.awk" \
+ >$ac_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' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_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 "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_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 "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_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 "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_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
+ ;;
+
+ :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
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf 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.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$am_mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
+ done
+ if test $am_rc -ne 0; 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 $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options that 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
+# Generated automatically by $as_me ($PACKAGE) $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.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 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 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=''
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# 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
+
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# 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 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//"
+
+# 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
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# 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
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# 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
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# 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 into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
+# 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 lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# 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
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# 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
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# 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
+
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+
+# 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
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# 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
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# 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
+
+# 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
+
+# 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
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_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
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_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 set != "${COLLECT_NAMES+set}"; 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 '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "c-auto.h":H) sed -e 's/^#define PACKAGE/#define KPSE_PACKAGE/' \
+ -e 's/^#define VERSION/#define KPSE_VERSION/' c-auto.h >c-auto.tmp && mv -f c-auto.tmp c-auto.h ;;
+
+ 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/Build/source/texk/kpathsea/configure.ac b/Build/source/texk/kpathsea/configure.ac
new file mode 100644
index 00000000000..0851e82f011
--- /dev/null
+++ b/Build/source/texk/kpathsea/configure.ac
@@ -0,0 +1,153 @@
+dnl $Id$
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright 2015-2021 Karl Berry <tex-live@tug.org>
+dnl Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+m4_include([version.ac])[] dnl define kpse_version
+AC_INIT([Kpathsea], kpse_version, [tex-k@tug.org])
+AC_PREREQ([2.65])
+AC_CONFIG_SRCDIR([pathsearch.c])
+AC_CONFIG_AUX_DIR([../../build-aux])
+AC_CONFIG_MACRO_DIR([../../m4])
+
+AC_SUBST([KPSEVERSION], [kpse_version])
+KPSE_LT_VERSION([kpse])
+
+m4_include([../../version.ac])[] dnl define tex_live_version
+AC_SUBST([WEB2CVERSION], [" (TeX Live tex_live_version)"])
+
+dnl Common code for all programs using libkpathsea.
+KPSE_COMMON([kpathsea])
+dnl Include additional code for kpathsea.
+KPSE_MKTEX_PREPARE
+m4_sinclude([ac/mktex.ac])
+
+dnl Generate MAKE_TEX_*_BY_DEFAULT and MAKE_OMEGA_*_BY_DEFAULT defines.
+m4_foreach([Kpse_Mktex], [kpse_mktex_opts],
+ [m4_ifset([Kpse_Mktex],
+ [KPSE_MKTEX_DEFINE(Kpse_Mktex)])])[]dnl
+
+# So we can use reasonable awk in the Makefile.
+AC_PROG_AWK
+
+AC_CHECK_SIZEOF([long])
+
+dnl Replacement functions that may be required on ancient broken system.
+AC_CHECK_DECLS([putenv])
+AC_REPLACE_FUNCS([putenv])
+
+if test "x$ac_cv_func_getcwd" = xyes; then
+# We only need to run this if we have getcwd.
+AC_CACHE_CHECK([whether getcwd uses fork or vfork],
+ [kb_cv_func_getcwd_forks],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[int fork() { exit(1); }
+ int vfork() { exit(1); }
+ extern char *getcwd();
+ char path[100];]],
+ [[getcwd(path,100);]])],
+ [kb_cv_func_getcwd_forks=no],
+ [kb_cv_func_getcwd_forks=yes],
+ [kb_cv_func_getcwd_forks=no])])
+if test "x$kb_cv_func_getcwd_forks" = xyes; then
+ AC_DEFINE([GETCWD_FORKS], 1,
+ [Define to 1 if getcwd is implemented using fork or vfork.
+ Let me know if you have to add this by hand because configure
+ failed to detect it.])
+fi
+fi
+
+KPSE_COND_MINGW32
+
+AC_SUBST([LT_OBJDIR], ["$lt_cv_objdir"])
+
+# Checking snprintf and vsnprintf
+AC_ARG_WITH([snprintf-wrapper],
+ AS_HELP_STRING([--with-snprintf-wrapper],
+ [use (v)snprintf wrapper functions @<:@automatic
+ for native compilation or Windows@:>@]),
+ [kpse_cv_wrap_snprintf=$withval],
+ [test "x$kpse_cv_have_win32" != xno && kpse_cv_wrap_snprintf=yes])[]dnl
+if test "x$kpse_cv_have_win32" = xno; then
+ snfunc=snprintf vsnfunc=vsnprintf
+else
+ snfunc=_snprintf vsnfunc=_vsnprintf
+fi
+AC_CACHE_CHECK([for $snfunc and $vsnfunc],
+ [kpse_cv_have_snfuncs],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ #include <stdio.h>
+ char buf[16];
+ va_list ap;]],
+ [[$snfunc (buf, 16, "%s", "abc");
+ $vsnfunc (buf, 16, "%s", ap);]])],
+ [kpse_cv_have_snfuncs=yes],
+ [kpse_cv_have_snfuncs=no])])
+if test "x$kpse_cv_have_snfuncs" != xyes; then
+ AC_MSG_ERROR([Sorry, you need $snfunc and $vsnfunc.])
+fi
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";]],
+ [[if ($snfunc (buf, 1, "%s", "x") == 0 || buf[1] != 'b')
+ return 1;]])],
+ [],
+ [AC_MSG_ERROR([Sorry, your $snfunc is badly broken.])],
+ [:])
+AC_CACHE_CHECK([if we need (v)snprintf wrapper functions],
+ [kpse_cv_wrap_snprintf],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>
+ #include <stdio.h>
+ char buf[4] = "abc";]],
+ [[$snfunc (buf, 3, "xyz");
+ if (buf[2] != 0) return 1;
+ $snfunc (buf, 2, "xyz");
+ if (buf[1] != 0) return 1;]])],
+ [kpse_cv_wrap_snprintf=no],
+ [kpse_cv_wrap_snprintf=yes],
+ [kpse_cv_wrap_snprintf=no])])
+if test "x$kpse_cv_wrap_snprintf" = xyes; then
+ AC_DEFINE([WRAP_SNPRINTF], 1,
+ [Define to 1 if we need (v)snprintf wrapper functions.])
+fi
+
+AM_CONDITIONAL([have_EXEEXT], [test -n "$EXEEXT"])
+
+dnl Write output here, instead of putting a zillion -D's on the command line.
+AC_CONFIG_HEADERS([c-auto.h:c-auto.in],
+ [sed -e 's/^#define PACKAGE/#define KPSE_PACKAGE/' \
+ -e 's/^#define VERSION/#define KPSE_VERSION/' c-auto.h >c-auto.tmp && mv -f c-auto.tmp c-auto.h])
+
+AH_TOP([/* c-auto.h: defines for kpathsea, as determined by configure.
+
+ Copyright 1994-97, 2008-2015 Karl Berry.
+ Copyright 1997-99, 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+/* Guard against double inclusion. */
+#ifndef KPATHSEA_C_AUTO_H
+#define KPATHSEA_C_AUTO_H
+
+/* kpathsea: the version string. */
+#define KPSEVERSION "kpathsea version] kpse_version["])
+AH_BOTTOM([#endif /* !KPATHSEA_C_AUTO_H */])
+
+AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile win32/Makefile kpathsea.pc])
+
+AC_OUTPUT
diff --git a/Build/source/texk/kpathsea/db.c b/Build/source/texk/kpathsea/db.c
new file mode 100644
index 00000000000..fb4658c1968
--- /dev/null
+++ b/Build/source/texk/kpathsea/db.c
@@ -0,0 +1,807 @@
+/* db.c: an external database to avoid filesystem lookups.
+
+ Copyright 1994, 1995, 1996, 1997, 2008, 2009, 2011, 2012, 2014, 2016,
+ 2017 Karl Berry.
+ Copyright 1997-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/absolute.h>
+#include <kpathsea/c-stat.h>
+#include <kpathsea/c-fopen.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/db.h>
+#include <kpathsea/hash.h>
+#include <kpathsea/line.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/readable.h>
+#include <kpathsea/str-list.h>
+#include <kpathsea/tex-file.h>
+#include <kpathsea/variable.h>
+
+#ifndef DB_HASH_SIZE
+/* Based on the size of 2014 texmf-dist/ls-R, about 130,000 entries. */
+#define DB_HASH_SIZE 64007
+#endif
+#ifndef DB_NAME
+#define DB_NAME "ls-R"
+#endif
+#ifndef DB_NAME_LC
+#define DB_NAME_LC "ls-r"
+#endif
+
+/* In the loop in init() below where we check for DB_NAME_LC and DB_NAME
+ being the same file, it's convenient to ignore the first of a pair.
+ So put the canonical name second. Sure wish I hadn't used a capital
+ letter in the name in the first place. */
+/* We use non-const strings initialized with string constants in order
+ to avoid some compiler warnings. */
+static char db_name_lc[] = DB_NAME_LC;
+static char db_name[] = DB_NAME;
+static string db_names[] = {
+ db_name_lc,
+ db_name,
+ NULL
+};
+
+#ifndef ALIAS_NAME
+#define ALIAS_NAME "aliases"
+#endif
+#ifndef ALIAS_HASH_SIZE
+#define ALIAS_HASH_SIZE 1009
+#endif
+
+
+/* If DIRNAME contains any element beginning with a `.' (that is more
+ than just `./'), return true. This is to allow ``hidden''
+ directories -- ones that don't get searched. */
+
+static boolean
+ignore_dir_p (const_string dirname)
+{
+ const_string dot_pos = dirname;
+
+ while ((dot_pos = strchr (dot_pos + 1, '.'))) {
+ /* If / before and no / after, skip it. */
+ if (IS_DIR_SEP_CH (dot_pos[-1]) && dot_pos[1] && !IS_DIR_SEP_CH (dot_pos[1]))
+ return true;
+ }
+
+ return false;
+}
+
+/* If no DB_FILENAME, return false (maybe they aren't using this feature).
+ Otherwise, add entries from DB_FILENAME to TABLE, and return true. */
+
+static boolean
+db_build (kpathsea kpse, hash_table_type *table, const_string db_filename)
+{
+ string line;
+ unsigned dir_count = 0, file_count = 0, ignore_dir_count = 0;
+ unsigned len = strlen (db_filename) - sizeof (DB_NAME) + 1; /* Keep the /. */
+ string top_dir = (string)xmalloc (len + 1);
+ string cur_dir = NULL; /* First thing in ls-R might be a filename. */
+ FILE *db_file = fopen (db_filename, FOPEN_R_MODE);
+#if defined(MONOCASE_FILENAMES)
+ string pp;
+#endif /* MONOCASE_FILENAMES */
+
+ strncpy (top_dir, db_filename, len);
+ top_dir[len] = 0;
+
+ if (db_file) {
+ while ((line = read_line (db_file)) != NULL) {
+ len = strlen (line);
+
+#if defined(MONOCASE_FILENAMES)
+ for (pp = line; *pp; pp++) {
+#if defined(_WIN32)
+ if (kpathsea_IS_KANJI(kpse, pp))
+ pp++;
+ else
+#endif /* _WIN32 */
+ *pp = TRANSFORM(*pp);
+ }
+#endif /* MONOCASE_FILENAMES */
+
+ /* A line like `/foo:' = new dir foo. Allow both absolute (/...)
+ and explicitly relative (./...) names here. It's a kludge to
+ pass in the directory name with the trailing : still attached,
+ but it doesn't actually hurt. */
+ if (len > 0 && line[len - 1] == ':'
+ && kpathsea_absolute_p (kpse, line, true)) {
+ /* New directory line. */
+ if (!ignore_dir_p (line)) {
+ /* If they gave a relative name, prepend full directory name now. */
+ line[len - 1] = DIR_SEP;
+ /* Skip over leading `./', it confuses `match' and is just a
+ waste of space, anyway. This will lose on `../', but `match'
+ won't work there, either, so it doesn't matter. */
+ cur_dir = *line == '.' ? concat (top_dir, line + 2) : xstrdup (line);
+ dir_count++;
+ } else {
+ cur_dir = NULL;
+ ignore_dir_count++;
+ }
+
+ /* Ignore blank, `.' and `..' lines. */
+ } else if (*line != 0 && cur_dir /* a file line? */
+ && !(*line == '.'
+ && (line[1] == 0 || (line[1] == '.' && line[2] == 0))))
+ {
+ /* Make a new hash table entry with a key of `line' and a data
+ of `cur_dir'. An already-existing identical key is ok, since
+ a file named `foo' can be in more than one directory. Share
+ `cur_dir' among all its files (and hence never free it).
+
+ Note that we assume that all names in the ls-R file have already
+ been case-smashed to lowercase where appropriate.
+ */
+ hash_insert_normalized (table, xstrdup (line), cur_dir);
+ file_count++;
+
+ } /* else ignore blank lines or top-level files
+ or files in ignored directories*/
+
+ free (line);
+ }
+
+ xfclose (db_file, db_filename);
+
+ if (file_count == 0) {
+ WARNING1 ("kpathsea: %s: No usable entries in ls-R", db_filename);
+ WARNING ("kpathsea: See the manual for how to generate ls-R");
+ db_file = NULL;
+ } else {
+ str_list_add (&(kpse->db_dir_list), xstrdup (top_dir));
+ }
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH)) {
+ /* Don't make this a debugging bit, since the output is so
+ voluminous, and being able to specify -1 is too useful.
+ Instead, let people who want it run the program under
+ a debugger and change the variable that way. */
+ boolean hash_summary_only = true;
+
+ DEBUGF4 ("%s: %u entries in %d directories (%d hidden).\n",
+ db_filename, file_count, dir_count, ignore_dir_count);
+ DEBUGF ("ls-R hash table:");
+ hash_print (*table, hash_summary_only);
+ fflush (stderr);
+ }
+#endif /* KPSE_DEBUG */
+ }
+
+ free (top_dir);
+
+ return db_file != NULL;
+}
+
+
+/* Insert FNAME into the hash table. This is for files that get built
+ during a run. We wouldn't want to reread all of ls-R, even if it got
+ rebuilt. */
+
+void
+kpathsea_db_insert (kpathsea kpse, const_string passed_fname)
+{
+ /* We might not have found ls-R, or even had occasion to look for it
+ yet, so do nothing if we have no hash table. */
+ if (kpse->db.buckets) {
+ const_string dir_part;
+ string fname = xstrdup (passed_fname);
+ string baseptr = fname + (xbasename (fname) - fname);
+ const_string file_part = xstrdup (baseptr);
+
+ *baseptr = '\0'; /* Chop off the filename. */
+ dir_part = fname; /* That leaves the dir, with the trailing /. */
+
+ /* Note that we do not assuse that these names have been normalized. */
+ hash_insert (&(kpse->db), file_part, dir_part);
+ }
+}
+
+/* Return true if FILENAME could be in PATH_ELT, i.e., if the directory
+ part of FILENAME matches PATH_ELT. Have to consider // wildcards, but
+ $ and ~ expansion have already been done. */
+
+static boolean
+match (const_string filename, const_string path_elt)
+{
+ const_string original_filename = filename;
+ boolean matched = false;
+
+ for (; *filename && *path_elt; filename++, path_elt++) {
+ if (FILECHARCASEEQ (*filename, *path_elt)) /* normal character match */
+ ;
+
+ else if (IS_DIR_SEP_CH (*path_elt) /* at // */
+ && original_filename < filename && IS_DIR_SEP_CH (path_elt[-1])) {
+ while (IS_DIR_SEP_CH (*path_elt))
+ path_elt++; /* get past second and any subsequent /'s */
+ if (*path_elt == 0) {
+ /* Trailing //, matches anything. We could make this part of the
+ other case, but it seems pointless to do the extra work. */
+ matched = true;
+ break;
+ } else {
+ /* Intermediate //, have to match rest of PATH_ELT. */
+ for (; !matched && *filename; filename++) {
+ /* Try matching at each possible character. */
+ if (IS_DIR_SEP_CH (filename[-1])
+ && FILECHARCASEEQ (*filename, *path_elt))
+ matched = match (filename, path_elt);
+ }
+ /* Prevent filename++ when *filename='\0'. */
+ break;
+ }
+ }
+
+ else /* normal character nonmatch, quit */
+ break;
+ }
+
+ /* If we've reached the end of PATH_ELT, check that we're at the last
+ component of FILENAME (that is, no directory separators remaining);
+ only then have we matched. */
+ if (!matched && *path_elt == 0) {
+ /* Typically PATH_ELT ends with, say, `vf', and FILENAME ends with
+ `vf/ptmr.vf'. In that case, we'll be at the /. On the other
+ hand, if PATH_ELT ended with a / (as in `vf/'), FILENAME being
+ the same `vf/ptmr.vf', we'll be at the `p'.
+ Upshot: if we're at a dir sep in FILENAME, skip it. */
+ if (IS_DIR_SEP_CH (*filename))
+ filename++;
+
+ /* Here are the basic possibilities for the check on being at the
+ last component:
+ 1) PATH_ELT is empty and FILENAME is `ptmr.vf' => match.
+ (we now have original_filename == filename)
+ 2) PATH_ELT is empty and FILENAME is `foo/ptmr.vf' => no match.
+ (we now have original_filename == filename)
+ 3) PATH_ELT is `vf/' and FILENAME is `vf/ptmr.vf'
+ (we are now after the / in each) => match.
+ 4) PATH_ELT is `vf' and FILENAME is `vfoo.ext'
+ (we are now after the f in each) => no match.
+
+ When (the original) PATH_ELT was the empty string, we want to match
+ a FILENAME without dir seps. (This could be argued, and may never
+ happen in practice, but is the historical behavior.) */
+ /* if original_filename != filename then original_filename < filename */
+ if (original_filename == filename || IS_DIR_SEP_CH (filename[-1])) {
+ while (*filename && !IS_DIR_SEP_CH (*filename))
+ filename++;
+ matched = *filename == 0;
+ }
+ }
+
+ return matched;
+}
+
+
+/* If DB_DIR is a prefix of PATH_ELT, return true; otherwise false.
+ That is, the question is whether to try the db for a file looked up
+ in PATH_ELT. If PATH_ELT == ".", for example, the answer is no. If
+ PATH_ELT == "/usr/local/lib/texmf/fonts//tfm", the answer is yes.
+ If either string is NULL or empty, return false.
+
+ In practice, ls-R is only needed for lengthy subdirectory
+ comparisons, but there's no gain to checking PATH_ELT to see if it is
+ a subdir match, since the only way to do that is to do a string
+ search in it, which is all we do anyway. */
+
+static boolean
+elt_in_db (const_string db_dir, const_string path_elt)
+{
+ boolean found = false;
+
+ /* If both strings are empty or null return false on the grounds that
+ it's useless to do anything further with such a strange case (which
+ likely never happens). In theory one could argue that the empty
+ string is a prefix of any other string, but let's just declare the
+ result otherwise. */
+ if (db_dir == NULL || *db_dir == 0
+ || path_elt == NULL || *path_elt == 0)
+ return false;
+
+ while (!found && FILECHARCASEEQ (*db_dir++, *path_elt++)) {
+ /* If we've matched the entire db directory, it's good. */
+ if (*db_dir == 0)
+ found = true;
+
+ /* If we've reached the end of PATH_ELT, but not the end of the db
+ directory, it's no good. */
+ else if (*path_elt == 0)
+ break;
+ }
+
+ return found;
+}
+
+/* If ALIAS_FILENAME exists, read it into TABLE. */
+
+static boolean
+alias_build (kpathsea kpse, hash_table_type *table,
+ const_string alias_filename)
+{
+ string line, real, alias;
+ unsigned count = 0;
+ FILE *alias_file = fopen (alias_filename, FOPEN_R_MODE);
+
+ if (alias_file) {
+ while ((line = read_line (alias_file)) != NULL) {
+ /* comments or empty */
+ if (*line == 0 || *line == '%' || *line == '#') {
+ ;
+ } else {
+ /* Each line should have two fields: realname aliasname. */
+ real = line;
+ while (*real && ISSPACE (*real))
+ real++;
+ alias = real;
+ while (*alias && !ISSPACE (*alias))
+ alias++;
+ *alias++ = 0;
+ while (*alias && ISSPACE (*alias))
+ alias++;
+ /* Is the check for errors strong enough? Should we warn the user
+ for potential errors? */
+ if (strlen (real) != 0 && strlen (alias) != 0) {
+ /* Stuff in the alias file should be normalized. */
+ hash_insert_normalized (table, xstrdup (alias), xstrdup (real));
+ count++;
+ }
+ }
+ free (line);
+ }
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH)) {
+ /* As with ls-R above ... */
+ boolean hash_summary_only = true;
+ DEBUGF2 ("%s: %u aliases.\n", alias_filename, count);
+ DEBUGF ("alias hash table:");
+ hash_print (*table, hash_summary_only);
+ fflush (stderr);
+ }
+#endif /* KPSE_DEBUG */
+
+ xfclose (alias_file, alias_filename);
+ }
+
+ return alias_file != NULL;
+}
+
+/* Initialize the path for ls-R files, and read them all into the hash
+ table `db'. If no usable ls-R's found, set kpse->db.buckets to NULL. */
+
+void
+kpathsea_init_db (kpathsea kpse)
+{
+ const_string db_path;
+ string *db_files;
+ string *orig_db_files;
+ str_list_type unique_list;
+ int dbi;
+ boolean ok = false;
+
+ assert (sizeof(DB_NAME) == sizeof(DB_NAME_LC));
+
+ db_path = kpathsea_init_format (kpse, kpse_db_format);
+ db_files = kpathsea_path_search_list_generic (kpse, db_path, db_names,
+ true, true);
+ orig_db_files = db_files;
+
+ /* Mac OS X and others can use a case-insensitive, case-preserving
+ filesystem by default, in which case ls-R and ls-r point to the
+ same file. Also, Windows is case-insensitive. In these cases,
+ we want to avoid reading the same file multiple times. */
+ dbi = 0;
+ unique_list = str_list_init ();
+
+ while (db_files[dbi] != NULL) {
+ string path1 = db_files[dbi];
+ string path2 = db_files[dbi + 1];
+
+ /* first-pass check in case path1/path2 aren't even
+ potentially equal; mainly in case the order from
+ kpathsea_path_search_list_generic changes. */
+ if (path2
+ && strcasecmp (path1, path2) == 0
+ && same_file_p (path1, path2)) {
+ /* they are the same, skip over path1, we'll add path2
+ on the next iteration (when it's path1). */
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH)) {
+ DEBUGF2 ("db:init(): skipping db same_file_p %s, will add %s.\n",
+ path1, path2);
+ }
+#endif
+ free (path1);
+
+ } else {
+ /* they are not the same, add path1. */
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH)) {
+ DEBUGF1 ("db:init(): using db file %s.\n", path1);
+ }
+#endif
+ str_list_add (&unique_list, path1);
+ }
+
+ /* could be more clever and increment by two, but then would
+ have to avoid jumping off the end of db_files */
+ dbi++;
+ }
+
+ /* always add a NULL terminator. */
+ str_list_add (&unique_list, NULL);
+
+ free (orig_db_files);
+ db_files = STR_LIST (unique_list);
+ orig_db_files = db_files;
+
+ /* Must do this after the path searching (which ends up calling
+ kpse_db_search recursively), so kpse->db.buckets stays NULL. */
+ kpse->db = hash_create (DB_HASH_SIZE);
+
+ while (db_files && *db_files) {
+ if (db_build (kpse, &(kpse->db), *db_files))
+ ok = true;
+ free (*db_files);
+ db_files++;
+ }
+
+ if (!ok) {
+ /* If db can't be built, leave `size' nonzero (so we don't
+ rebuild it), but clear `buckets' (so we don't look in it). */
+ free (kpse->db.buckets);
+ kpse->db.buckets = NULL;
+ }
+
+ free (orig_db_files);
+
+ /* Add the content of any alias databases. There may exist more than
+ one alias file along DB_NAME files. This duplicates the above code
+ -- should be a function. */
+ ok = false;
+ db_files = kpathsea_all_path_search (kpse, db_path, ALIAS_NAME);
+ orig_db_files = db_files;
+
+ kpse->alias_db = hash_create (ALIAS_HASH_SIZE);
+
+ while (db_files && *db_files) {
+ if (alias_build (kpse, &(kpse->alias_db), *db_files))
+ ok = true;
+ free (*db_files);
+ db_files++;
+ }
+
+ if (!ok) {
+ free (kpse->alias_db.buckets);
+ kpse->alias_db.buckets = NULL;
+ }
+
+ free (orig_db_files);
+}
+
+/* Avoid doing anything if this PATH_ELT is irrelevant to the databases. */
+str_list_type *
+kpathsea_db_search (kpathsea kpse, const_string name,
+ const_string orig_path_elt, boolean all)
+{
+ const_string *db_dirs, *orig_dirs;
+ const_string last_slash, path_elt;
+ string temp_str = NULL;
+ boolean done;
+ unsigned e;
+ str_list_type *ret = NULL;
+ const_string *aliases, *r;
+ boolean relevant = false;
+
+ /* If we failed to build the database (or if this is the recursive
+ call to build the db path), quit. */
+ if (kpse->db.buckets == NULL)
+ return NULL;
+
+ /* When tex-glyph.c calls us looking for, e.g., dpi600/cmr10.pk, we
+ won't find it unless we change NAME to just `cmr10.pk' and append
+ `/dpi600' to PATH_ELT. We are justified in using a literal `/'
+ here, since that's what tex-glyph.c unconditionally uses in
+ DPI_BITMAP_SPEC. But don't do anything if the / begins NAME; that
+ should never happen. */
+ last_slash = strrchr (name, '/');
+ if (last_slash && last_slash != name) {
+ unsigned len = last_slash - name + 1;
+ string dir_part = (string)xmalloc (len);
+ strncpy (dir_part, name, len - 1);
+ dir_part[len - 1] = 0;
+ path_elt = temp_str = concat3 (orig_path_elt, "/", dir_part);
+ name = last_slash + 1;
+ free (dir_part);
+ } else
+ path_elt = orig_path_elt;
+
+ /* Don't bother doing any lookups if this `path_elt' isn't covered by
+ any of database directories. We do this not so much because the
+ extra couple of hash lookups matter -- they don't -- but rather
+ because we want to return NULL in this case, so path_search can
+ know to do a disk search. */
+ for (e = 0; !relevant && e < STR_LIST_LENGTH (kpse->db_dir_list); e++) {
+ relevant = elt_in_db (STR_LIST_ELT (kpse->db_dir_list, e), path_elt);
+ }
+ if (!relevant)
+ return NULL;
+
+ /* If we have aliases for this name, use them. */
+ if (kpse->alias_db.buckets)
+ aliases = hash_lookup (kpse->alias_db, name);
+ else
+ aliases = NULL;
+
+ if (!aliases) {
+ aliases = XTALLOC1 (const_string);
+ aliases[0] = NULL;
+ }
+ { /* Push aliases up by one and insert the original name at the front. */
+ unsigned i;
+ unsigned len = 1; /* Have NULL element already allocated. */
+ for (r = aliases; *r; r++)
+ len++;
+ /* This is essentially
+ XRETALLOC (aliases, len + 1, const_string);
+ except that MSVC warns without the cast to `void *'. */
+ aliases = (const_string *) xrealloc ((void *) aliases,
+ (len + 1) * sizeof(const_string));
+ for (i = len; i > 0; i--) {
+ aliases[i] = aliases[i - 1];
+ }
+ aliases[0] = name;
+ }
+
+ done = false;
+ for (r = aliases; !done && *r; r++) {
+ const_string ctry = *r;
+
+ /* We have an ls-R db. Look up `try'. */
+ orig_dirs = db_dirs = hash_lookup (kpse->db, ctry);
+
+ ret = XTALLOC1 (str_list_type);
+ *ret = str_list_init ();
+
+ /* For each filename found, see if it matches the path element. For
+ example, if we have .../cx/cmr10.300pk and .../ricoh/cmr10.300pk,
+ and the path looks like .../cx, we don't want the ricoh file. */
+ while (!done && db_dirs && *db_dirs) {
+ string db_file = concat (*db_dirs, ctry);
+ boolean matched = match (db_file, path_elt);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ DEBUGF3 ("db:match(%s,%s) = %d\n", db_file, path_elt, matched);
+#endif
+
+ /* We got a hit in the database. Now see if the file actually
+ exists, possibly under an alias. */
+ if (matched) {
+ string found = NULL;
+ if (kpathsea_readable_file (kpse, db_file)) {
+ found = db_file;
+
+ } else {
+ const_string *a;
+
+ free (db_file); /* `db_file' wasn't on disk. */
+
+ /* The hit in the DB doesn't exist in disk. Now try all its
+ aliases. For example, suppose we have a hierarchy on CD,
+ thus `mf.bas', but ls-R contains `mf.base'. Find it anyway.
+ Could probably work around this with aliases, but
+ this is pretty easy and shouldn't hurt. The upshot is that
+ if one of the aliases actually exists, we use that. */
+ for (a = aliases + 1; *a && !found; a++) {
+ string atry = concat (*db_dirs, *a);
+ if (kpathsea_readable_file (kpse, atry))
+ found = atry;
+ else
+ free (atry);
+ }
+ }
+
+ /* If we have a real file, add it to the list, maybe done. */
+ if (found) {
+ str_list_add (ret, found);
+ if (!all && found)
+ done = true;
+ }
+ } else { /* no match in the db */
+ free (db_file);
+ }
+
+
+ /* On to the next directory, if any. */
+ db_dirs++;
+ }
+
+ /* This is just the space for the pointers, not the strings. */
+ if (orig_dirs && *orig_dirs)
+ free (orig_dirs);
+ }
+
+ free ((void *) aliases);
+
+ /* If we had to break up NAME, free the TEMP_STR. */
+ if (temp_str)
+ free (temp_str);
+
+ return ret;
+}
+
+str_list_type *
+kpathsea_db_search_list (kpathsea kpse, string* names,
+ const_string path_elt, boolean all)
+{
+ const_string *db_dirs, *orig_dirs;
+ const_string last_slash, name, path;
+ string temp_str = NULL;
+ boolean done;
+ unsigned e;
+ const_string *aliases, *r;
+ int n;
+ str_list_type *ret = NULL;
+ boolean relevant = false;
+
+ /* If we failed to build the database (or if this is the recursive
+ call to build the db path), quit. */
+ if (kpse->db.buckets == NULL)
+ return NULL;
+
+ /* Don't bother doing any lookups if this `path_elt' isn't covered by
+ any of database directories. We do this not so much because the
+ extra couple of hash lookups matter -- they don't -- but rather
+ because we want to return NULL in this case, so path_search can
+ know to do a disk search. */
+ for (e = 0; !relevant && e < STR_LIST_LENGTH (kpse->db_dir_list); e++) {
+ relevant = elt_in_db (STR_LIST_ELT (kpse->db_dir_list, e), path_elt);
+ }
+ if (!relevant)
+ return NULL;
+
+ done = false;
+ ret = XTALLOC1 (str_list_type);
+ *ret = str_list_init ();
+
+ /* Handle each name. */
+ for (n = 0; !done && names[n]; n++) {
+ name = names[n];
+
+ /* Absolute names should have been caught in our caller. */
+ if (kpathsea_absolute_p(kpse, name, true))
+ continue;
+
+ /* When tex-glyph.c calls us looking for, e.g., dpi600/cmr10.pk, we
+ won't find it unless we change NAME to just `cmr10.pk' and append
+ `/dpi600' to PATH_ELT. We are justified in using a literal `/'
+ here, since that's what tex-glyph.c unconditionally uses in
+ DPI_BITMAP_SPEC. But don't do anything if the / begins NAME; that
+ should never happen. */
+ last_slash = strrchr (name, '/');
+ if (last_slash && last_slash != name) {
+ unsigned len = last_slash - name + 1;
+ string dir_part = (string)xmalloc (len);
+ strncpy (dir_part, name, len - 1);
+ dir_part[len - 1] = 0;
+ path = temp_str = concat3 (path_elt, "/", dir_part);
+ name = last_slash + 1;
+ free (dir_part);
+ } else {
+ path = path_elt;
+ }
+
+ /* If we have aliases for this name, use them. */
+ if (kpse->alias_db.buckets)
+ aliases = hash_lookup (kpse->alias_db, name);
+ else
+ aliases = NULL;
+
+ if (!aliases) {
+ aliases = XTALLOC1 (const_string);
+ aliases[0] = NULL;
+ }
+ { /* Push aliases up by one and insert the original name at front. */
+ unsigned i;
+ unsigned len = 1; /* Have NULL element already allocated. */
+ for (r = aliases; *r; r++)
+ len++;
+ aliases = (const_string *) xrealloc ((void *) aliases,
+ (len + 1) * sizeof(const_string));
+ for (i = len; i > 0; i--) {
+ aliases[i] = aliases[i - 1];
+ }
+ aliases[0] = name;
+ }
+
+ for (r = aliases; !done && *r; r++) {
+ const_string ctry = *r;
+
+ /* We have an ls-R db. Look up `try'. */
+ orig_dirs = db_dirs = hash_lookup (kpse->db, ctry);
+
+ /* For each filename found, see if it matches the path element. For
+ example, if we have .../cx/cmr10.300pk and .../ricoh/cmr10.300pk,
+ and the path looks like .../cx, we don't want the ricoh file. */
+ while (!done && db_dirs && *db_dirs) {
+ string db_file = concat (*db_dirs, ctry);
+ boolean matched = match (db_file, path);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ DEBUGF3 ("db:match(%s,%s) = %d\n", db_file, path, matched);
+#endif
+
+ /* We got a hit in the database. Now see if the file actually
+ exists, possibly under an alias. */
+ if (matched) {
+ string found = NULL;
+ if (kpathsea_readable_file (kpse, db_file)) {
+ found = db_file;
+
+ } else {
+ const_string *a;
+
+ free (db_file); /* `db_file' wasn't on disk. */
+
+ /* The hit in the DB doesn't exist in disk. Now try all its
+ aliases. For example, suppose we have a hierarchy on CD,
+ thus `mf.bas', but ls-R contains `mf.base'. Find it anyway.
+ Could probably work around this with aliases, but
+ this is pretty easy and shouldn't hurt. The upshot is that
+ if one of the aliases actually exists, we use that. */
+ for (a = aliases + 1; *a && !found; a++) {
+ string atry = concat (*db_dirs, *a);
+ if (kpathsea_readable_file (kpse, atry))
+ found = atry;
+ else
+ free (atry);
+ }
+ }
+
+ /* If we have a real file, add it to the list, maybe done. */
+ if (found) {
+ str_list_add (ret, found);
+ if (!all)
+ done = true;
+ }
+ } else { /* no match in the db */
+ free (db_file);
+ }
+
+ /* On to the next directory, if any. */
+ db_dirs++;
+ }
+
+ /* This is just the space for the pointers, not the strings. */
+ if (orig_dirs && *orig_dirs)
+ free (orig_dirs);
+ }
+
+ free ((void *) aliases);
+ if (temp_str)
+ free (temp_str);
+ }
+
+ return ret;
+}
diff --git a/Build/source/texk/kpathsea/db.h b/Build/source/texk/kpathsea/db.h
new file mode 100644
index 00000000000..b77b1f04b0c
--- /dev/null
+++ b/Build/source/texk/kpathsea/db.h
@@ -0,0 +1,53 @@
+/* db.h: lookups in an externally built db file.
+
+ Copyright 1994, 1995, 2008, 2010, 2011 Karl Berry.
+ Copyright 1999, 2003, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_DB_H
+#define KPATHSEA_DB_H
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+#include <kpathsea/str-list.h>
+
+/* Initialize the database. Until this is called, no ls-R matches will
+ be found. */
+extern void kpathsea_init_db (kpathsea kpse);
+
+/* Return list of matches for NAME in the ls-R file matching PATH_ELT. If
+ ALL is set, return (null-terminated list) of all matches, else just
+ the first. If no matches, return a pointer to an empty list. If no
+ databases can be read, or PATH_ELT is not in any of the databases,
+ return NULL. */
+
+extern str_list_type *kpathsea_db_search (kpathsea kpse, const_string name,
+ const_string path_elt, boolean all);
+
+/* Note: NAMES[i] is not modified. */
+extern str_list_type *kpathsea_db_search_list (kpathsea kpse,
+ string* names,
+ const_string path_elt,
+ boolean all);
+
+/* Insert the filename FNAME into the database.
+ Called by mktex() in tex-make.c. */
+extern void kpathsea_db_insert (kpathsea kpse, const_string fname);
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not KPATHSEA_DB_H */
diff --git a/Build/source/texk/kpathsea/debug.c b/Build/source/texk/kpathsea/debug.c
new file mode 100644
index 00000000000..0bcd62495ac
--- /dev/null
+++ b/Build/source/texk/kpathsea/debug.c
@@ -0,0 +1,59 @@
+/* debug.c: help the user discover what's going on.
+
+ Copyright 1993, 1994, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#ifdef KPSE_DEBUG /* whole file */
+
+/* If the real definitions of fopen or fclose are macros, we lose -- the
+ #undef won't restore them. */
+
+FILE *
+fopen (const char *filename, const char *mode)
+{
+#undef fopen
+ FILE *ret = fopen (filename, mode);
+#if defined (KPSE_COMPAT_API)
+ kpathsea kpse = kpse_def;
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN))
+#if defined(_WIN64)
+ DEBUGF3 ("fopen(%s, %s) => 0x%I64x\n", filename, mode, (unsigned __int64) ret);
+#else
+ DEBUGF3 ("fopen(%s, %s) => 0x%lx\n", filename, mode, (unsigned long) ret);
+#endif
+#endif
+ return ret;
+}
+
+int
+fclose (FILE * f)
+{
+#undef fclose
+ int ret = fclose (f);
+#if defined (KPSE_COMPAT_API)
+ kpathsea kpse = kpse_def;
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN))
+#if defined(_WIN64)
+ DEBUGF2 ("fclose(0x%I64x) => %d\n", (unsigned __int64) f, ret);
+#else
+ DEBUGF2 ("fclose(0x%lx) => %d\n", (unsigned long) f, ret);
+#endif
+#endif
+ return ret;
+}
+
+#endif /* KPSE DEBUG */
diff --git a/Build/source/texk/kpathsea/debug.h b/Build/source/texk/kpathsea/debug.h
new file mode 100644
index 00000000000..38c54e4b270
--- /dev/null
+++ b/Build/source/texk/kpathsea/debug.h
@@ -0,0 +1,109 @@
+/* debug.h: runtime tracing.
+
+ Copyright 1993, 1994, 1995, 1996, 2008 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_DEBUG_H
+#define KPATHSEA_DEBUG_H
+
+/* If NO_DEBUG is defined (not recommended), skip all this. */
+#ifndef NO_DEBUG
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/c-std.h>
+#include <kpathsea/types.h>
+
+#if defined(WIN32)
+#if defined(_DEBUG)
+/* This was needed at some time for catching errors in pdftex. */
+#include <crtdbg.h>
+#define SET_CRT_DEBUG_FIELD(a) \
+ _CrtSetDbgFlag((a) | _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
+#define CLEAR_CRT_DEBUG_FIELD(a) \
+ _CrtSetDbgFlag(~(a) & _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG))
+#define SETUP_CRTDBG \
+ { _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); \
+ _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT ); \
+ _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); \
+ _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT ); \
+ _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); \
+ _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );\
+ }
+#else /* ! _DEBUG */
+#define SET_CRT_DEBUG_FIELD(a)
+#define CLEAR_CRT_DEBUG_FIELD(a)
+#define SETUP_CRTDBG
+#endif /* _DEBUG */
+#endif /* WIN32 */
+
+/* OK, we'll have tracing support. */
+#define KPSE_DEBUG
+
+/* Test if a bit is on. */
+#define KPATHSEA_DEBUG_P(bit) (kpse->debug & (1 << (bit)))
+
+#if defined (KPSE_COMPAT_API)
+
+/* Set a bit. */
+#define KPSE_DEBUG_SET(bit) kpathsea_debug |= 1 << (bit)
+
+/* Test if a bit is on. */
+#define KPSE_DEBUG_P(bit) (kpathsea_debug & (1 << (bit)))
+
+#endif /* KPSE_COMPAT_API */
+
+#define KPSE_DEBUG_STAT 0 /* stat calls */
+#define KPSE_DEBUG_HASH 1 /* hash lookups */
+#define KPSE_DEBUG_FOPEN 2 /* fopen/fclose calls */
+#define KPSE_DEBUG_PATHS 3 /* search path initializations */
+#define KPSE_DEBUG_EXPAND 4 /* path element expansion */
+#define KPSE_DEBUG_SEARCH 5 /* searches */
+#define KPSE_DEBUG_VARS 6 /* variable values */
+#define KPSE_LAST_DEBUG KPSE_DEBUG_VARS
+
+/* A printf for the debugging. */
+#define DEBUGF_START() do { fputs ("kdebug:", stderr)
+#define DEBUGF_END() fflush (stderr); } while (0)
+
+#define DEBUGF(str) \
+ DEBUGF_START (); fputs (str, stderr); DEBUGF_END ()
+#define DEBUGF1(str, e1) \
+ DEBUGF_START (); fprintf (stderr, str, e1); DEBUGF_END ()
+#define DEBUGF2(str, e1, e2) \
+ DEBUGF_START (); fprintf (stderr, str, e1, e2); DEBUGF_END ()
+#define DEBUGF3(str, e1, e2, e3) \
+ DEBUGF_START (); fprintf (stderr, str, e1, e2, e3); DEBUGF_END ()
+#define DEBUGF4(str, e1, e2, e3, e4) \
+ DEBUGF_START (); fprintf (stderr, str, e1, e2, e3, e4); DEBUGF_END ()
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#undef fopen
+#define fopen kpse_fopen_trace
+extern KPSEDLL FILE *fopen (const char *filename, const char *mode);
+#undef fclose
+#define fclose kpse_fclose_trace
+extern KPSEDLL int fclose (FILE *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not NO_DEBUG */
+
+#endif /* not KPATHSEA_DEBUG_H */
diff --git a/Build/source/texk/kpathsea/default.h b/Build/source/texk/kpathsea/default.h
new file mode 100644
index 00000000000..50fc1fc7c45
--- /dev/null
+++ b/Build/source/texk/kpathsea/default.h
@@ -0,0 +1,37 @@
+/* default.h: declare default path expander.
+
+ Copyright 1993, 1994, 2008, 2011, 2017 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_DEFAULT_H
+#define KPATHSEA_DEFAULT_H
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+#include <kpathsea/types.h>
+#include <kpathsea/c-proto.h>
+
+
+/* Replace a leading or trailing or doubled : in PATH with DFLT. If
+ no extra colons, return PATH. Only one extra colon is replaced.
+ If PATH is NULL or the empty string, DFLT is returned.
+ DFLT may not be NULL. The result is always in new memory. */
+
+extern string kpathsea_expand_default (kpathsea kpse, const_string path,
+ const_string dflt);
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not KPATHSEA_DEFAULT_H */
diff --git a/Build/source/texk/kpathsea/dir.c b/Build/source/texk/kpathsea/dir.c
new file mode 100644
index 00000000000..f2b4eaf3fb1
--- /dev/null
+++ b/Build/source/texk/kpathsea/dir.c
@@ -0,0 +1,146 @@
+/* dir.c: directory operations.
+
+ Copyright 1992, 1993, 1994, 1995, 2008-2012 Karl Berry.
+ Copyright 2000, 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-dir.h>
+#include <kpathsea/c-stat.h>
+#include <kpathsea/hash.h>
+#include <kpathsea/pathsearch.h>
+
+/* Return true if FN is a directory or a symlink to a directory,
+ false if not. */
+
+boolean
+kpathsea_dir_p (kpathsea kpse, string fn)
+{
+ /* FIXME : using the stat() replacement in gnuw32,
+ we could avoid this win32 specific code. However,
+ I wonder if it would be as fast as this one is ?
+ */
+#ifdef WIN32
+ int fa;
+
+ kpathsea_normalize_path(kpse, fn);
+ fa = GetFileAttributes(fn);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_STAT)) {
+ if (fa == 0xFFFFFFFF) {
+ fprintf(stderr, "failed to get file attributes for %s (%d)\n",
+ fn, (int)(GetLastError()));
+ } else {
+ fprintf(stderr, "path %s %s a directory\n",
+ fn , (fa & FILE_ATTRIBUTE_DIRECTORY) ?
+ "is" : "is not");
+ }
+ }
+#endif /* KPSE_DEBUG */
+ return (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY));
+#else /* !WIN32 */
+ struct stat stats;
+ return stat (fn, &stats) == 0 && S_ISDIR (stats.st_mode);
+#endif /* !WIN32 */
+}
+
+#if defined(KPSE_COMPAT_API)
+boolean
+dir_p (string fn)
+{
+ return kpathsea_dir_p (kpse_def, fn);
+}
+#endif
+
+
+/*
+ Return -1 if FN isn't a directory, else its number of links.
+ Duplicate the call to stat; no need to incur overhead of a function
+ call for that little bit of cleanliness.
+
+ The process is a bit different under Win32 : the first call
+ memoizes the nlinks value, the following ones retrieve it.
+*/
+int
+kpathsea_dir_links (kpathsea kpse, const_string fn, long nlinks)
+{
+ const_string *hash_ret;
+
+ if (kpse->link_table.size == 0)
+ kpse->link_table = hash_create (457);
+
+#ifdef KPSE_DEBUG
+ /* This is annoying, but since we're storing integers as pointers, we
+ can't print them as strings. */
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH))
+ kpse->debug_hash_lookup_int = true;
+#endif
+
+ hash_ret = hash_lookup (kpse->link_table, fn);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH))
+ kpse->debug_hash_lookup_int = false;
+#endif
+
+ /* Have to cast the int we need to/from the const_string that the hash
+ table stores for values. Let's hope an int fits in a pointer. */
+ if (hash_ret) {
+#ifdef WIN32
+ memcpy(&nlinks, hash_ret, sizeof(nlinks));
+#else
+ nlinks = (long) *hash_ret;
+#endif
+ } else {
+#ifdef WIN32
+ /* Insert it only if we have some informations about it. */
+ if (nlinks) {
+ char str_nlinks[sizeof(nlinks)+1];
+ memcpy(str_nlinks, (char *)&nlinks, sizeof(nlinks));
+ str_nlinks[sizeof(nlinks)] = '\0';
+ /* It's up to us to copy the value. */
+ hash_insert(&(kpse->link_table), xstrdup (fn),
+ (const_string) str_nlinks);
+ }
+#else
+ struct stat stats;
+ if (stat (fn, &stats) == 0 && S_ISDIR (stats.st_mode))
+ nlinks = stats.st_nlink;
+ else
+ nlinks = -1;
+ /* It's up to us to copy the value. */
+ hash_insert(&(kpse->link_table), xstrdup(fn), (const_string)nlinks);
+#endif
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_STAT))
+ DEBUGF2 ("dir_links(%s) => %ld\n", fn, nlinks);
+#endif
+ }
+
+ /* In any case, return nlinks
+ (either 0, the value inserted or the value retrieved. */
+ return nlinks;
+}
+
+#if defined (KPSE_COMPAT_API)
+int
+dir_links (const_string fn, long nlinks)
+{
+ return kpathsea_dir_links (kpse_def, fn, nlinks);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/doc/Makefile.am b/Build/source/texk/kpathsea/doc/Makefile.am
new file mode 100644
index 00000000000..92191e57c16
--- /dev/null
+++ b/Build/source/texk/kpathsea/doc/Makefile.am
@@ -0,0 +1,8 @@
+## Makefile.am for the TeX Live subdirectory texk/kpathsea/doc/
+##
+## Copyright (C) 2009-2014 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+info_TEXINFOS = kpathsea.texi
+kpathsea_TEXINFOS = unixtex.texi
+
diff --git a/Build/source/texk/kpathsea/doc/Makefile.in b/Build/source/texk/kpathsea/doc/Makefile.in
new file mode 100644
index 00000000000..3edd0ef5944
--- /dev/null
+++ b/Build/source/texk/kpathsea/doc/Makefile.in
@@ -0,0 +1,769 @@
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2020 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@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \
+ $(top_srcdir)/../../m4/kpse-lib-version.m4 \
+ $(top_srcdir)/../../m4/kpse-mktex.m4 \
+ $(top_srcdir)/../../m4/kpse-warnings.m4 \
+ $(top_srcdir)/../../m4/kpse-win32.m4 \
+ $(top_srcdir)/../../m4/libtool.m4 \
+ $(top_srcdir)/../../m4/ltoptions.m4 \
+ $(top_srcdir)/../../m4/ltsugar.m4 \
+ $(top_srcdir)/../../m4/ltversion.m4 \
+ $(top_srcdir)/../../m4/lt~obsolete.m4 $(top_srcdir)/version.ac \
+ $(top_srcdir)/../../version.ac $(top_srcdir)/ac/mktex.ac \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/c-auto.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
+am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
+am__v_DVIPS_0 = @echo " DVIPS " $@;
+am__v_DVIPS_1 =
+AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
+am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
+am__v_MAKEINFO_1 =
+AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
+am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
+am__v_INFOHTML_0 = @echo " INFOHTML" $@;
+am__v_INFOHTML_1 =
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
+am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
+am__v_TEXI2DVI_1 =
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
+am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
+am__v_TEXI2PDF_1 =
+AM_V_texinfo = $(am__v_texinfo_@AM_V@)
+am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
+am__v_texinfo_0 = -q
+am__v_texinfo_1 =
+AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
+am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
+am__v_texidevnull_0 = > /dev/null
+am__v_texidevnull_1 =
+INFO_DEPS = $(srcdir)/kpathsea.info
+TEXINFO_TEX = $(top_srcdir)/../../build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/../../build-aux
+DVIS = kpathsea.dvi
+PDFS = kpathsea.pdf
+PSS = kpathsea.ps
+HTMLS = kpathsea.html
+TEXINFOS = kpathsea.texi
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__installdirs = "$(DESTDIR)$(infodir)"
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(kpathsea_TEXINFOS) $(srcdir)/Makefile.in \
+ $(top_srcdir)/../../build-aux/texinfo.tex
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KPSEVERSION = @KPSEVERSION@
+KPSE_LT_VERSINFO = @KPSE_LT_VERSINFO@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_OBJDIR = @LT_OBJDIR@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+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@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WEB2CVERSION = @WEB2CVERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+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@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+info_TEXINFOS = kpathsea.texi
+kpathsea_TEXINFOS = unixtex.texi
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .dvi .html .info .pdf .ps .texi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 doc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign doc/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
+
+.texi.info:
+ $(AM_V_MAKEINFO)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
+
+.texi.dvi:
+ $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
+ $<
+
+.texi.pdf:
+ $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
+ $<
+
+.texi.html:
+ $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+ $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@ && mv $(@:.html=.htp) $@; \
+ else \
+ rm -rf $(@:.html=.htp); exit 1; \
+ fi
+$(srcdir)/kpathsea.info: kpathsea.texi $(kpathsea_TEXINFOS)
+kpathsea.dvi: kpathsea.texi $(kpathsea_TEXINFOS)
+kpathsea.pdf: kpathsea.texi $(kpathsea_TEXINFOS)
+kpathsea.html: kpathsea.texi $(kpathsea_TEXINFOS)
+.dvi.ps:
+ $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) $(AM_V_texinfo) -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)' && $(am__can_run_installinfo); 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 kpathsea.t2d kpathsea.t2p
+
+clean-aminfo:
+ -test -z "kpathsea.dvi kpathsea.pdf kpathsea.ps kpathsea.html" \
+ || rm -rf kpathsea.dvi kpathsea.pdf kpathsea.ps kpathsea.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
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-info
+check-am: all-am
+check: check-am
+all-am: Makefile $(INFO_DEPS)
+installdirs:
+ for dir in "$(DESTDIR)$(infodir)"; 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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+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."
+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
+
+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-dvi: install-dvi-am
+
+install-dvi-am: $(DVIS)
+ @$(NORMAL_INSTALL)
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+ fi; \
+ 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)
+ @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ $(am__strip_dir) \
+ d2=$$d$$p; \
+ if test -d "$$d2"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+ else \
+ list2="$$list2 $$d2"; \
+ 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)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+ fi; \
+ 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 $(am__can_run_installinfo); 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-pdf: install-pdf-am
+
+install-pdf-am: $(PDFS)
+ @$(NORMAL_INSTALL)
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+ fi; \
+ 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)
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+ fi; \
+ 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
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am: $(PDFS)
+
+ps: ps-am
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
+ uninstall-pdf-am uninstall-ps-am
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
+ clean-libtool cscopelist-am ctags-am dist-info distclean \
+ distclean-generic distclean-libtool 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 maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
+ pdf-am ps ps-am tags-am uninstall uninstall-am \
+ uninstall-dvi-am uninstall-html-am uninstall-info-am \
+ uninstall-pdf-am uninstall-ps-am
+
+.PRECIOUS: Makefile
+
+
+# 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/Build/source/texk/kpathsea/doc/kpathsea.info b/Build/source/texk/kpathsea/doc/kpathsea.info
new file mode 100644
index 00000000000..66b0a4e2f90
--- /dev/null
+++ b/Build/source/texk/kpathsea/doc/kpathsea.info
@@ -0,0 +1,4017 @@
+This is kpathsea.info, produced by makeinfo version 5.1 from
+kpathsea.texi.
+
+This file documents the Kpathsea library for path searching.
+
+ Copyright (C) 1996-2021 Karl Berry & Olaf Weber.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the TeX Users Group.
+INFO-DIR-SECTION TeX
+START-INFO-DIR-ENTRY
+* Kpathsea: (kpathsea). File lookup along search paths.
+* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching.
+* mktexfmt: (kpathsea)mktex scripts. Format (fmt/base/mem) generation.
+* mktexlsr: (kpathsea)Filename database. Update ls-R.
+* mktexmf: (kpathsea)mktex scripts. MF source generation.
+* mktexpk: (kpathsea)mktex scripts. PK bitmap generation.
+* mktextex: (kpathsea)mktex scripts. TeX source generation.
+* mktextfm: (kpathsea)mktex scripts. TeX font metric generation.
+END-INFO-DIR-ENTRY
+
+
+File: kpathsea.info, Node: Top, Next: Introduction, Up: (dir)
+
+Kpathsea library
+****************
+
+This manual documents the Kpathsea library for path searching. It
+corresponds to version 6.3.3, released in February 2021.
+
+* Menu:
+
+* Introduction:: Overview and history.
+
+* unixtex.ftp:: Obtaining TeX software.
+* Security:: Who can write what files, etc.
+* TeX directory structure:: Managing the horde of TeX input files.
+
+* Path searching:: How filename lookups work.
+* TeX support:: Special support for TeX-related file lookups.
+
+* Programming:: How to use Kpathsea features in your program.
+
+* Reporting bugs:: Where and how to report bugs.
+* Index:: General index.
+
+
+File: kpathsea.info, Node: Introduction, Next: unixtex.ftp, Prev: Top, Up: Top
+
+1 Introduction
+**************
+
+This manual corresponds to version 6.3.3 of the Kpathsea library,
+released in February 2021.
+
+ The library's fundamental purpose is to return a filename from a list
+of directories specified by the user, similar to what shells do when
+looking up program names to execute.
+
+ The following software, all of which is maintained in parallel, uses
+this library:
+
+ * Dviljk (see the 'dvilj' man page)
+ * Dvipsk (*note (dvips)::)
+ * GNU font utilities (*note (fontu)::)
+ * Web2c (*note (web2c)::)
+ * Xdvik (see the 'xdvi' man page)
+
+Other software that we do not maintain also uses it.
+
+ Kpathsea is now maintained as part of the TeX Live distribution
+(<https://tug.org/texlive>), which includes several more Kpathsea-using
+programs. For information on configuration, building, installing, and
+more, *note (tlbuild)::.
+
+ The library is still actively maintained. If you have comments or
+suggestions, please send along (*note Reporting bugs::).
+
+ The Kpathsea library is distributed under the GNU Library General
+Public License (LGPL), version 2.1 or (at your option) any later
+version. In short, this means if you write a program using the library,
+you must (offer to) distribute the source to the library, along with any
+changes you have made, and allow anyone to modify the library source and
+distribute their modifications. It does not mean you have to distribute
+the source to your program using the library, although we hope you will.
+See accompanying files for the text of the GNU licenses, or
+<https://gnu.org/licenses>.
+
+ If you know enough about TeX to be reading this manual, then you (or
+your institution) should consider joining the TeX Users Group (if you're
+already a member, thanks!). TUG produces the periodical 'TUGboat',
+sponsors an annual meeting and publishes the proceedings, and arranges
+courses on TeX for all levels of users throughout the world. See
+<https://tug.org> for information.
+
+* Menu:
+
+* History::
+
+
+File: kpathsea.info, Node: History, Up: Introduction
+
+1.1 History
+===========
+
+This section is for those people who are curious about how the library
+came about. If you like to read historical accounts of software, we
+urge you to seek out the GNU Autoconf manual and the "Errors of TeX"
+paper by Don Knuth, published in his book 'Digital Typography', among
+other places.
+
+ [Karl writes.] My first ChangeLog entry for Web2c seems to be
+February 1990, but I may have done some work before then. In any case,
+Tim Morgan and I were jointly maintaining it for a time. (I should
+mention here that Tim had made Web2c into a real distribution long
+before I had ever used it or even heard of it, and Tom Rokicki did the
+original implementation. When I started, I was using 'pxp' and 'pc' on
+VAX 11/750's and the hot new Sun 2 machines.)
+
+ It must have been later in 1990 and 1991 that I started working on
+'TeX for the Impatient'. Dvips, Xdvi, Web2c, and the GNU fontutils
+(which I was also writing at the time) all used different environment
+variables, and, more importantly, had different bugs in their path
+searching. This became extremely painful, as I was stressing everything
+to the limit working on the book. I also desperately wanted to
+implement subdirectory searching, since I couldn't stand putting
+everything in one big directory, and also couldn't stand having to
+explicitly specify 'cm', 'pandora', ... in a path.
+
+ In the first incarnation, I just hacked separately on each
+program--that was the original subdirectory searching code in both Xdvi
+and Dvips. That is, I tried to go with the flow in each program, rather
+than changing the program's calling sequences to conform to new
+routines.
+
+ Then, as bugs inevitably appeared, I found I was fixing the same
+thing three times (Web2c and fontutils were already sharing code, since
+I maintained both of those--there was no Dvipsk or Xdvik or Dviljk at
+this point). After a while, I finally started sharing source files.
+They weren't yet a library, though. I just kept things up to date with
+shell scripts. (I was developing on a 386 running ISC 2.2 at the time,
+and so didn't have symbolic links. An awful experience.)
+
+ The ChangeLogs for Xdvik and Dvipsk record initial releases of those
+distributions in May and June 1992. I think it was because I was tired
+of the different configuration strategies of each program, not so much
+because of the path searching. Autoconf was being developed by David
+MacKenzie and others, and I was adapting it to TeX and friends.
+
+ I started to make a separate library that other programs could link
+with on my birthday in April 1993, according to the ChangeLog. I don't
+remember exactly why I finally took the time to make it a separate
+library; a conversation with david zuhn initiated it. Just seemed like
+it was time.
+
+ Dviljk got started in March 1994 after I bought a Laserjet 4.
+(Kpathsea work got suspended while Norm Walsh and I, with Gustaf
+Neumann's help, implemented a way for TeX to get at all those neat
+builtin LJ4 fonts ... such a treat to have something to typeset in
+besides Palatino!)
+
+ By spring of 1995, I had implemented just about all the
+path-searching features in Kpathsea that I plan to, driven beyond my
+initial goals by Thomas Esser and others. I then started to integrate
+Web2c with Kpathsea. After the release of a stable Web2c, I hope to be
+able to stop development, and turn most of my attention back to making
+fonts for GNU. (Always assuming Micros**t hasn't completely obliterated
+Unix by then, or that software patents haven't stopped software
+development by anybody smaller than a company with a
+million-dollar-a-year legal budget. Which is actually what I think is
+likely to happen, but that's another story...)
+
+ [Olaf writes.] At the end of 1997, Unix is still alive and kicking,
+individuals still develop software, and Web2c development still
+continues. Karl had been looking for some time for someone to take up
+part of the burden, and I volunteered.
+
+ [Karl writes again.] Indeed, time goes on. As of 2006 or so, Olaf's
+available time for Kpathsea was reduced, and I started taking overall
+care of it again, although I did not do any significant new development.
+In 2009, Taco Hoekwater implemented a major rearrangement to make the
+library suitable for use within the MetaPost library (*note Programming
+overview::). Also, for some years now, Peter Breitenlohner has made
+many improvements to the infrastructure and kept it up-to-date with
+respect to the overall TeX Live build, where Kpathsea is now maintained.
+
+
+File: kpathsea.info, Node: unixtex.ftp, Next: Security, Prev: Introduction, Up: Top
+
+2 'unixtex.ftp': Obtaining TeX
+******************************
+
+This is <ftp://tug.org/tex/unixtex.ftp>, a.k.a.
+<https://tug.org/unixtex.ftp>, last updated 29 February 2020. Email
+<tex-k@tug.org> with comments or questions.
+
+ The principal free TeX distribution for Unix-like systems is TeX
+Live, on the web at <http://tug.org/texlive>. The pages there describe
+many ways to acquire and/or build TeX, over the Internet or on physical
+media, both the sources and precompiled binaries for many systems,
+either standalone or as part of various operating system distributions.
+
+ Web2c, Kpathsea, Dvips, and Dviljk, among others, are no longer
+released as a separate packages. Their sources are now maintained as
+part of TeX Live.
+
+ The host ftp.cs.stanford.edu is the original source for the files for
+which Donald Knuth is directly responsible: 'tex.web', 'plain.tex', etc.
+However, unless you want to undertake the project of building your TeX
+system from scratch, it is more reliable and less work to retrieve these
+files as part of a larger package.
+
+ In any case, the Stanford ftp site is not the canonical source for
+anything except what was created as part of Knuth's original TeX, so do
+not rely on any other files available there being up-to-date. The best
+place to check for up-to-date files is CTAN (the Comprehensive TeX
+Archive Network), <https://ctan.org>.
+
+
+File: kpathsea.info, Node: Security, Next: TeX directory structure, Prev: unixtex.ftp, Up: Top
+
+3 Security
+**********
+
+None of the programs in the TeX system require any special system
+privileges, so there's no first-level security concern of people gaining
+illegitimate root access.
+
+ A TeX document, however, can write to arbitrary files, e.g.,
+'~/.rhosts', and thus an unwitting user who runs TeX on a random
+document is vulnerable to a trojan horse attack. This loophole is
+closed by default, but you can be permissive if you so desire in
+'texmf.cnf'. *Note (web2c)tex invocation::. MetaPost has the same
+issue.
+
+ Dvips, Xdvi, and TeX can also execute shell commands under some
+circumstances. To disable this, see the '-R' option in *note
+(dvips)Option details::, the xdvi man page, and *note (web2c)tex
+invocation::, respectively.
+
+ Another security issue arises because it's very useful--almost
+necessary--to make arbitrary fonts on user demand with 'mktexpk' and
+friends. Where do these files get installed? By default, the 'mktexpk'
+distributed with Kpathsea assumes a world-writable '/var/tmp' directory;
+this is a simple and convenient approach, but it may not suit your
+situation because it means that a local cache of fonts is created on
+every machine.
+
+ To avoid this duplication, many people consider a shared, globally
+writable font tree desirable, in spite of the potential security
+problems. To do this you should change the value of 'VARTEXFONTS' in
+'texmf.cnf' to refer to some globally known directory. *Note mktex
+configuration::.
+
+ The first restriction you can apply is to make newly-created
+directories under 'texmf' be append-only with an option in 'mktex.cnf'.
+*Note mktex configuration::.
+
+ Another approach is to establish a group (or user) for TeX files,
+make the 'texmf' tree writable only to that group (or user), and make
+'mktexpk' et al. setgid to that group (or setuid to that user). Then
+users must invoke the scripts to install things. (If you're worried
+about the inevitable security holes in scripts, then you could write a C
+wrapper to exec the script.)
+
+ The 'mktex...' scripts install files with the same read and write
+permissions as the directory they are installed in. The executable,
+sgid, suid, and sticky bits are always cleared.
+
+ Any directories created by the 'mktex...' scripts have the same
+permissions as their parent directory, unless the 'appendonlydir'
+feature is used, in which case the sticky bit is always set.
+
+
+File: kpathsea.info, Node: TeX directory structure, Next: Path searching, Prev: Security, Up: Top
+
+4 TeX directory structure
+*************************
+
+This section describes the default installation hierarchy of the
+distribution. It conforms to both the GNU coding standards and the TeX
+directory structure (TDS) standard. For rationale and further
+explanation, please see those documents. The GNU document is available
+from <https://gnu.org/prep/standards>. The TDS document is available
+from <http://mirror.ctan.org/tds> (*note unixtex.ftp::).
+
+ In short, here is a skeleton of the default directory structure,
+extracted from the TDS document:
+
+ PREFIX/ installation root ('/usr/local' by default)
+ bin/ executables
+ man/ man pages
+ include/ C header files
+ info/ GNU info files
+ lib/ libraries ('libkpathsea.*')
+ share/ architecture-independent files
+ texmf/ TDS root
+ bibtex/ BibTeX input files
+ bib/ BibTeX databases
+ base/ base distribution (e.g., 'xampl.bib')
+ misc/ single-file databases
+ PKG/ name of a package
+ bst/ BibTeX style files
+ base/ base distribution (e.g., 'plain.bst', 'acm.bst')
+ misc/ single-file styles
+ PKG/ name of a package
+ doc/ additional documentation
+ dvips/ '.pro', '.ps', 'psfonts.map'
+ fonts/ font-related files
+ TYPE/ file type (e.g., 'tfm', 'pk')
+ MODE/ type of output device (types 'pk' and 'gf' only)
+ SUPPLIER/ name of a font supplier (e.g., 'public')
+ TYPEFACE/ name of a typeface (e.g., 'cm')
+ dpiNNN/ font resolution (types 'pk' and 'gf' only)
+ metafont/ Metafont (non-font) input files
+ base/ base distribution (e.g., 'plain.mf')
+ misc/ single-file packages (e.g., 'modes.mf')
+ PKG/ name of a package (e.g., 'mfpic')
+ metapost/ MetaPost input files
+ base/ base distribution (e.g., 'plain.mp')
+ misc/ single-file packages
+ PKG/ name of a package
+ support/ support files for MetaPost-related utilities (e.g., 'trfonts.map')
+ mft/ 'MFT' inputs (e.g., 'plain.mft')
+ tex/ TeX input files
+ FORMAT/ name of a format (e.g., 'plain')
+ base/ base distribution for FORMAT (e.g., 'plain.tex')
+ misc/ single-file packages (e.g., 'webmac.tex')
+ local/ local additions to or local configuration files for FORMAT
+ PKG/ name of a package (e.g., 'graphics', 'mfnfss')
+ generic/ format-independent packages
+ hyphen/ hyphenation patterns (e.g., 'hyphen.tex')
+ images/ image input files (e.g., Encapsulated PostScript)
+ misc/ single-file format-independent packages (e.g., 'null.tex').
+ PKG/ name of a package (e.g., 'babel')
+ web2c/ implementation-dependent files ('.pool', '.fmt', 'texmf.cnf', etc.)
+
+ Some concrete examples for most file types:
+
+ /usr/local/bin/tex
+ /usr/local/man/man1/xdvi.1
+ /usr/local/info/kpathsea.info
+ /usr/local/lib/libkpathsea.a
+ /usr/local/share/texmf/bibtex/bst/base/plain.bst
+ /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
+ /usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf
+ /usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm
+ /usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa
+ /usr/local/share/texmf/metafont/base/plain.mf
+ /usr/local/share/texmf/metapost/base/plain.mp
+ /usr/local/share/texmf/tex/plain/base/plain.tex
+ /usr/local/share/texmf/tex/generic/hyphen/hyphen.tex
+ /usr/local/share/texmf/web2c/tex.pool
+ /usr/local/share/texmf/web2c/tex.fmt
+ /usr/local/share/texmf/web2c/texmf.cnf
+
+
+File: kpathsea.info, Node: Path searching, Next: TeX support, Prev: TeX directory structure, Up: Top
+
+5 Path searching
+****************
+
+This chapter describes the generic path searching mechanism Kpathsea
+provides. For information about searching for particular file types
+(e.g., TeX fonts), see the next chapter.
+
+ This section, with minor differences, has been translated into
+several other languages (Chinese, Spanish, Russian, Japanese, French,
+German, ...) as part of the TeX Live guide; see
+<https://tug.org/texlive/doc.html> for links.
+
+* Menu:
+
+* Searching overview:: Basic scheme for searching.
+* Path sources:: Where search paths can be defined.
+* Path expansion:: Special constructs in search paths.
+* Casefolding search:: Fallback to case-insensitive search.
+* Filename database:: Using an externally-built list to search.
+* Invoking kpsewhich:: Standalone path lookup.
+
+
+File: kpathsea.info, Node: Searching overview, Next: Path sources, Up: Path searching
+
+5.1 Searching overview
+======================
+
+A "search path" is a colon-separated list of "path elements", which are
+directory names with a few extra frills. A search path can come from (a
+combination of) many sources; see below. To look up a file 'foo' along
+a path '.:/dir', Kpathsea checks each element of the path in turn: first
+'./foo', then '/dir/foo', returning the first match (or possibly all
+matches).
+
+ The "colon" and "slash" mentioned here aren't necessarily ':' and '/'
+on non-Unix systems. Kpathsea tries to adapt to other operating
+systems' conventions.
+
+ To check a particular path element E, Kpathsea first sees if a
+prebuilt database (*note Filename database::) applies to E, i.e., if the
+database is in a directory that is a prefix of E. If so, the path
+specification is matched against the contents of the database.
+
+ If the database does not exist, or does not apply to this path
+element, or contains no matches, the filesystem is searched (if this was
+not forbidden by the specification with '!!' and if the file being
+searched for must exist). Kpathsea constructs the list of directories
+that correspond to this path element, and then checks in each for the
+file being searched for. (To help speed future lookups of files in the
+same directory, the directory in which a file is found is floated to the
+top of the directory list.)
+
+ The "file must exist" condition comes into play with VF files and
+input files read by the TeX '\openin' command. These files might very
+well not exist (consider 'cmr10.vf'), and so it would be wrong to search
+the disk for them. Therefore, if you fail to update 'ls-R' when you
+install a new VF file, it will not be found.
+
+ Each path element is checked in turn: first the database, then the
+disk. If a match is found, the search stops and the result is returned
+(unless the search explicitly requested all matches). This avoids
+possibly-expensive processing of path specifications that are never
+needed on a particular run.
+
+ On Unix-like systems, if no match is found by any of the above, and
+the path element allows checking the filesystem (per the above), a final
+check is made for a case-insensitive match. Thus, looking for a name
+like './FooBar.TeX' will match a file './foobar.tex', and vice versa.
+This is not done on Windows. *Note Casefolding search::.
+
+ Although the simplest and most common path element is a directory
+name, Kpathsea supports additional features in search paths: layered
+default values, environment variable names, config file values, users'
+home directories, and recursive subdirectory searching. Thus, we say
+that Kpathsea "expands" a path element, meaning transforming all the
+magic specifications into the basic directory name or names. This
+process is described in the sections below. It happens in the same
+order as the sections.
+
+ Exception to all of the above: If the filename being searched for is
+absolute or explicitly relative, i.e., starts with '/' or './' or '../',
+Kpathsea simply checks if that file exists, with a fallback to a
+casefolding match if needed and enabled, as described above.
+
+ Ordinarily, if Kpathsea tries to access a file or directory that
+cannot be read, it gives a warning. This is so you will be alerted to
+directories or files that accidentally lack any read permission (for
+example, a 'lost+found' directory). If you prefer not to see these
+warnings, include the value 'readable' in the 'TEX_HUSH' environment
+variable or config file value.
+
+ This generic path searching algorithm is implemented in
+'kpathsea/pathsearch.c'. It is employed by a higher-level algorithm
+when searching for a file of a particular type (*note File lookup::, and
+*note Glyph lookup::).
+
+
+File: kpathsea.info, Node: Path sources, Next: Path expansion, Prev: Searching overview, Up: Path searching
+
+5.2 Path sources
+================
+
+A search path or other configuration value can come from many sources.
+In the order in which Kpathsea looks for them:
+
+ 1. A command-line option such as '--cnf-line', available in
+ 'kpsewhich' and most TeX engines. *Note Path searching options::.
+
+ A user-set environment variable, e.g., 'TEXINPUTS'. Environment
+ variables with an underscore and the program name appended
+ override; for example, 'TEXINPUTS_latex' overrides 'TEXINPUTS' if
+ the program being run is named 'latex'.
+
+ 2. A program-specific configuration file, e.g., an 'S /a:/b' line in
+ Dvips' 'config.ps' (*note (dvips)Config files::).
+
+ 3. A line in a Kpathsea configuration file 'texmf.cnf', e.g.,
+ 'TEXINPUTS=/c:/d' (see below).
+
+ 4. The compile-time default (specified in 'kpathsea/paths.h').
+
+ You can see each of these values for a given search path by using the
+debugging options (*note Debugging::).
+
+ These sources may be combined via default expansion (*note Default
+expansion::).
+
+* Menu:
+
+* Config files:: Kpathsea's runtime config files (texmf.cnf).
+
+
+File: kpathsea.info, Node: Config files, Up: Path sources
+
+5.2.1 Config files
+------------------
+
+As mentioned above, Kpathsea reads "runtime configuration files" named
+'texmf.cnf' for search path and other definitions. The search path used
+to look for these configuration files is named 'TEXMFCNF', and is
+constructed in the usual way, as described above, except that
+configuration files cannot be used to define the path, naturally; also,
+an 'ls-R' database is not used to search for them.
+
+ Kpathsea reads _all_ 'texmf.cnf' files in the search path, not just
+the first one found; definitions in earlier files override those in
+later files. Thus, if the search path is '.:$TEXMF', values from
+'./texmf.cnf' override those from '$TEXMF/texmf.cnf'.
+
+ If Kpathsea cannot find any 'texmf.cnf' file, it reports a warning
+including all the directories it checked. If you don't want to see this
+warning, set the environment variable 'KPATHSEA_WARNING' to the single
+character '0' (zero, not oh).
+
+ While (or instead of) reading this description, you may find it
+helpful to look at the distributed 'texmf.cnf', which uses or at least
+mentions most features. The format of 'texmf.cnf' files follows:
+
+ * Comments start with '%', either at the beginning of a line or
+ preceded by whitespace, and continue to the end of the line. That
+ is, similar to most shells, a '%' in the "middle" of a value does
+ not start a comment. Examples:
+
+ % this is a comment
+ var = a%b % but the value of var will be "a%b"
+
+ * Blank lines are ignored.
+
+ * A '\' at the end of a line acts as a continuation character, i.e.,
+ the next line is appended. Whitespace at the beginning of
+ continuation lines is not ignored.
+
+ * Each remaining line will look like:
+
+ VARIABLE [. PROGNAME] [=] VALUE
+
+ where the '=' and surrounding whitespace is optional.
+
+ * The VARIABLE name may contain any character other than whitespace,
+ '=', or '.', but sticking to 'A-Za-z_' is safest.
+
+ * If '.PROGNAME' is present (preceding spaces are ignored), the
+ definition only applies if the program that is running is named
+ (i.e., the last component of 'argv[0]' is) PROGNAME or
+ 'PROGNAME.{exe,bat,cmd,...}'. Most notably, this allows different
+ flavors of TeX to have different search paths. The PROGNAME value
+ is used literally, without variable or other expansions.
+
+ * Considered as strings, VALUE may contain any character. However,
+ in practice most 'texmf.cnf' values are related to path expansion,
+ and since various special characters are used in expansion, such as
+ braces and commas, they cannot be used in directory names.
+
+ The '$VAR.PROG' feature is not available on the right-hand side;
+ instead, you must use an additional variable (see below for
+ example).
+
+ A ';' in VALUE is translated to ':' if running under Unix, in order
+ to have a single 'texmf.cnf' that can support both Unix and Windows
+ systems. This translation happens with any value, not just search
+ paths, but fortunately in practice ';' is not needed in other
+ values.
+
+ * All definitions are read before anything is expanded, so you can
+ use variables before they are defined (like Make, unlike most other
+ programs).
+
+Here is a configuration file fragment illustrating most of these points:
+
+ % TeX input files -- i.e., anything to be found by \input or \openin ...
+ latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex//
+ latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex//
+ TEXINPUTS = .:$TEXMF/tex//
+ TEXINPUTS.latex209 = $latex209_inputs
+ TEXINPUTS.latex2e = $latex2e_inputs
+ TEXINPUTS.latex = $latex2e_inputs
+
+ This format has some similarity to Bourne shell scripts--change the
+comment character to '#', disallow spaces around the '=', and get rid of
+the '.NAME' convention, and it could be run through the shell. However,
+there seemed little advantage in this, since all the information would
+have to passed back to Kpathsea and parsed there anyway, since the 'sh'
+process couldn't affect its parent's environment.
+
+ The combination of spaces being ignored before the '.' of a program
+name qualifer and the optional '=' for the assignment has an unexpected
+consequence: if the value begins with a literal '.' and the '=' is
+omitted, the intended value is interpreted as a program name. For
+example, a line 'var .;/some/path' is taken as an empty value for 'var'
+running under the program named ';/some/path'. To diagnose this,
+Kpathsea warns if the program name contains a path separator or other
+special character. The simplest way to avoid the problem is to use the
+'='.
+
+ Exactly when a character will be considered special or act as itself
+depends on the context in which it is used. The rules are inherent in
+the multiple levels of interpretation of the configuration (parsing,
+expansion, search, ...) and so cannot be concisely stated,
+unfortunately. There is no general escape mechanism; in particular, '\'
+is not an "escape character" in 'texmf.cnf' files. When it comes
+choosing directory names for installation, it is safest to avoid them
+all.
+
+ The implementation of all this is in 'kpathsea/cnf.c'.
+
+
+File: kpathsea.info, Node: Path expansion, Next: Casefolding search, Prev: Path sources, Up: Path searching
+
+5.3 Path expansion
+==================
+
+Kpathsea recognizes certain special characters and constructions in
+search paths, similar to that in shells. As a general example:
+'~$USER/{foo,bar}//baz' expands to all subdirectories under directories
+'foo' and 'bar' in $USER's home directory that contain a directory or
+file 'baz'.
+
+ These expansions are explained in the sections below.
+
+* Menu:
+
+* Default expansion:: a: or :a or a::b expands to a default.
+* Variable expansion:: $foo and ${foo} expand to environment values.
+* Tilde expansion:: ~ and ~user expand to home directories.
+* Brace expansion:: a{foo,bar}b expands to afoob abarb.
+* KPSE_DOT expansion:: . is replaced with $KPSE_DOT if it is defined.
+* Subdirectory expansion:: a// and a//b recursively expand to subdirs.
+
+
+File: kpathsea.info, Node: Default expansion, Next: Variable expansion, Up: Path expansion
+
+5.3.1 Default expansion
+-----------------------
+
+If the highest-priority search path (*note Path sources::) contains an
+"extra colon" (i.e., leading, trailing, or doubled), Kpathsea inserts at
+that point the next-highest-priority search path that is defined. If
+that inserted path has an extra colon, the same happens with the
+next-highest. (An extra colon in the compile-time default value has
+unpredictable results, so installers beware.)
+
+ For example, given an environment variable setting
+
+ setenv TEXINPUTS /home/karl:
+
+and a 'TEXINPUTS' value from 'texmf.cnf' of
+
+ .:$TEXMF//tex
+
+then the final value used for searching will be:
+
+ /home/karl:.:$TEXMF//tex
+
+ Put another way, default expansion works on "formats" (search paths),
+and not directly on environment variables. Example, showing the
+trailing ':' ignored in the first case and expanded in the second:
+
+ $ env TTFONTS=/tmp: kpsewhich --expand-path '$TTFONTS'
+ /tmp
+ $ env TTFONTS=/tmp: kpsewhich --show-path=.ttf
+ /tmp:.:/home/olaf/texmf/fonts/truetype//:...
+
+ Since Kpathsea looks for multiple configuration files, it would be
+natural to expect that (for example) an extra colon in './texmf.cnf'
+would expand to the path in '$TEXMF/texmf.cnf'. Or, with Dvips'
+configuration files, that an extra colon in 'config.$PRINTER' would
+expand to the path in 'config.ps'. This doesn't happen. It's not clear
+this would be desirable in all cases, and trying to devise a way to
+specify the path to which the extra colon should expand seemed truly
+baroque.
+
+ Technicality: Since it would be useless to insert the default value
+in more than one place, Kpathsea changes only one extra ':' and leaves
+any others in place (they will eventually be ignored). Kpathsea checks
+first for a leading ':', then a trailing ':', then a doubled ':'.
+
+ You can trace this by debugging "paths" (*note Debugging::). Default
+expansion is implemented in the source file 'kpathsea/kdefault.c'.
+
+
+File: kpathsea.info, Node: Variable expansion, Next: Tilde expansion, Prev: Default expansion, Up: Path expansion
+
+5.3.2 Variable expansion
+------------------------
+
+'$foo' or '${foo}' in a path element is replaced by (1) the value of an
+environment variable 'foo' (if defined); (2) the value of 'foo' from
+'texmf.cnf' (if defined); (3) the empty string.
+
+ If the character after the '$' is alphanumeric or '_', the variable
+name consists of all consecutive such characters. If the character
+after the '$' is a '{', the variable name consists of everything up to
+the next '}' (braces may not be nested around variable names).
+Otherwise, Kpathsea gives a warning and ignores the '$' and its
+following character.
+
+ You must quote the $'s and braces as necessary for your shell.
+_Shell_ variable values cannot be seen by Kpathsea, i.e., ones defined
+by 'set' in C shells and without 'export' in Bourne shells.
+
+ For example, given
+ setenv tex /home/texmf
+ setenv TEXINPUTS .:$tex:${tex}prev
+the final 'TEXINPUTS' path is the three directories:
+ .:/home/texmf:/home/texmfprev
+
+ The '.PROGNAME' suffix on variables and '_PROGNAME' on environment
+variable names are not implemented for general variable expansions.
+These are only recognized when search paths are initialized (*note Path
+sources::).
+
+ Variable expansion is implemented in the source file
+'kpathsea/variable.c'.
+
+
+File: kpathsea.info, Node: Tilde expansion, Next: Brace expansion, Prev: Variable expansion, Up: Path expansion
+
+5.3.3 Tilde expansion
+---------------------
+
+A leading '~' in a path element is replaced by the value of the
+environment variable 'HOME', or '.' if 'HOME' is not set. On Windows,
+the environment variable 'USERPROFILE' is checked instead of 'HOME'.
+
+ A leading '~USER' in a path element is replaced by USER's home
+directory from the system 'passwd' database.
+
+ For example,
+ setenv TEXINPUTS ~/mymacros:
+
+will prepend a directory 'mymacros' in your home directory to the
+default path.
+
+ As a special case, if a home directory ends in '/', the trailing
+slash is dropped, to avoid inadvertently creating a '//' construct in
+the path. For example, if the home directory of the user 'root' is '/',
+the path element '~root/mymacros' expands to just '/mymacros', not
+'//mymacros'.
+
+ Tilde expansion is implemented in the source file 'kpathsea/tilde.c'.
+
+
+File: kpathsea.info, Node: Brace expansion, Next: KPSE_DOT expansion, Prev: Tilde expansion, Up: Path expansion
+
+5.3.4 Brace expansion
+---------------------
+
+'x{A,B}y' expands to 'xAy:xBy'. For example:
+
+ foo/{1,2}/baz
+
+expands to 'foo/1/baz:foo/2/baz'. ':' is the path separator on the
+current system; e.g., on a Windows system, it's ';'.
+
+ Braces can be nested; for example, 'x{A,B{1,2}}y' expands to
+'xAy:xB1y:xB2y'.
+
+ Multiple non-nested braces are expanded from right to left; for
+example, 'x{A,B}{1,2}y' expands to 'x{A,B}1y:x{A,B}2y', which expands to
+'xA1y:xB1y:xA2y:xB2y'.
+
+ This feature can be used to implement multiple TeX hierarchies, by
+assigning a brace list to '$TEXMF', as mentioned in 'texmf.in'.
+
+ You can also use the path separator instead of the comma. The last
+example could have been written 'x{A:B}{1:2}y' (on Unix).
+
+ Brace expansion is implemented in the source file
+'kpathsea/expand.c'.
+
+
+File: kpathsea.info, Node: KPSE_DOT expansion, Next: Subdirectory expansion, Prev: Brace expansion, Up: Path expansion
+
+5.3.5 'KPSE_DOT' expansion
+--------------------------
+
+When 'KPSE_DOT' is defined in the environment, it names a directory that
+should be considered the current directory for the purpose of looking up
+files in the search paths. This feature is needed by the 'mktex...'
+scripts *note mktex scripts::, because these change the working
+directory. You should not ever define it yourself.
+
+
+File: kpathsea.info, Node: Subdirectory expansion, Prev: KPSE_DOT expansion, Up: Path expansion
+
+5.3.6 Subdirectory expansion
+----------------------------
+
+Two or more consecutive slashes in a path element following a directory
+D is replaced by all subdirectories of D: first those subdirectories
+directly under D, then the subsubdirectories under those, and so on. At
+each level, the order in which the directories are searched is
+unspecified. (It's "directory order", and definitely not alphabetical.)
+
+ If you specify any filename components after the '//', only
+subdirectories which match those components are included. For example,
+'/a//b' would expand into directories '/a/1/b', '/a/2/b', '/a/1/1/b',
+and so on, but not '/a/b/c' or '/a/1'.
+
+ You can include multiple '//' constructs in the path.
+
+ '//' at the beginning of a path is ignored; you didn't really want to
+search every directory on the system, did you?
+
+ I should mention one related implementation trick, which I took from
+GNU find. Matthew Farwell suggested it, and David MacKenzie implemented
+it.
+
+ The trick is that in every real Unix implementation (as opposed to
+the POSIX specification), a directory which contains no subdirectories
+will have exactly two links (namely, one for '.' and one for '..').
+That is to say, the 'st_nlink' field in the 'stat' structure will be
+two. Thus, we don't have to stat everything in the bottom-level (leaf)
+directories--we can just check 'st_nlink', notice it's two, and do no
+more work.
+
+ But if you have a directory that contains a single subdirectory and
+500 regular files, 'st_nlink' will be 3, and Kpathsea has to stat every
+one of those 501 entries. Therein lies slowness.
+
+ You can disable the trick by undefining 'ST_NLINK_TRICK' in
+'kpathsea/config.h'. (It is undefined by default except under Unix.)
+
+ Unfortunately, in some cases files in leaf directories are 'stat''d:
+if the path specification is, say, '$TEXMF/fonts//pk//', then files in a
+subdirectory '.../pk', even if it is a leaf, are checked. The reason
+cannot be explained without reference to the implementation, so read
+'kpathsea/elt-dirs.c' (search for 'may descend') if you are curious.
+And if you find a way to solve the problem, please let me know.
+
+ Subdirectory expansion is implemented in the source file
+'kpathsea/elt-dirs.c'.
+
+
+File: kpathsea.info, Node: Casefolding search, Next: Filename database, Prev: Path expansion, Up: Path searching
+
+5.4 Casefolding search
+======================
+
+In Kpathsea version 6.3.0 (released with TeX Live 2018), a new fallback
+search was implemented on Unix-like systems, including Macs: for each
+path element in turn, if no match is found by the normal search, and the
+path element allows for checking the filesystem, a second check is made
+for a case-insensitive match.
+
+ This is enabled at compile-time on Unix systems, and enabled at
+runtime by setting the configuration variable 'texmf_casefold_search',
+to a true value, e.g., '1'; this is done by default in TeX Live.
+
+* Menu:
+
+* Rationale: Casefolding rationale.
+* Examples: Casefolding examples.
+
+
+File: kpathsea.info, Node: Casefolding rationale, Next: Casefolding examples, Up: Casefolding search
+
+5.4.1 Casefolding rationale
+---------------------------
+
+The purpose of the fallback casefolding search is to ease moving complex
+documents between case-insensitive (file)systems and case-sensitive
+ones. In particular, Apple decided to make the default filesystem on
+Macs be case-insensitive some years ago, and this has exacerbated a
+problem of people creating documents that use, say, an image under the
+name 'foo.jpg', while the actual file is named 'foo.JPG' or 'Foo.jpg'.
+It works on the Mac but if the document is transferred and run on a
+standard case-sensitive Unix (file)system, the file can't be found, due
+only to differences in case.
+
+ This same problematic scenario has always existed on Windows, but for
+whatever reason, it has become much more common since Apple also went to
+a case-insensitive filesystem. Hence the relatively late change to the
+Kpathsea behavior.
+
+ The fallback case-insensitive search is omitted at compile-time on
+Windows, where (for practical purposes) all file names are
+case-insensitive at the kernel level, and so the normal search will
+already have definitively matched or not. Therefore, search results in
+unusual cases can be different on Windows and Unix--but this has always
+been true.
+
+
+File: kpathsea.info, Node: Casefolding examples, Prev: Casefolding rationale, Up: Casefolding search
+
+5.4.2 Casefolding examples
+--------------------------
+
+The casefolding implementation prefers exact matches to casefolded
+matches within a given path element, so as to retain most compatibility.
+Backward compatibility is not perfect, however, as a casefolded match
+may be found in an earlier path element than an exact match was
+previously found (see example #4 below). Still, preferring the match in
+the earlier element seemed potentially less confusing than otherwise,
+and is in fact consistent with past behavior on Windows. Since case
+mismatches are rare to begin with, and name collisions with respect only
+to case thus even more rare, the hope is that it will not cause
+difficulties in practice.
+
+ If it's desirable in a given situation to have the exact same search
+behavior as previously, that can be accomplished by setting the
+configuration variable 'texmf_casefold_search' to '0' (*note Path
+sources::).
+
+ Some examples to illustrate the new behavior follow.
+
+ Example #1: suppose the file './foobar.tex' exists. Now, searching
+for './FooBar.TeX' (or any other case variation) will succeed, returning
+'./foobar.tex'--the name as stored on disk. In previous releases, or if
+'texmf_casefold_search' is false, the search would fail.
+
+ Example #2: suppose we are using a case-sensitive (file)system, and
+the search path is '.:/somedir', and the files './foobar.tex' and
+'/somedir/FooBar.TeX' both exist. Both now and previously, searching
+for 'foobar.tex' returns './foobar.tex'. However, searching for
+'FooBar.TeX' now returns './foobar.tex' instead of
+'/somedir/FooBar.TeX'; this is the incompatibility mentioned above.
+Also (as expected), searching for 'FOOBAR.TEX' (or whatever variation)
+will now return './foobar.tex', whereas before it would fail. Searching
+for all ('kpsewhich --all') 'foobar.tex' will return both matches.
+
+ Example #3: same as example #2, but on a case-insensitive
+(file)system: both now and previously, searching for 'FooBar.TeX'
+returns './foobar.tex', since the system considers that a match. The
+Kpathsea casefolding never comes into play.
+
+ Example #4: if we have (on a case-sensitive system) both
+'./foobar.tex' and './FOOBAR.TEX', searching with the exact case returns
+that exact match, now and previously. Searching for 'FooBar.tex' will
+now return one or the other (chosen arbitrarily), rather than failing.
+Perhaps unexpectedly, searching for all 'foobar.tex' or 'FooBar.tex'
+will also return only one or the other, not both (see more below).
+
+ Example #5: the font file 'STIX-Regular.otf' is included in TeX Live
+in the system directory 'texmf-dist/fonts/opentype/public/stix'.
+Because Kpathsea never searches the disk in the big system directory,
+the casefolding is not done, and a search for 'stix-regular.otf' will
+fail (on case-sensitive systems), as it always has.
+
+ The caveat about not searching the disk amounts to saying that
+casefolding does not happen in the trees specified with '!!' (*note
+ls-R::), that is, where only database ('ls-R') searching is done. In
+TeX Live, that is the 'texmf-local' and 'texmf-dist' trees (also
+'$TEXMFSYSCONFIG' and '$TEXMFSYSVAR', but those are rarely noticed).
+The rationale for this is that in practice, case mangling happens with
+user-created files, not with packages distributed as part of the TeX
+system.
+
+ One more caveat: the purpose of 'kpsewhich' is to exercise the path
+searching in Kpathsea as it is actually done. Therefore, as shown
+above, 'kpsewhich --all' will not return all matches regardless of case
+within a given path element. If you want to find all matches in all
+directories, 'find' is the best tool, although the setup takes a couple
+steps:
+
+ kpsewhich -show-path=tex >/tmp/texpath # search path specification
+ kpsewhich -expand-path="`cat /tmp/texpath`" >/tmp/texdirs # all dirs
+ tr ':' '\n' </tmp/texdirs >/tmp/texdirlist # colons to newlines
+ find `cat /tmp/texdirlist` -iname somefile.tex -print </tmp/texdirlist
+
+ Sorry that it's annoyingly lengthy, but implementing this inside
+Kpathsea would be a lot of error-prone trouble for something that is
+only useful for debugging. If your 'find' does not support '-iname',
+you can get GNU Find from <https://gnu.org/software/findutils>.
+
+ The casefolding search is implemented in the source file
+'kpathsea/pathsearch.c'. Two implementation points:
+
+ * Kpathsea never tries to check if a given directory resides on a
+ case-insensitive filesystem, because there is no efficient and
+ portable way to do so. All it does is try to see if a potential
+ file name is a readable normal file (with, usually, the 'access'
+ system call).
+
+ * Kpathsea does not do any case-insensitive matching of the
+ directories along the path. It's not going to find
+ '/Some/Random/file.tex' when looking for '/some/random/file.tex'.
+ The casefolding only happens with the elements of the leaf
+ directory.
+
+
+File: kpathsea.info, Node: Filename database, Next: Invoking kpsewhich, Prev: Casefolding search, Up: Path searching
+
+5.5 Filename database ('ls-R')
+==============================
+
+Kpathsea goes to some lengths to minimize disk accesses for searches
+(*note Subdirectory expansion::). Nevertheless, in practice searching
+every possible directory in typical TeX installations takes an
+excessively long time.
+
+ Therefore, Kpathsea can use an externally-built "filename database"
+file named 'ls-R' that maps files to directories, thus avoiding the need
+to exhaustively search the disk.
+
+ A second database file 'aliases' allows you to give additional names
+to the files listed in 'ls-R'.
+
+ The 'ls-R' and 'aliases' features are implemented in the source file
+'kpathsea/db.c'.
+
+* Menu:
+
+* ls-R:: The main filename database.
+* Filename aliases:: Aliases for those names.
+* Database format:: Syntax details of the database file.
+
+
+File: kpathsea.info, Node: ls-R, Next: Filename aliases, Up: Filename database
+
+5.5.1 'ls-R'
+------------
+
+As mentioned above, you must name the main filename database 'ls-R'.
+You can put one at the root of each TeX installation hierarchy you wish
+to search ('$TEXMF' by default, which expands to a braced list of
+several hierarchies in TeX Live).
+
+ Kpathsea looks for 'ls-R' files along the 'TEXMFDBS' path. It is
+best for this to contain all and only those hierarchies from '$TEXMF'
+which are specified with '!!'--and also to specify them with '!!' in
+'TEXMFDBS'. (See the end of this section for more on '!!'.)
+
+ The recommended way to create and maintain 'ls-R' is to run the
+'mktexlsr' script, which is installed in '$(bindir)' ('/usr/local/bin'
+by default). That script goes to some trouble to follow symbolic links
+as necessary, etc. It's also invoked by the distributed 'mktex...'
+scripts.
+
+ At its simplest, though, you can build 'ls-R' with the command
+ cd /YOUR/TEXMF/ROOT && ls -LAR ./ >ls-R
+
+presuming your 'ls' produces the right output format (see the section
+below). GNU 'ls', for example, outputs in this format. Also presuming
+your 'ls' hasn't been aliased in a system file (e.g., '/etc/profile') to
+something problematic, e.g., 'ls --color=tty'. In that case, you will
+have to disable the alias before generating 'ls-R'. For the precise
+definition of the file format, see *note Database format::.
+
+ Regardless of whether you use the supplied script or your own, you
+will almost certainly want to invoke it via 'cron', so when you make
+changes in the installed files (say if you install a new LaTeX package),
+'ls-R' will be automatically updated. However, for those using TeX Live
+or system distributions, the package managers should run 'mktexlsr' as
+needed.
+
+ The '-A' option to 'ls' includes files beginning with '.' (except for
+'.' and '..'), such as the file '.tex' included with the LaTeX tools
+package. (On the other hand, _directories_ whose names begin with '.'
+are always ignored.)
+
+ If your system does not support symbolic links, omit the '-L'.
+
+ 'ls -LAR /YOUR/TEXMF/ROOT' will also work. But using './' avoids
+embedding absolute pathnames, so the hierarchy can be easily
+transported. It also avoids possible trouble with automounters or other
+network filesystem conventions.
+
+ Kpathsea warns you if it finds an 'ls-R' file, but the file does not
+contain any usable entries. The usual culprit is running plain 'ls -R'
+instead of 'ls -LR ./' or 'ls -R /YOUR/TEXMF/ROOT'. Another possibility
+is some system directory name starting with a '.' (perhaps if you are
+using AFS); Kpathsea ignores everything under such directories.
+
+ If a particular path element begins with '!!', _only_ the database
+will be searched for that element, never the disk; and if the database
+does not exist, nothing at all will be searched. In TeX Live, most of
+the trees are specified with '!!'.
+
+ For path elements that do not begin with '!!', if the database
+exists, it will be used, and the disk will not be searched. However, in
+this case, if the database does not exist, the disk will be searched.
+In TeX Live, the most notable case of this is the 'TEXMFHOME' tree, to
+allow users to add and remove files from their own tree without having
+to worry about 'ls-R'.
+
+ (Aside: there are uncommon cases where a '!!' tree will be searched
+on disk even if the 'ls-R' file exists; they are too obscure to try to
+explain here. See 'pathsearch.c' in the source if you need to know.)
+
+ To sum up: do not create an 'ls-R' file unless you also take care to
+keep it up to date. Otherwise newly-installed files will not be found.
+
+
+File: kpathsea.info, Node: Filename aliases, Next: Database format, Prev: ls-R, Up: Filename database
+
+5.5.2 Filename aliases
+----------------------
+
+In some circumstances, you may wish to find a file under several names.
+For example, suppose a TeX document was created using a DOS system and
+tries to read 'longtabl.sty'. But now it's being run on a Unix system,
+and the file has its original name, 'longtable.sty'. The file won't be
+found. You need to give the actual file 'longtable.sty' an alias
+'longtabl.sty'.
+
+ You can handle this by creating a file 'aliases' as a companion to
+the 'ls-R' for the hierarchy containing the file in question. (You must
+have an 'ls-R' for the alias feature to work.)
+
+ The format of 'aliases' is simple: two whitespace-separated words per
+line; the first is the real name 'longtable.sty', and second is the
+alias ('longtabl.sty'). These must be base filenames, with no directory
+components. 'longtable.sty' must be in the sibling 'ls-R'.
+
+ Also, blank lines and lines starting with '%' or '#' are ignored in
+'aliases', to allow for comments.
+
+ If a real file 'longtabl.sty' exists, it is used regardless of any
+aliases.
+
+
+File: kpathsea.info, Node: Database format, Prev: Filename aliases, Up: Filename database
+
+5.5.3 Database format
+---------------------
+
+The "database" read by Kpathsea is a line-oriented file of plain text.
+The format is that generated by GNU (and most other) 'ls' programs given
+the '-R' option, as follows.
+
+ * Blank lines are ignored.
+
+ * If a line begins with '/' or './' or '../' and ends with a colon,
+ it's the name of a directory. ('../' lines aren't useful, however,
+ and should not be generated.)
+
+ * All other lines define entries in the most recently seen directory.
+ /'s in such lines will produce possibly-strange results.
+
+ * Files with no preceding directory line are ignored.
+
+ For example, here's the first few lines of 'ls-R' (which totals about
+30K bytes) on my system:
+
+ bibtex
+ dvips
+ fonts
+ ls-R
+ metafont
+ metapost
+ tex
+ web2c
+
+ ./bibtex:
+ bib
+ bst
+ doc
+
+ ./bibtex/bib:
+ asi.bib
+ btxdoc.bib
+ ...
+
+
+File: kpathsea.info, Node: Invoking kpsewhich, Prev: Filename database, Up: Path searching
+
+5.6 'kpsewhich': Standalone path searching
+==========================================
+
+The Kpsewhich program exercises the path searching functionality
+independent of any particular application. This can also be useful as a
+sort of 'find' program to locate files in your TeX hierarchies, perhaps
+in administrative scripts. It is used heavily in the distributed
+'mktex...' scripts.
+
+ Synopsis:
+
+ kpsewhich OPTION... FILENAME...
+
+ The options and filename(s) to look up can be intermixed. Options
+can start with either '-' or '--', and any unambiguous abbreviation is
+accepted.
+
+* Menu:
+
+* Path searching options:: Changing the mode, resolution, etc.
+* Specially-recognized files:: Default formats for texmf.cnf, etc.
+* Auxiliary tasks:: Path and variable expansion, etc.
+* Standard options:: '--help' and '--version'.
+
+
+File: kpathsea.info, Node: Path searching options, Next: Specially-recognized files, Up: Invoking kpsewhich
+
+5.6.1 Path searching options
+----------------------------
+
+Kpsewhich looks up each non-option argument on the command line as a
+filename, and returns the first file found.
+
+ Various options alter the path searching behavior:
+
+'--all'
+ Report all matches found, one per line. By default, if there is
+ more than one match, just one will be reported (chosen effectively
+ at random). Exception: with the glyph formats ('pk', 'gf'), this
+ option has no effect and only the first match is returned.
+
+'--casefold-search'
+'--no-casefold-search'
+ Explicitly enable or disable the fallback to a case-insensitive
+ search on Unix platforms (*note Casefolding search::); no effect on
+ Windows. The default is enabled, set in 'texmf.cnf'. Disabling
+ ('--no-casefold-search') does not mean that searches magically
+ become case-sensitive when the underlying (file)system is
+ case-insensitive, it merely means that Kpathsea does not do any
+ casefolding itself.
+
+'--cnf-line=STR'
+ Parse STR as if it were a line in the 'texmf.cnf' configuration
+ file (*note Config files::), overriding settings in the actual
+ configuration files, and also in the environment (*note Path
+ sources::). This is implemented by making any settings from STR in
+ the environment, overwriting any value already there. Thus, an
+ extra colon in a '--cnf-line' value will refer to the value from a
+ configuration file, not a user-set environment variable.
+
+ Furthermore, any variable set from STR will also be set with the
+ program name suffix. For example, 'pdftex
+ --cnf-line=TEXINPUTS=/foo:' will set both 'TEXINPUTS' and
+ 'TEXINPUTS_pdftex' in the environment (and the value will be '/foo'
+ followed by the setting from 'texmf.cnf', ignoring any user-set
+ 'TEXINPUTS').
+
+ This behavior is desirable because, in practice, many variables in
+ the distributed 'texmf.cnf' are program-specific, and the intuitive
+ behavior is for values set on the command line with '--cnf-line' to
+ override them.
+
+'--dpi=NUM'
+ Set the resolution to NUM; this only affects 'gf' and 'pk' lookups.
+ '-D' is a synonym, for compatibility with Dvips. Default is 600.
+
+'--engine=NAME'
+ Set the engine name to NAME. By default it is not set. The engine
+ name is used in some search paths to allow files with the same name
+ but used by different engines to coexist.
+
+ In particular, since the memory dump files ('.fmt'/'.base'/'.mem')
+ are now stored in subdirectories named for the engine ('tex',
+ 'pdftex', 'xetex', etc.), you must specify an engine name in order
+ to find them. For example, 'cont-en.fmt' typically exists for both
+ 'pdftex' and 'xetex'. With the default path settings, you can use
+ '--engine=/' to look for any dump file, regardless of engine; if a
+ dump file exists for more than one engine, it's indeterminate which
+ one is returned. (The '/' ends up specifying a normal recursive
+ search along the path where the dumps are stored, namely
+ '$TEXMF/web2c{/$engine,}'.)
+
+'--format=NAME'
+ Set the format for lookup to NAME. By default, the format is
+ guessed from the filename, with 'tex' being used if nothing else
+ fits. The recognized filename extensions (including any leading
+ '.') are also allowable NAMEs.
+
+ All formats also have a name, which is the only way to specify
+ formats with no associated suffix. For example, for Dvips
+ configuration files you can use '--format="dvips config"'. (The
+ quotes are for the sake of the shell.)
+
+ Here's the current list of recognized names and the associated
+ suffixes. *Note Supported file formats::, for more information on
+ each of these.
+
+ The strings in parentheses are abbreviations recognized only by
+ 'kpsewhich' (not the underlying library calls). They are provided
+ when it would otherwise require an argument containing a space to
+ specify the format, to simplify quoting of calls from shells.
+
+ gf: gf
+ pk: pk
+ bitmap font (bitmapfont):
+ tfm: .tfm
+ afm: .afm
+ base: .base
+ bib: .bib
+ bst: .bst
+ cnf: .cnf
+ ls-R: ls-R ls-r
+ fmt: .fmt
+ map: .map
+ mem: .mem
+ mf: .mf
+ mfpool: .pool
+ mft: .mft
+ mp: .mp
+ mppool: .pool
+ MetaPost support (mpsupport):
+ ocp: .ocp
+ ofm: .ofm .tfm
+ opl: .opl .pl
+ otp: .otp
+ ovf: .ovf .vf
+ ovp: .ovp .vpl
+ graphic/figure: .eps .epsi
+ tex: .tex .sty .cls .fd .aux .bbl .def .clo .ldf
+ TeX system documentation (doc):
+ texpool: .pool
+ TeX system sources (source): .dtx .ins
+ PostScript header: .pro
+ Troff fonts (trofffont):
+ type1 fonts: .pfa .pfb
+ vf: .vf
+ dvips config (dvipsconfig):
+ ist: .ist
+ truetype fonts: .ttf .ttc .TTF .TTC .dfont
+ type42 fonts: .t42 .T42
+ web2c files (web2c):
+ other text files (othertext):
+ other binary files (otherbin):
+ misc fonts (miscfont):
+ web: .web .ch
+ cweb: .w .web .ch
+ enc files: .enc
+ cmap files (cmap):
+ subfont definition files: .sfd
+ opentype fonts: .otf
+ pdftex config (pdftexconfig):
+ lig files: .lig
+ texmfscripts:
+ lua: .lua .luatex .luc .luctex .texlua .texluc .tlu
+ font feature files: .fea
+ cid maps: .cid .cidmap
+ mlbib: .mlbib .bib
+ mlbst: .mlbst .bst
+ clua: .dll .so
+ ris: .ris
+ bltxml: .bltxml
+
+ This option and '--path' are mutually exclusive.
+
+'--interactive'
+ After processing the command line, read additional filenames to
+ look up from standard input.
+
+'--mktex=FILETYPE'
+'--no-mktex=FILETYPE'
+ Turn on or off the 'mktex' script associated with FILETYPE. Usual
+ values for FILETYPE are 'pk', 'mf', 'tex', and 'tfm'. By default,
+ all are off in Kpsewhich, even if they are enabled for TeX. This
+ option implies setting '--must-exist'. *Note mktex scripts::.
+
+'--mode=STRING'
+ Set the mode name to STRING; this also only affects 'gf' and 'pk'
+ lookups. No default: any mode will be found. *Note mktex script
+ arguments::.
+
+'--must-exist'
+ Do everything possible to find the files, notably including
+ searching the disk and running the 'mktex' scripts. By default,
+ only the 'ls-R' database is checked, in the interest of efficiency.
+
+'--path=STRING'
+ Search along the path STRING (colon-separated as usual), instead of
+ guessing the search path from the filename. '//' and all the usual
+ expansions are supported (*note Path expansion::). This option and
+ '--format' are mutually exclusive. To output the complete
+ directory expansion of a path, instead of doing a one-shot lookup,
+ see '--expand-path' and '--show-path' in the following section.
+
+'--progname=NAME'
+ Set the program name to NAME; default is 'kpsewhich'. This can
+ affect the search paths via the '.PROGNAM' feature in configuration
+ files (*note Config files::).
+
+'--subdir=STRING'
+ Report only those matches whose directory part _ends_ with STRING
+ (compared literally, except case is ignored on a case-insensitive
+ operating system). For example, suppose there are two matches for
+ a given name:
+
+ kpsewhich foo.sty
+ => /some/where/foo.sty
+ /another/place/foo.sty
+
+ Then we can narrow the result to what we are interested in with
+ '--subdir':
+
+ kpsewhich --subdir=where foo.sty
+ => /some/where/foo.sty
+
+ kpsewhich --subdir=place foo.sty
+ => /another/place/foo.sty
+
+ The string to match must be at the end of the directory part of the
+ match, and it is taken literally, with no pattern matching:
+
+ kpsewhich --subdir=another foo.sty
+ =>
+
+ The string to match may cross directory components:
+
+ kpsewhich --subdir=some/where foo.sty
+ => /some/where/foo.sty
+
+ '--subdir' implies '--all'; if there is more than one match, they
+ will all be reported (in our example, both 'where' and 'place' end
+ in 'e'):
+
+ kpsewhich --subdir=e
+ => /some/where/foo.sty
+ /another/place/foo.sty
+
+ Because of the above rules, the presence of a leading '/' is
+ important, since it "anchors" the match to a full component name:
+
+ kpsewhich --subdir=/lace foo.sty
+ =>
+
+ However, a trailing '/' is immaterial (and ignored), since the
+ match always takes place at the end of the directory part:
+
+ kpsewhich --subdir=lace/ foo.sty
+ => /another/place/foo.sty
+
+ The purpose of these rules is to make it convenient to find results
+ only within a particular area of the tree. For instance, a given
+ script named 'foo.lua' might exist within both
+ 'texmf-dist/scripts/pkg1/' and 'texmf-dist/scripts/pkg2/'. By
+ specifying, say, '--subdir=/pkg1', you can be sure of getting the
+ one you are interested in.
+
+ We only match at the end because a site might happen to install TeX
+ in '/some/coincidental/pkg1/path/', and we wouldn't want to match
+ 'texmf-dist/scripts/pkg2/' that when searching for '/pkg1'.
+
+
+File: kpathsea.info, Node: Specially-recognized files, Next: Auxiliary tasks, Prev: Path searching options, Up: Invoking kpsewhich
+
+5.6.2 Specially-recognized files for 'kpsewhich'
+------------------------------------------------
+
+'kpsewhich' recognizes a few special filenames on the command line and
+defaults to using the 'known' file formats for them, merely to save the
+time and trouble of specifying the format. This is only a feature of
+'kpsewhich'; when using the Kpathsea library itself, none of these
+special filenames are recognized, and it's still up to the caller to
+specify the desired format.
+
+ Here is the list of special filenames to 'kpsewhich', along with
+their corresponding format:
+
+'config.ps'
+ 'dvips config'
+
+'dvipdfmx.cfg'
+ 'other text files'
+
+'fmtutil.cnf'
+ 'web2c files'
+
+'glyphlist.txt'
+ 'map'
+
+'mktex.cnf'
+ 'web2c files'
+
+'pdfglyphlist.txt'
+ 'map'
+
+'pdftex.cfg'
+ 'pdftex config' (although 'pdftex.cfg' is not used any more; look
+ for the file 'pdftexconfig.tex' instead.)
+
+'texmf.cnf'
+ 'cnf'
+
+'XDvi'
+ 'other text files'
+
+ A user-specified format will override the above defaults.
+
+ Another useful configuration file in this regard is 'tcfmgr.map',
+found in 'texmf/texconfig/tcfmgr.map', which records various information
+about the above configuration files (among others).
+
+
+File: kpathsea.info, Node: Auxiliary tasks, Next: Standard options, Prev: Specially-recognized files, Up: Invoking kpsewhich
+
+5.6.3 Auxiliary tasks
+---------------------
+
+Kpsewhich provides some features in addition to path lookup as such:
+
+'--debug=NUM'
+ Set debugging options to NUM. *Note Debugging::.
+
+'--expand-braces=STRING'
+ Output variable, tilde, and brace expansion of STRING, which is
+ assumed to be a single path element. *Note Path expansion::.
+
+'--expand-path=STRING'
+ Output the complete expansion of STRING, with each element
+ separated by the usual path separator on the current system (';' on
+ Windows, ':' otherwise). This may be useful to construct a custom
+ search path for a format not otherwise supported. To retrieve the
+ search path for a format that is already supported, see
+ '--show-path'.
+
+ Nonexistent directories are culled from the output:
+
+ $ kpsewhich --expand-path '/tmp'
+ => /tmp
+ $ kpsewhich --expand-path '/nonesuch'
+ =>
+
+ For one-shot uses of an arbitrary (not built in to Kpathsea) path,
+ see '--path' (*note Path searching options::).
+
+'--expand-var=STRING'
+ Output the variable and tilde expansion of STRING. For example,
+ with the usual 'texmf.cnf', 'kpsewhich --expand-var='$TEXMF''
+ returns the TeX system hierarchy root(s). *Note Path expansion::.
+ The specified STRING can contain anything, though, not just
+ variable references. This calls 'kpse_var_expand' (*note
+ Programming with config files::).
+
+'--help-formats'
+ Output information about each supported format (*note Supported
+ file formats::), including the names and abbreviations, variables
+ looked for, and the original path.
+
+'--safe-in-name=NAME'
+'--safe-out-name=NAME'
+ Exit successfully if NAME is safe to open for reading or writing,
+ respectively, else unsuccessfully. No output is written. These
+ tests take account of the related Kpathsea configuration settings
+ (*note Calling sequence::).
+
+'--show-path=NAME'
+ Show the path that would be used for file lookups of file type
+ NAME. Either a filename extension ('pk', '.vf', etc.) or an
+ integer can be used, just as with '--format', described in the
+ previous section.
+
+'--var-brace-value=VARIABLE'
+ Like '--var-value' (next), but also expands '{...}' constructs.
+ (*note Brace expansion::). Thus, the value is assumed to possibly
+ be several path elements, and '~' is expanded at the beginning of
+ each. The path separator is changed to that of the current system
+ in the expansion.
+
+ Example: 'FOO='.;~' kpsewhich --var-brace-value=FOO' outputs (on a
+ Unix-ish system) '.:/home/karl', supposing the latter is the
+ current user's home directory. Note that the ';' in the source
+ value, as commonly used in 'texmf.cnf', has changed to a ':', as
+ the normal path separator on the current system. On a Windows-ish
+ system, the ';' would remain.
+
+'--var-value=VARIABLE'
+ Outputs the value of VARIABLE (a simple identifier like
+ 'TEXMFDIST', with no '$' or other constructs), expanding '$' (*note
+ Variable expansion::) and '~' (*note Tilde expansion::) constructs
+ in the value. '~' expansion happens at the beginning of the
+ overall value and at the beginning of a variable expansion, but not
+ arbitrarily within the string. Braces are not expanded.
+
+ Example: '--var-value=texmf_casefold_search' outputs (if the
+ default is not changed) '1'.
+
+ Example to contrast with '--var-brace-value': 'FOO='.;~' kpsewhich
+ --var-value=FOO' outputs '.;~', i.e., the same as the input value,
+ on all systems.
+
+
+File: kpathsea.info, Node: Standard options, Prev: Auxiliary tasks, Up: Invoking kpsewhich
+
+5.6.4 Standard options
+----------------------
+
+Kpsewhich accepts the standard GNU options:
+
+ * '--help' prints a help message on standard output and exits
+ successfully.
+
+ * '--version' prints the Kpathsea version number and exits
+ successfully.
+
+
+File: kpathsea.info, Node: TeX support, Next: Programming, Prev: Path searching, Up: Top
+
+6 TeX support
+*************
+
+Although the basic features in Kpathsea can be used for any type of path
+searching, it came about, as usual, with a specific application in mind:
+I wrote Kpathsea specifically for TeX system programs. I had been
+struggling with the programs I was using (Dvips, Xdvi, and TeX itself)
+having slightly different notions of how to specify paths; and debugging
+was painful, since no code was shared.
+
+ Therefore, Kpathsea provides some TeX-specific formats and features.
+Indeed, many of the purportedly generic path searching features were
+provided because they seemed useful in that conTeXt (font lookup,
+particularly).
+
+ Kpathsea provides a standard way to search for files of any of the
+supported file types; glyph fonts are a bit different than all the rest.
+Searches are based solely on names of files, not their contents--if a GF
+file is (mis)named 'cmr10.600pk', it will be found as a PK file.
+
+* Menu:
+
+* Supported file formats:: File types Kpathsea knows about.
+* File lookup:: Searching for most kinds of files.
+* Glyph lookup:: Searching for bitmap fonts.
+* Suppressing warnings:: Avoiding warnings via TEX_HUSH.
+* mktex scripts:: Generating files at runtime.
+
+
+File: kpathsea.info, Node: Supported file formats, Next: File lookup, Up: TeX support
+
+6.1 Supported file formats
+==========================
+
+Kpathsea has support for a number of file types. Each file type has a
+list of environment and config file variables that are checked to define
+the search path, and most have a default suffix that plays a role in
+finding files (see the next section). Some also define additional
+suffixes, and/or a program to be run to create missing files on the fly.
+
+ Since environment variables containing periods, such as
+'TEXINPUTS.latex', are not allowed on some systems, Kpathsea looks for
+environment variables with an underscore, e.g., 'TEXINPUTS_latex' (*note
+Config files::).
+
+ The following table lists the above information. You can also get
+the list by giving the '--help-formats' option to 'kpsewhich' (*note
+Auxiliary tasks::).
+
+'afm'
+ (Adobe font metrics, *note (dvips)Metric files::) 'AFMFONTS';
+ suffix '.afm'.
+
+'base'
+ (Metafont memory dump, *note (web2c)Memory dumps::) 'MFBASES',
+ 'TEXMFINI'; suffix '.base'.
+
+'bib'
+ (BibTeX bibliography source, *note (web2c)bibtex invocation::)
+ 'BIBINPUTS', 'TEXBIB'; suffix '.bib'.
+
+'bltxml'
+ (BibLaTeXML bibliography files for Biber,
+ <https://ctan.org/pkg/biber>) 'BLTXMLINPUTS' suffix '.bltxml'.
+
+'bst'
+ (BibTeX style, *note Basic BibTeX style files: (web2c)Basic BibTeX
+ style files.) 'BSTINPUTS'; suffix '.bst'.
+
+'clua'
+ (dynamic libraries for Lua, <https://ctan.org/pkg/luatex>)
+ 'CLUAINPUTS' suffixes '.dll' and '.so'.
+
+'cmap'
+ (character map files) 'CMAPFONTS'; suffix '.cmap'.
+
+'cnf'
+ (Runtime configuration files, *note Config files::) 'TEXMFCNF';
+ suffix '.cnf'.
+
+'cweb'
+ (CWEB input files) 'CWEBINPUTS'; suffixes '.w', '.web'; additional
+ suffix '.ch'.
+
+'dvips config'
+ (Dvips 'config.*' files, such as 'config.ps', *note (dvips)Config
+ files::) 'TEXCONFIG'.
+
+'enc files'
+ (encoding vectors) 'ENCFONTS'; suffix '.enc'.
+
+'fmt'
+ (TeX memory dump, *note (web2c)Memory dumps::) 'TEXFORMATS',
+ 'TEXMFINI'; suffix '.fmt'.
+
+'font cid map'
+ (CJK mapping) 'FONTCIDMAPS' suffix '.cid'.
+
+'font feature files'
+ (primarily for OpenType font features) 'FONTFEATURES' suffix
+ '.fea'.
+
+'gf'
+ (generic font bitmap, *note (dvips)Glyph files::) 'PROGRAMFONTS',
+ 'GFFONTS', 'GLYPHFONTS', 'TEXFONTS'; suffix 'gf'.
+
+'graphic/figure'
+ (Encapsulated PostScript figures, *note (dvips)PostScript
+ figures::) 'TEXPICTS', 'TEXINPUTS'; additional suffixes: '.eps',
+ '.epsi'.
+
+'ist'
+ (makeindex style files) 'TEXINDEXSTYLE', 'INDEXSTYLE'; suffix
+ '.ist'.
+
+'lig files'
+ (ligature definition files) 'LIGFONTS'; suffix '.lig'.
+
+'ls-R'
+ (Filename databases, *note Filename database::) 'TEXMFDBS'.
+
+'map'
+ (Fontmaps, *note Fontmap::) 'TEXFONTMAPS'; suffix '.map'.
+
+'mem'
+ (MetaPost memory dump, *note (web2c)Memory dumps::) 'MPMEMS',
+ 'TEXMFINI'; suffix '.mem'.
+
+'MetaPost support'
+ (MetaPost support files, used by DMP; *note (web2c)dmp
+ invocation::) 'MPSUPPORT'.
+
+'mf'
+ (Metafont source, *note (web2c)mf invocation::) 'MFINPUTS'; suffix
+ '.mf'; dynamic creation program: 'mktexmf'.
+
+'mfpool'
+ (Metafont program strings, *note (web2c)pooltype invocation::)
+ 'MFPOOL', 'TEXMFINI'; suffix '.pool'.
+
+'mft'
+ ('MFT' style file, *note (web2c)mft invocation::) 'MFTINPUTS';
+ suffix '.mft'.
+
+'misc fonts'
+ (font-related files that don't fit the other categories)
+ 'MISCFONTS'
+
+'mlbib'
+ (MlBibTeX bibliography source) 'MLBIBINPUTS', 'BIBINPUTS',
+ 'TEXBIB'; suffixes '.mlbib', '.mlbib'.
+
+'mlbst'
+ (MlBibTeX style) 'MLBSTINPUTS', 'BSTINPUTS'; suffixes '.mlbst',
+ '.bst'.
+
+'mp'
+ (MetaPost source, *note (web2c)mpost invocation::) 'MPINPUTS';
+ suffix '.mp'.
+
+'mppool'
+ (MetaPost program strings, *note (web2c)pooltype invocation::)
+ 'MPPOOL', 'TEXMFINI'; suffix '.pool'.
+
+'ocp'
+ (Omega compiled process files) 'OCPINPUTS';
+ suffix '.ocp'; dynamic creation program: 'MakeOmegaOCP'.
+
+'ofm'
+ (Omega font metrics) 'OFMFONTS', 'TEXFONTS';
+ suffixes '.ofm', '.tfm'; dynamic creation program: 'MakeOmegaOFM'.
+
+'opentype fonts'
+ (OpenType fonts) 'OPENTYPEFONTS'.
+
+'opl'
+ (Omega property lists) 'OPLFONTS', 'TEXFONTS'; suffix '.opl'.
+
+'otp'
+ (Omega translation process files) 'OTPINPUTS'; suffix '.otp'.
+
+'ovf'
+ (Omega virtual fonts) 'OVFFONTS', 'TEXFONTS'; suffix '.ovf'.
+
+'ovp'
+ (Omega virtual property lists) 'OVPFONTS', 'TEXFONTS'; suffix
+ '.ovp'.
+
+'pdftex config'
+ (PDFTeX-specific configuration files) 'PDFTEXCONFIG'.
+
+'pk'
+ (packed bitmap fonts, *note (dvips)Glyph files::) 'PROGRAMFONTS'
+ (PROGRAM being 'XDVI', etc.), 'PKFONTS', 'TEXPKS', 'GLYPHFONTS',
+ 'TEXFONTS'; suffix 'pk'; dynamic creation program: 'mktexpk'.
+
+'PostScript header'
+ (downloadable PostScript, *note (dvips)Header files::)
+ 'TEXPSHEADERS', 'PSHEADERS'; additional suffix '.pro'.
+
+'ris'
+ (RIS bibliography files, primarily for Biber,
+ <https://ctan.org/pkg/biber>) 'RISINPUTS' suffix '.ris'.
+
+'subfont definition files'
+ (subfont definition files) 'SFDFONTS' suffix '.sfd'.
+
+'tex'
+ (TeX source, *note (web2c)tex invocation::) 'TEXINPUTS'; suffix
+ '.tex'; additional suffixes: none, because such a list cannot be
+ complete; dynamic creation program: 'mktextex'.
+
+'TeX system documentation'
+ (Documentation files for the TeX system) 'TEXDOCS'.
+
+'TeX system sources'
+ (Source files for the TeX system) 'TEXSOURCES'.
+
+'texmfscripts'
+ (Architecture-independent executables distributed in the texmf
+ trees) 'TEXMFSCRIPTS'.
+
+'texpool'
+ (TeX program strings, *note (web2c)pooltype invocation::)
+ 'TEXPOOL', 'TEXMFINI'; suffix '.pool'.
+
+'tfm'
+ (TeX font metrics, *note (dvips)Metric files::) 'TFMFONTS',
+ 'TEXFONTS'; suffix '.tfm'; dynamic creation program: 'mktextfm'.
+
+'Troff fonts'
+ (Troff fonts, used by DMP; *note (web2c)DMP invocation::)
+ 'TRFONTS'.
+
+'truetype fonts'
+ (TrueType outline fonts) 'TTFONTS'; suffixes '.ttf' and '.TTF',
+ '.ttc' and '.TTC', '.dfont'.
+
+'type1 fonts'
+ (Type 1 PostScript outline fonts, *note (dvips)Glyph files::)
+ 'T1FONTS', 'T1INPUTS', 'TEXPSHEADERS', 'DVIPSHEADERS'; suffixes
+ '.pfa', '.pfb'.
+
+'type42 fonts'
+ (Type 42 PostScript outline fonts) 'T42FONTS'.
+
+'vf'
+ (virtual fonts, *note (dvips)Virtual fonts::) 'VFFONTS',
+ 'TEXFONTS'; suffix '.vf'.
+
+'web'
+ (WEB input files) 'WEBINPUTS'; suffix '.web'; additional suffix
+ '.ch'.
+
+'web2c files'
+ (files specific to the web2c implementation) 'WEB2C'.
+
+ There are two special cases, because the paths and environment
+variables always depend on the name of the program: the variable name is
+constructed by converting the program name to upper case, and then
+appending 'INPUTS'. Assuming the program is called 'foo', this gives us
+the following table.
+
+'other text files'
+ (text files used by 'foo') 'FOOINPUTS'.
+
+'other binary files'
+ (binary files used by 'foo') 'FOOINPUTS'.
+
+ If an environment variable by these names are set, the corresponding
+'texmf.cnf' definition won't be looked at (unless, as usual, the
+environment variable value has an extra ':'). *Note Default
+expansion::.
+
+ For the font variables, the intent is that:
+ * 'TEXFONTS' is the default for everything.
+
+ * 'GLYPHFONTS' is the default for bitmap (or, more precisely,
+ non-metric) files.
+
+ * Each font format has a variable of its own.
+
+ * Each program has its own font override path as well; e.g.,
+ 'DVIPSFONTS' for Dvipsk. Again, this is for bitmaps, not metrics.
+
+
+File: kpathsea.info, Node: File lookup, Next: Glyph lookup, Prev: Supported file formats, Up: TeX support
+
+6.2 File lookup
+===============
+
+This section describes how Kpathsea searches for most files (bitmap font
+searches are the exception, as described in the next section).
+
+ Here is the search strategy for a file NAME:
+
+ 1. If the file format defines default suffixes, and the suffix of NAME
+ name is not already a known suffix for that format, try the name
+ with each default appended, and use alternative names found in the
+ fontmaps if necessary. Example: given 'foo.bar', look for
+ 'foo.bar.tex'.
+
+ 2. Search for NAME, and if necessary for alternative names found in
+ the fontmaps. Example: given 'foo.bar', we also look for
+ 'foo.bar'.
+
+ 3. If the file format defines a program to invoke to create missing
+ files, run it (*note mktex scripts::).
+
+ The order in which we search for "suffixed" name (item 1) or the
+"as-is" name (item 2) is controlled by the 'try_std_extension_first'
+configuration value. The default set in 'texmf.cnf' is true, since
+common suffixes are already recognized: 'babel.sty' will only look for
+'babel.sty', not 'babel.sty.tex', regardless of this setting.
+
+ When the suffix is unknown (e.g., 'foo.bar'), both names are always
+tried; the difference is the order in which they are tried.
+
+ 'try_std_extension_first' only affects names being looked up which
+*already* have an extension. A name without an extension (e.g., 'tex
+story') will always have an extension added first.
+
+ This algorithm is implemented in the function 'kpathsea_find_file' in
+the source file 'kpathsea/tex-file.c'. You can watch it in action with
+the debugging options (*note Debugging::).
+
+
+File: kpathsea.info, Node: Glyph lookup, Next: Suppressing warnings, Prev: File lookup, Up: TeX support
+
+6.3 Glyph lookup
+================
+
+This section describes how Kpathsea searches for a bitmap font in GF or
+PK format (or either) given a font name (e.g., 'cmr10') and a resolution
+(e.g., 600).
+
+ Here is an outline of the search strategy (details in the sections
+below) for a file NAME at resolution DPI. The search stops at the first
+successful lookup.
+
+ 1. Look for an existing file NAME.DPIFORMAT in the specified
+ format(s).
+
+ 2. If NAME is an alias for a file F in the fontmap file
+ 'texfonts.map', look for F.DPI.
+
+ 3. Run an external program (typically named 'mktexpk') to generate the
+ font (*note mktex scripts::)
+
+ 4. Look for FALLBACK.DPI, where FALLBACK is some last-resort font
+ (typically 'cmr10').
+
+ This is implemented in 'kpathsea_find_glyph' in
+'kpathsea/tex-glyph.c'.
+
+* Menu:
+
+* Basic glyph lookup:: Features common to all glyph lookups.
+* Fontmap:: Aliases for fonts.
+* Fallback font:: Resolutions and fonts of last resort.
+
+
+File: kpathsea.info, Node: Basic glyph lookup, Next: Fontmap, Up: Glyph lookup
+
+6.3.1 Basic glyph lookup
+------------------------
+
+When Kpathsea looks for a bitmap font NAME at resolution DPI in a format
+FORMAT, it first checks each directory in the search path for a file
+'NAME.DPIFORMAT'; for example, 'cmr10.600pk'. Kpathsea looks for a PK
+file first, then a GF file.
+
+ If that fails, Kpathsea looks for 'dpiDPI/NAME.FORMAT'; for example,
+'dpi600/cmr10.pk'. This is how fonts are typically stored on
+filesystems (such as DOS) that permit only three-character extensions.
+
+ If that fails, Kpathsea looks for a font with a close-enough DPI.
+"Close enough" is defined by the macro 'KPSE_BITMAP_TOLERANCE' in
+'kpathsea/tex-glyph.h' to be 'DPI / 500 + 1'. This is slightly more
+than the 0.2% minimum allowed by the DVI standard
+(<CTAN:/dviware/driv-standard/level-0>).
+
+
+File: kpathsea.info, Node: Fontmap, Next: Fallback font, Prev: Basic glyph lookup, Up: Glyph lookup
+
+6.3.2 Fontmap
+-------------
+
+If a bitmap font or metric file is not found with the original name (see
+the previous section), Kpathsea looks through any "fontmap" files for an
+"alias" for the original font name. These files are named
+'texfonts.map' and searched for along the 'TEXFONTMAPS'
+environment/config file variable. All 'texfonts.map' files that are
+found are read; earlier definitions override later ones.
+
+ This feature is intended to help in two respects:
+
+ 1. An alias name is limited in length only by available memory, not by
+ your filesystem. Therefore, if you want to ask for 'Times-Roman'
+ instead of 'ptmr', you can (you get 'ptmr8r').
+
+ 2. A few fonts have historically had multiple names: specifically,
+ LaTeX's "circle font" has variously been known as 'circle10',
+ 'lcircle10', and 'lcirc10'. Aliases can make all the names
+ equivalent, so that it no longer matters what the name of the
+ installed file is; TeX documents will find their favorite name.
+
+ The format of fontmap files is straightforward:
+
+ * Comments start with the last '%' on a line and continue to the end
+ of the line. (This provides for names that include a %,
+ ill-advised as that may be.)
+
+ * Blank lines are ignored.
+
+ * Each nonblank line is broken up into a series of "words": a
+ sequence of non-whitespace characters.
+
+ * If the first word is 'include', the second word is used as a
+ filename, and it is searched for and read.
+
+ * Otherwise, the first word on each line is the true filename;
+
+ * the second word is the alias;
+
+ * subsequent words are ignored.
+
+ If an alias has an extension, it matches only those files with that
+extension; otherwise, it matches anything with the same root, regardless
+of extension. For example, an alias 'foo.tfm' matches only when
+'foo.tfm' is being searched for; but an alias 'foo' matches 'foo.vf',
+'foo.600pk', etc.
+
+ As an example, here is an excerpt from the 'texfonts.map' in the
+Web2c distribution. It makes the old and new names of the LaTeX circle
+fonts equivalent.
+
+ circle10 lcircle10
+ circle10 lcirc10
+ lcircle10 circle10
+ lcircle10 lcirc10
+ lcirc10 circle10
+ lcirc10 lcircle10
+ ...
+
+ Fontmaps are implemented in the file 'kpathsea/fontmap.c'. The
+Fontname distribution has much more information on font naming (*note
+(fontname)::).
+
+
+File: kpathsea.info, Node: Fallback font, Prev: Fontmap, Up: Glyph lookup
+
+6.3.3 Fallback font
+-------------------
+
+If a bitmap font cannot be found or created at the requested size,
+Kpathsea looks for the font at a set of "fallback resolutions". You
+specify these resolutions as a colon-separated list (like search paths).
+Kpathsea looks first for a program-specific environment variable (e.g.,
+'DVIPSSIZES' for Dvipsk), then the environment variable 'TEXSIZES', then
+a default specified at compilation time (the Make variable
+'default_texsizes'). You can set this list to be empty if you prefer to
+find fonts at their stated size or not at all.
+
+ Finally, if the font cannot be found even at the fallback
+resolutions, Kpathsea looks for a fallback font, typically 'cmr10'.
+Programs must enable this feature by calling 'kpathsea_init_prog' (*note
+Calling sequence::); the default is no fallback font.
+
+
+File: kpathsea.info, Node: Suppressing warnings, Next: mktex scripts, Prev: Glyph lookup, Up: TeX support
+
+6.4 Suppressing warnings
+========================
+
+Kpathsea provides a way to suppress selected usually-harmless warnings;
+this is useful at large sites where most users are not administrators,
+and thus the warnings are merely a source of confusion, not a help. To
+do this, you set the environment variable or configuration file value
+'TEX_HUSH' to a colon-separated list of values. Here are the
+possibilities:
+
+'all'
+ Suppress everything possible.
+
+'checksum'
+ Suppress mismatched font checksum warnings.
+
+'lostchar'
+ Suppress warnings when a character is missing from a font that a
+ DVI or VF file tries to typeset.
+
+'none'
+ Don't suppress any warnings.
+
+'readable'
+ Suppress warnings about attempts to access a file whose permissions
+ render it unreadable.
+
+'special'
+ Suppresses warnings about an unimplemented or unparsable '\special'
+ command.
+
+'tex-hush.c' defines the function that checks the variable value. Each
+driver implements its own checks where appropriate.
+
+
+File: kpathsea.info, Node: mktex scripts, Prev: Suppressing warnings, Up: TeX support
+
+6.5 'mktex' scripts
+===================
+
+If Kpathsea cannot otherwise find a file, for some file types it is
+configured by default to invoke an external program to create it
+dynamically (*note mktex configuration::). These are collectively known
+as "'mktex' scripts", since most of them are named 'mktex...'.
+
+ For example, this is useful for fonts (bitmaps, TFM's, and
+arbitrarily-sizable Metafont sources such as the Sauter and EC fonts),
+since any given document can use fonts never before referenced.
+Building all fonts in advance is therefore impractical, if not
+impossible.
+
+ It is also useful for the TeX '.fmt' (and Metafont '.base' and
+Metapost '.mem' files, *note (Web2c)Memory dumps::), where
+pre-generating every format consumes a lot of both time and space.
+
+ The script is passed the name of the file to create and possibly
+other arguments, as explained below. It must echo the full pathname of
+the file it created (and nothing else) to standard output; it can write
+diagnostics to standard error.
+
+* Menu:
+
+* config: mktex configuration.
+* names: mktex script names.
+* args: mktex script arguments.
+
+
+File: kpathsea.info, Node: mktex configuration, Next: mktex script names, Up: mktex scripts
+
+6.5.1 'mktex' configuration
+---------------------------
+
+The list of file types and program names that can run an external
+program to create missing files is listed in the next section. In the
+absence of 'configure' options specifying otherwise, everything but
+'mktextex' will be enabled by default. The 'configure' options to
+change the defaults are:
+
+ --without-mktexfmt-default
+ --without-mktexmf-default
+ --without-mktexocp-default
+ --without-mktexofm-default
+ --without-mktexpk-default
+ --without-mktextfm-default
+ --with-mktextex-default
+
+ The 'configure' setting is overridden if the environment variable or
+configuration file value named for the script is set; e.g., 'MKTEXPK'
+(*note mktex script arguments::).
+
+ 'mktexfmt' reads a file 'fmtutil.cnf', typically located in
+'texmf/web2c/' to glean its configuration information. The rest of the
+files and features in this section are primarily intended for the font
+generation scripts.
+
+ As distributed, all the scripts source a file 'texmf/web2c/mktex.cnf'
+if it exists, so you can override various defaults. See 'mktex.opt',
+for instance, which defines the default mode, resolution, some special
+directory names, etc. If you prefer not to change the distributed
+scripts, you can simply create 'mktex.cnf' with the appropriate
+definitions (you do not need to create it if you have nothing to put in
+it). 'mktex.cnf' has no special syntax; it's an arbitrary Bourne shell
+script. The distribution contains a sample 'mktex.cnf' for you to copy
+and modify as you please (it is not installed anywhere).
+
+ In addition, you can configure a number of features with the
+'MT_FEATURES' variable, which you can define:
+
+ * in 'mktex.opt', as just mentioned;
+
+ * by editing the file 'mktex.opt', either before 'make install' (in
+ the source hierarchy) or after (in the installed hierarchy);
+
+ * or in the environment.
+
+ If none of the options below are enabled, 'mktexpk', 'mktextfm', and
+'mktexmf' follow the following procedure to decide where fonts should be
+installed. Find the tree where the font's sources are, and test the
+permissions of the 'fonts' directory of that tree to determine whether
+it is writable. If it is, put the files in the tree in appropriate
+locations. If it isn't writable, see whether the tree is a system tree
+(named in 'SYSTEXMF'). If so, the 'VARTEXFONTS' tree is used. In all
+other cases the working directory is used.
+
+ The 'appendonlydir' option is enabled by default.
+
+'appendonlydir'
+ Tell 'mktexdir' to create directories append-only, i.e., set their
+ sticky bit (*note (coreutils)Mode Structure::). This feature is
+ silently ignored on non-Unix platforms (e.g. Windows/NT and
+ MS-DOS) which don't support similar functionality. This feature is
+ enabled by default.
+
+'dosnames'
+ Use 8.3 names; e.g., 'dpi600/cmr10.pk' instead of 'cmr10.600pk'.
+ Note that this feature only affects filenames that would otherwise
+ clash with other TeX-related filenames; 'mktex' scripts do nothing
+ about filenames which exceed the 8+3 MS-DOS limits but remain
+ unique when truncated (by the OS) to these limits, and nether do
+ the scripts care about possible clashes with files which aren't
+ related with TeX. For example, 'cmr10.600pk' would clash with
+ 'cmr10.600gf' and is therefore changed when 'dosnames' is in
+ effect, but 'mf.pool' and 'mp.base' don't clash with any
+ TeX-related files and are therefore unchanged.
+
+ This feature is turned on by default on MS-DOS. If you do not wish
+ 'dosnames' to be set on an MS-DOS platform, you need to set the
+ 'MT_FEATURES' environment variable to a value that doesn't include
+ 'dosnames'. You can also change the default setting by editing
+ 'mktex.opt', but only if you use the 'mktex' shell scripts; the
+ emulation programs don't consult 'mktex.opt'.
+
+'fontmaps'
+ Instead of deriving the location of a font in the destination tree
+ from the location of the sources, the aliases and directory names
+ from the Fontname distribution are used. (*note Introduction:
+ (fontname)Top.).
+
+'nomfdrivers'
+ Let mktexpk and mktextfm create metafont driver files in a
+ temporary directory. These will be used for just one metafont run
+ and not installed permanently.
+
+'nomode'
+ Omit the directory level for the mode name; this is fine as long as
+ you generate fonts for only one mode.
+
+'stripsupplier'
+ Omit the font supplier name directory level.
+
+'striptypeface'
+ Omit the font typeface name directory level.
+
+'strip'
+ Omit the font supplier and typeface name directory levels. This
+ feature is deprecated in favour of 'stripsupplier' and
+ 'striptypeface'.
+
+'varfonts'
+ When this option is enabled, fonts that would otherwise be written
+ in system texmf tree go to the 'VARTEXFONTS' tree instead. The
+ default value in 'kpathsea/Makefile.in' is '/var/tmp/texfonts'.
+ The 'Linux File System Standard' recommends '/var/tex/fonts'.
+
+ The 'varfonts' setting in 'MT_FEATURES' is overridden by the
+ 'USE_VARTEXFONTS' environment variable: if set to '1', the feature
+ is enabled, and if set to '0', the feature is disabled.
+
+'texmfvar'
+ Force generated files that would go into a system tree (as defined
+ by 'SYSTEXMF') into 'TEXMFVAR'. Starting with teTeX-3.0, the
+ variable 'TEXMFVAR' is always set. The 'varfonts' feature takes
+ precedence if also set.
+
+ The 'texmfvar' setting in 'MT_FEATURES' is overridden by the
+ 'USE_TEXMFVAR' environment variable: if set to '1', the feature is
+ enabled, and if set to '0', the feature is disabled.
+
+
+File: kpathsea.info, Node: mktex script names, Next: mktex script arguments, Prev: mktex configuration, Up: mktex scripts
+
+6.5.2 'mktex' script names
+--------------------------
+
+The following table shows the default name of the script for each of the
+file types which support runtime generation.
+
+'mktexfmt'
+ ('.fmt', '.base', '.mem') TeX/Metafont/MetaPost formats. This
+ script is also named 'fmtutil', and reads 'fmtutil.cnf' for
+ configuration information.
+
+'mktexmf'
+ ('.mf') Metafont input files.
+
+'mkocp'
+ ('.ocp') Omega compiled process files.
+
+'mkofm'
+ ('.ofm') Omega font metric files.
+
+'mktexpk'
+ ('pk') Glyph fonts.
+
+'mktextex'
+ ('.tex') TeX input files (disabled by default).
+
+'mktextfm'
+ ('.tfm') TFM files.
+
+These names can be overridden by an environment variable specific to the
+program--for example, 'DVIPSMAKEPK' for Dvipsk.
+
+ If a 'mktex...' script fails, the invocation is appended to a file
+'missfont.log' (by default) in the current directory. You can then
+execute the log file to create the missing files after fixing the
+problem.
+
+ If the current directory is not writable and the environment variable
+or configuration file value 'TEXMFOUTPUT' is set, its value is used.
+Otherwise, nothing is written. The name 'missfont.log' is overridden by
+the 'MISSFONT_LOG' environment variable or configuration file value.
+
+
+File: kpathsea.info, Node: mktex script arguments, Prev: mktex script names, Up: mktex scripts
+
+6.5.3 'mktex' script arguments
+------------------------------
+
+The first argument to a 'mktex' script is always the name of the file to
+be created.
+
+ In the default 'mktexpk' implementation, additional arguments may
+also be passed:
+
+'--dpi NUM'
+ Sets the resolution of the generated font to NUM.
+'--mfmode NAME'
+ Sets the Metafont mode to NAME.
+'--bdpi NUM'
+ Sets the "base dpi" for the font. This must match the mode being
+ used.
+'--mag STRING'
+ A "magstep" string suitable for the Metafont 'mag' variable. This
+ must match the combination of BDPI and DPI being used.
+'--destdir STRING'
+ A directory name. If the directory is absolute, it is used as-is.
+ Otherwise, it is appended to the root destination directory set in
+ the script.
+
+
+File: kpathsea.info, Node: Programming, Next: Reporting bugs, Prev: TeX support, Up: Top
+
+7 Programming
+*************
+
+This chapter is for programmers who wish to use Kpathsea. *Note
+Introduction::, for the conditions under which you may do so (in short,
+it is released under LGPLv2.1 or later).
+
+* Menu:
+
+* Overview: Programming overview. Introduction.
+* Calling sequence:: Specifics of what to call.
+* Program-specific files:: How to handle these.
+* Config: Programming with config files. Getting info from texmf.cnf.
+
+
+File: kpathsea.info, Node: Programming overview, Next: Calling sequence, Up: Programming
+
+7.1 Programming overview
+========================
+
+Aside from this manual, your best source of information is the source to
+the programs that use Kpathsea (*note Introduction::). First, Kpsewhich
+is a small utility program whose sole purpose is to exercise the main
+path-searching functionality. Of the drivers, Dviljk is probably the
+simplest full application program. Xdvik adds VF support and the
+complication of X resources. Dvipsk adds the complication of its own
+config files. Web2c is source code I also maintain, so it uses Kpathsea
+rather straightforwardly, but is of course complicated by the Web to C
+translation.
+
+ When looking at these program sources, you should know that previous
+versions of the library had a different programming interface; the
+current interface supports re-entrancy. Historically, the library
+function names were prefixed with 'kpse_' instead of 'kpathsea_', and
+they did not need an instance variable as first argument. This change
+was made in 2009. The old functions will never disappear, and can
+reliably continue to be used when they suffice, as they do for the
+programs above. The main application using the re-entrant API is the
+MetaPost library used by MetaPost and LuaTeX.
+
+ Beyond these examples, the '.h' files in the Kpathsea source describe
+the interfaces and functionality (and of course the '.c' files define
+the actual routines, which are the ultimate documentation).
+'pathsearch.h' declares the basic searching routine. 'tex-file.h' and
+'tex-glyph.h' define the interfaces for looking up particular kinds of
+files. In view of the way the headers depend on each other, it is
+recommended to use '#include <kpathsea/kpathsea.h>', which includes
+every Kpathsea header.
+
+ If you want to include only specific headers, you should still
+consider including 'kpathsea/config.h' before including any other
+Kpathsea header, as it provides symbols used in the other headers. Note
+that 'kpathsea/config.h' includes 'kpathsea/c-auto.h', which is
+generated by Autoconf.
+
+ The library provides no way for an external program to register new
+file types: 'tex-file.[ch]' must be modified to do this. For example,
+Kpathsea has support for looking up Dvips config files, even though no
+program other than Dvips will likely ever want to do so. I felt this
+was acceptable, since along with new file types should also come new
+defaults in 'texmf.cnf' (and its descendant 'paths.h'), since it's
+simplest for users if they can modify one configuration file for all
+kinds of paths.
+
+ Kpathsea does not parse any formats itself; it barely opens any
+files. Its primary purpose is to return filenames. The GNU font
+utilities does contain libraries to read TFM, GF, and PK files, as do
+the programs above, of course.
+
+
+File: kpathsea.info, Node: Calling sequence, Next: Program-specific files, Prev: Programming overview, Up: Programming
+
+7.2 Calling sequence
+====================
+
+The typical way to use Kpathsea in your program goes something like
+this:
+
+ 1. Call 'kpathsea_new' to create a new library instance. This
+ variable must be passed as the first argument to all the following
+ library functions. The rest of this manual will be using 'kpse' as
+ a placeholder for the name of this variable.
+
+ 2. Call 'kpathsea_set_program_name' with 'argv[0]' as the second
+ argument; the third argument is a string or 'NULL'. The third
+ argument is used by Kpathsea as the program name for the '.PROGRAM'
+ feature of config files (*note Config files::). If the third
+ argument is 'NULL', the value of the second argument is used. This
+ function must be called before any other use of the Kpathsea
+ library.
+
+ 'kpathsea_set_program_name' always sets the variables
+ 'kpse->invocation_name' and 'kpse->invocation_short_name'. These
+ variables are used in the error message macros defined in
+ 'kpathsea/lib.h'. It sets the variable 'kpse->program_name' to the
+ program name it uses.
+
+ It also initializes debugging options based on the environment
+ variable 'KPATHSEA_DEBUG' (if that is set).
+
+ Finally, it sets the environment variables 'SELFAUTOLOC',
+ 'SELFAUTODIR' and 'SELFAUTOPARENT' to the location, parent and
+ grandparent directory of the executable, removing '.' and '..' path
+ elements and resolving symbolic links. These are used in the
+ default configuration file to allow people to invoke TeX from
+ anywhere. You can use 'kpsewhich --expand-var=\$SELFAUTOLOC',
+ etc., to see the values.
+
+ 3. Set debugging options. *Note Debugging::. If your program doesn't
+ have a debugging option already, you can define one and set
+ 'kpse->debug' to the number that the user supplies (as in Dviljk
+ and Web2c), or you can just omit this altogether (people can always
+ set 'KPATHSEA_DEBUG'). If you do have runtime debugging already,
+ you need to merge Kpathsea's options with yours (as in Dvipsk and
+ Xdvik).
+
+ 4. If your program has its own configuration files that can define
+ search paths, you should assign those paths to the 'client_path'
+ member in the appropriate element of the 'kpse->format_info' array.
+ (This array is indexed by file type; see 'tex-file.h'.) See
+ 'resident.c' in Dvipsk for an example.
+
+ 5. Call 'kpathsea_init_prog' (see 'proginit.c'). It's useful for the
+ DVI drivers, at least, but for other programs it may be simpler to
+ extract the parts of it that actually apply. This does not
+ initialize any paths, it just looks for (and sets) certain
+ environment variables and other random information. (A search path
+ is always initialized at the first call to find a file of that
+ type; this eliminates much useless work, e.g., initializing the
+ BibTeX search paths in a DVI driver.)
+
+ 6. The routine to actually find a file of type FORMAT is
+ 'kpathsea_find_file'. You can call 'kpathsea_find_file' after
+ doing only the first and second of the initialization steps
+ above--Kpathsea automatically reads the 'texmf.cnf' generic config
+ files, looks for environment variables, and does expansions at the
+ first lookup.
+
+ 7. To find PK and/or GF bitmap fonts, the routine is
+ 'kpathsea_find_glyph', defined in 'tex-glyph.h'. This returns a
+ structure in addition to the resultant filename, because fonts can
+ be found in so many ways. See the documentation in the source.
+
+ 8. To actually open a file, not just return a filename, call
+ 'kpathsea_open_file'. This function takes the name to look up and
+ a Kpathsea file format as arguments, and returns the usual 'FILE
+ *'. It always assumes the file must exist, and thus will search
+ the disk if necessary (unless the search path specified '!!',
+ etc.). In other words, if you are looking up a VF or some other
+ file that need not exist, don't use this.
+
+ 9. TeX can write output files, via the '\openout' primitive; this
+ opens a security hole vulnerable to Trojan horse attack: an
+ unwitting user could run a TeX program that overwrites, say,
+ '~/.rhosts'. Analogous security holes exist for many other
+ programs. To alleviate this, there is a configuration variable
+ 'openout_any', which selects one of three levels of security. When
+ it is set to 'a' (for "any"), no restrictions are imposed. When it
+ is set to 'r' (for "restricted"), filenames beginning with '.' are
+ disallowed (except '.tex' because LaTeX needs it). When it is set
+ to 'p' (for "paranoid") additional restrictions are imposed: an
+ absolute filename must refer to a file in (a subdirectory) of
+ 'TEXMFOUTPUT', and any attempt to go up a directory level is
+ forbidden (that is, paths may not contain a '..' component). The
+ paranoid setting is the default. (For backwards compatibility, 'y'
+ and '1' are synonyms of 'a', while 'n' and '0' are synonyms for
+ 'r'.) The function 'kpathsea_out_name_ok', with a filename as
+ second argument, returns 'true' if that filename is acceptable to
+ be opend for output or 'false' otherwise.
+
+ 10. Similarly, the function 'kpathsea_in_name_ok', with a filename as
+ second argument, returns 'true' if that filename is acceptable to
+ be opend for input or 'false' otherwise, depending on the value of
+ the configuration variable 'openin_any' (with 'a' as default).
+
+ 11. To close the kpathsea library instance you are using, call
+ 'kpathsea_finish'. This function closes any open log files and
+ frees the memory used by the instance.
+
+ Kpathsea also provides many utility routines. Some are generic: hash
+tables, memory allocation, string concatenation and copying, string
+lists, reading input lines of arbitrary length, etc. Others are
+filename-related: default path, tilde, and variable expansion, 'stat'
+calls, etc. (Perhaps someday I'll move the former to a separate
+library.)
+
+ The 'c-*.h' header files can also help your program adapt to many
+different systems. You will almost certainly want to use Autoconf and
+probably Automake for configuring and building your software if you use
+Kpathsea; I strongly recommend using Autoconf and Automake regardless.
+They are available from <https://gnu.org/software>.
+
+
+File: kpathsea.info, Node: Program-specific files, Next: Programming with config files, Prev: Calling sequence, Up: Programming
+
+7.3 Program-specific files
+==========================
+
+Many programs will need to find some configuration files. Kpathsea
+contains some support to make it easy to place them in their own
+directories. The Standard TeX directory structure (*note Introduction:
+(tds)Top.), specifies that such files should go into a subdirectory
+named after the program, like 'texmf/ttf2pk'.
+
+ Two formats, 'kpse_program_text_format' and
+'kpse_program_binary_format', use '.:$TEXMF/PROGRAM//' as their
+compiled-in search path. To override this default, you can use the
+variable 'PROGRAMINPUTS' in the environment and/or 'texmf.cnf'. That is
+to say, the name of the variable is constructed by converting the name
+of the program to upper case, and appending 'INPUTS'.
+
+ The only difference between these two formats is whether
+'kpathsea_open_file' will open the files it finds in text or binary
+mode.
+
+
+File: kpathsea.info, Node: Programming with config files, Prev: Program-specific files, Up: Programming
+
+7.4 Programming with config files
+=================================
+
+You can (and probably should) use the same 'texmf.cnf' configuration
+file that Kpathsea uses for your program. This helps installers by
+keeping all configuration in one place.
+
+ To retrieve a value for a configuration variable VAR, the best way is
+to call 'kpathsea_var_value' on the string 'VAR'. This will look first
+for an environment variable VAR, then a config file value. The result
+will be the value found or 'NULL'. This function is declared in
+'kpathsea/variable.h'. For an example, see the 'shell_escape' code in
+'web2c/lib/texmfmp.c'.
+
+ The routine to do full variable and tilde expansion of an arbitrary
+string in the context of a search path (as opposed to simply retrieving
+a value) is 'kpathsea_var_expand', also declared in
+'kpathsea/variable.h'. However, it's generally only necessary to set
+the search path structure components as explained in the previous
+section instead of using this directly. Because of its usage with any
+input string, undefined '$FOO' constructs in the argument to
+'kpathsea_var_expand' are returned literally ('"$FOO"'), while undefined
+'${FOO}' constructs are expanded to the empty string.
+
+ If for some reason you want to retrieve a value _only_ from a config
+file, not automatically looking for a corresponding environment
+variable, call 'kpathsea_cnf_get' (declared in 'kpathsea/cnf.h') with
+the string VAR.
+
+ No initialization calls are needed.
+
+
+File: kpathsea.info, Node: Reporting bugs, Next: Index, Prev: Programming, Up: Top
+
+8 Reporting bugs
+****************
+
+If you have problems or suggestions, please report them to
+<tex-k@tug.org> using the bug checklist below.
+
+ Please report bugs in the documentation; not only factual errors or
+inconsistent behavior, but unclear or incomplete explanations, typos,
+wrong fonts, ...
+
+* Menu:
+
+* Bug checklist:: What to include in a good bug report.
+* Mailing lists:: Joining the bugs or announcements mailing lists.
+* Debugging:: Analyzing runtime problems.
+* Logging:: Recording searches.
+* Common problems:: When things go wrong.
+
+
+File: kpathsea.info, Node: Bug checklist, Next: Mailing lists, Up: Reporting bugs
+
+8.1 Bug checklist
+=================
+
+Before reporting a bug, please check below to be sure it isn't already
+known (*note Common problems::).
+
+ Bug reports should be sent via electronic mail to <tex-k@tug.org>.
+
+ The general principle is that a good bug report includes all the
+information necessary for reproduction. Therefore, to enable
+investigation, your report should include the following:
+
+ * The version number(s) of the program(s) involved, and of Kpathsea
+ itself. You can get the former by giving a sole option '--version'
+ to the program, and the latter by running 'kpsewhich --version'.
+ The 'NEWS' and 'ChangeLog' files also contain the version number.
+
+ * The hardware, operating system (including version), compiler, and
+ 'make' program you are using (the output of 'uname -a' is a start
+ on the first two, though incomplete).
+
+ * Any options you gave to 'configure'. This is recorded in the
+ 'config.status' files.
+
+ If you are reporting a bug in 'configure' itself, it's probably
+ system-dependent, and it will be unlikely the maintainers can do
+ anything useful if you merely report that thus-and-such is broken.
+ Therefore, you need to do some additional work: for some bugs, you
+ can look in the file 'config.log' where the test that failed should
+ appear, along with the compiler invocation and source program in
+ question. You can then compile it yourself by hand, and discover
+ why the test failed. Other 'configure' bugs do not involve the
+ compiler; in that case, the only recourse is to inspect the
+ 'configure' shell script itself, or the Autoconf macros that
+ generated 'configure'.
+
+ * The log of all debugging output, if the bug is in path searching.
+ You can get this by setting the environment variable
+ 'KPATHSEA_DEBUG' to '-1' before running the program. Please look
+ at the log yourself to make sure the behavior is really a bug
+ before reporting it; perhaps "old" environment variable settings
+ are causing files not to be found, for example.
+
+ * The contents of any input files necessary to reproduce the bug.
+ For bugs in DVI-reading programs, for example, this generally means
+ a DVI file (and any EPS or other files it uses)--TeX source files
+ are helpful, but the DVI file is required, because that's the
+ actual program input.
+
+ * If you are sending a patch (do so if you can!), please do so in the
+ form of a context diff ('diff -c') against the original
+ distribution source. Any other form of diff is either not as
+ complete or harder for me to understand. Please also include a
+ 'ChangeLog' entry.
+
+ * If the bug involved is an actual crash (i.e., core dump), it is
+ easy and useful to include a stack trace from a debugger (I
+ recommend the GNU debugger GDB (<https://gnu.org/software/gdb>).
+ If the cause is apparent (a 'NULL' value being dereferenced, for
+ example), please send the details along. If the program involved
+ is TeX or Metafont, and the crash is happening at apparently-sound
+ code, however, the bug may well be in the compiler, rather than in
+ the program or the library (*note TeX or Metafont failing: TeX or
+ Metafont failing.).
+
+ * Any additional information that will be helpful in reproducing,
+ diagnosing, or fixing the bug.
+
+
+File: kpathsea.info, Node: Mailing lists, Next: Debugging, Prev: Bug checklist, Up: Reporting bugs
+
+8.2 Mailing lists
+=================
+
+Web2c and Kpathsea in general are discussed on the mailing list
+<tex-k@tug.org>. You can subscribe and peruse the archives on the web
+<https://lists.tug.org/tex-k>.
+
+ You do not need to join to submit a report, nor will it affect
+whether you get a response. Be aware that large data files are
+sometimes included in bug reports. If this is a problem for you, do not
+join the list.
+
+ If you are looking for general TeX help, such as how to install a
+full TeX system or how to use LaTeX, please see
+<https://tug.org/begin.html>.
+
+
+File: kpathsea.info, Node: Debugging, Next: Logging, Prev: Mailing lists, Up: Reporting bugs
+
+8.3 Debugging
+=============
+
+Kpathsea provides a number of runtime debugging options, detailed below
+by their names and corresponding numeric values. When the files you
+expect aren't being found, the thing to do is enable these options and
+examine the output.
+
+ You can set these with some runtime argument (e.g., '-d') to the
+program; in that case, you should use the numeric values described in
+the program's documentation (which, for Dvipsk and Xdvik, are different
+than those below). It's best to give the '-d' (or whatever) option
+first, for maximal output. Dvipsk and Xdvik have additional
+program-specific debugging options as well.
+
+ You can also set the environment variable 'KPATHSEA_DEBUG'; in this
+case, you should use the numbers below. If you run the program under a
+debugger and set the instance variable 'kpse->debug', also use the
+numbers below.
+
+ In any case, by far the simplest value to use is '-1', which will
+turn on all debugging output. This is usually better than guessing
+which particular values will yield the output you need.
+
+ Debugging output always goes to standard error, so you can redirect
+it easily. For example, in Bourne-compatible shells:
+ dvips -d -1 ... 2>/tmp/debug
+
+ It is sometimes helpful to run the standalone Kpsewhich utility
+(*note Invoking kpsewhich::), instead of the original program.
+
+ In any case, you cannot use the names below; you must always use
+somebody's numbers. (Sorry.) To set more than one option, just sum the
+corresponding numbers.
+
+'KPSE_DEBUG_STAT (1)'
+ Report 'stat'(2) calls. This is useful for verifying that your
+ directory structure is not forcing Kpathsea to do many additional
+ file tests (*note Slow path searching::, and *note Subdirectory
+ expansion::). If you are using an up-to-date 'ls-R' database
+ (*note Filename database::), this should produce no output unless a
+ nonexistent file that must exist is searched for.
+
+'KPSE_DEBUG_HASH (2)'
+ Report lookups in all hash tables: 'ls-R' and 'aliases' (*note
+ Filename database::); font aliases (*note Fontmap::); and config
+ file values (*note Config files::). Useful when expected values
+ are not being found, e.g.., file searches are looking at the disk
+ instead of using 'ls-R'.
+
+'KPSE_DEBUG_FOPEN (4)'
+ Report file openings and closings. Especially useful when your
+ system's file table is full, for seeing which files have been
+ opened but never closed. In case you want to set breakpoints in a
+ debugger: this works by redefining 'fopen' ('fclose') to be
+ 'kpse_fopen_trace' ('kpse_fclose_trace').
+
+'KPSE_DEBUG_PATHS (8)'
+ Report general path information for each file type Kpathsea is
+ asked to search. This is useful when you are trying to track down
+ how a particular path got defined--from 'texmf.cnf', 'config.ps',
+ an environment variable, the compile-time default, etc. This is
+ the contents of the 'kpse_format_info_type' structure defined in
+ 'tex-file.h'.
+
+'KPSE_DEBUG_EXPAND (16)'
+ Report the directory list corresponding to each path element
+ Kpathsea searches. This is only relevant when Kpathsea searches
+ the disk, since 'ls-R' searches don't look through directory lists
+ in this way.
+
+'KPSE_DEBUG_SEARCH (32)'
+ Report on each file search: the name of the file searched for, the
+ path searched in, whether or not the file must exist (when drivers
+ search for 'cmr10.vf', it need not exist), and whether or not we
+ are collecting all occurrences of the file in the path (as with,
+ e.g., 'texmf.cnf' and 'texfonts.map'), or just the first (as with
+ most lookups). This can help you correlate what Kpathsea is doing
+ with what is in your input file.
+
+'KPSE_DEBUG_VARS (64)'
+ Report the value of each variable Kpathsea looks up. This is
+ useful for verifying that variables do indeed obtain their correct
+ values.
+
+'GSFTOPK_DEBUG (128)'
+ Activates debugging printout specific to 'gsftopk' program.
+
+'MAKETEX_DEBUG (512)'
+ If you use the optional 'mktex' programs instead of the traditional
+ shell scripts, this will report the name of the site file
+ ('mktex.cnf' by default) which is read, directories created by
+ 'mktexdir', the full path of the 'ls-R' database built by
+ 'mktexlsr', font map searches, 'MT_FEATURES' in effect, parameters
+ from 'mktexnam', filenames added by 'mktexupd', and some subsidiary
+ commands run by the programs.
+
+'MAKETEX_FINE_DEBUG (1024)'
+ When the optional 'mktex' programs are used, this will print
+ additional debugging info from functions internal to these
+ programs.
+
+ Debugging output from Kpathsea is always written to standard error,
+and begins with the string 'kdebug:'. (Except for hash table buckets,
+which just start with the number, but you can only get that output
+running under a debugger. See comments at the 'hash_summary_only'
+variable in 'kpathsea/db.c'.)
+
+
+File: kpathsea.info, Node: Logging, Next: Common problems, Prev: Debugging, Up: Reporting bugs
+
+8.4 Logging
+===========
+
+Kpathsea can record the time and filename found for each successful
+search. This may be useful in finding good candidates for deletion when
+your filesystem is full, or in discovering usage patterns at your site.
+
+ To do this, define the environment or config file variable
+'TEXMFLOG'. The value is the name of the file to append the information
+to. The file is created if it doesn't exist, and appended to if it
+does.
+
+ Each successful search turns into one line in the log file: two words
+separated by a space. The first word is the time of the search, as the
+integer number of seconds since "the epoch", i.e., UTC midnight 1
+January 1970 (more precisely, the result of the 'time' system call).
+The second word is the filename.
+
+ For example, after 'setenv TEXMFLOG /tmp/log', running Dvips on
+'story.dvi' appends the following lines:
+
+ 774455887 /usr/local/share/texmf/dvips/config.ps
+ 774455887 /usr/local/share/texmf/dvips/psfonts.map
+ 774455888 /usr/local/share/texmf/dvips/texc.pro
+ 774455888 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmbx10.600pk
+ 774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmsl10.600pk
+ 774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
+ 774455889 /usr/local/share/texmf/dvips/texc.pro
+
+Only filenames that are absolute are recorded, to preserve some
+semblance of privacy.
+
+ In addition to this Kpathsea-specific logging, 'pdftex' provides an
+option '-recorder' to write the names of all files accessed during a run
+to the file 'BASEFILE.fls'.
+
+ Finally, most systems provide a general tool to output each system
+call, thus including opening and closing files. It might be named
+'strace', 'truss', 'struss', or something else.
+
+
+File: kpathsea.info, Node: Common problems, Prev: Logging, Up: Reporting bugs
+
+8.5 Common problems
+===================
+
+Here are some common problems with configuration, compilation, linking,
+execution, ...
+
+* Menu:
+
+* Unable to find files:: If your program can't find fonts (or whatever).
+* Slow path searching:: If it takes forever to find anything.
+* Unable to generate fonts:: If mktexpk fails.
+* TeX or Metafont failing:: Likely compiler bugs.
+
+
+File: kpathsea.info, Node: Unable to find files, Next: Slow path searching, Up: Common problems
+
+8.5.1 Unable to find files
+--------------------------
+
+If a program complains it cannot find fonts (or other input files), any
+of several things might be wrong. In any case, you may find the
+debugging options helpful. *Note Debugging::.
+
+ * Perhaps you simply haven't installed all the necessary files; the
+ basic fonts and input files are distributed separately from the
+ programs. *Note unixtex.ftp::.
+
+ * You have (perhaps unknowingly) told Kpathsea to use search paths
+ that don't reflect where the files actually are. One common cause
+ is having environment variables set from a previous installation,
+ thus overriding what you carefully set in 'texmf.cnf' (*note
+ Supported file formats::). System '/etc/profile' or other files
+ such may be the culprit.
+
+ * Your files reside in a directory that is only pointed to via a
+ symbolic link, in a leaf directory and is not listed in 'ls-R'.
+
+ Unfortunately, Kpathsea's subdirectory searching has an
+ irremediable deficiency: If a directory D being searched for
+ subdirectories contains plain files and symbolic links to other
+ directories, but no true subdirectories, D will be considered a
+ leaf directory, i.e., the symbolic links will not be followed.
+ *Note Subdirectory expansion::.
+
+ You can work around this problem by creating an empty dummy
+ subdirectory in D. Then D will no longer be a leaf, and the
+ symlinks will be followed.
+
+ The directory immediately followed by the '//' in the path
+ specification, however, is always searched for subdirectories, even
+ if it is a leaf. Presumably you would not have asked for the
+ directory to be searched for subdirectories if you didn't want it
+ to be.
+
+ * If the fonts (or whatever) don't already exist, 'mktexpk' (or
+ 'mktexmf' or 'mktextfm') will try to create them. If these rather
+ complicated shell scripts fail, you'll eventually get an error
+ message saying something like 'Can't find font FONTNAME'. The best
+ solution is to fix (or at least report) the bug in 'mktexpk'; the
+ workaround is to generate the necessary fonts by hand with
+ Metafont, or to grab them from a CTAN site (*note unixtex.ftp::).
+
+ * There is a bug in the library. *Note Reporting bugs::.
+
+
+File: kpathsea.info, Node: Slow path searching, Next: Unable to generate fonts, Prev: Unable to find files, Up: Common problems
+
+8.5.2 Slow path searching
+-------------------------
+
+If your program takes an excessively long time to find fonts or other
+input files, but does eventually succeed, here are some possible
+culprits:
+
+ * Most likely, you just have a lot of directories to search, and that
+ takes a noticeable time. The solution is to create and maintain a
+ separate 'ls-R' file that lists all the files in your main TeX
+ hierarchy. *Note Filename database::. Kpathsea always uses 'ls-R'
+ if it's present; there's no need to recompile or reconfigure any of
+ the programs.
+
+ * Your recursively-searched directories (e.g.,
+ '/usr/local/share/texmf/fonts//'), contain a mixture of files and
+ directories. This prevents Kpathsea from using a useful
+ optimization (*note Subdirectory expansion::).
+
+ It is best to have only directories (and perhaps a 'README') in the
+ upper levels of the directory structure, and it's very important to
+ have _only_ files, and no subdirectories, in the leaf directories
+ where the dozens of TFM, PK, or whatever files reside.
+
+ In any case, you may find the debugging options helpful in
+determining precisely when the disk or network is being pounded. *Note
+Debugging::.
+
+
+File: kpathsea.info, Node: Unable to generate fonts, Next: TeX or Metafont failing, Prev: Slow path searching, Up: Common problems
+
+8.5.3 Unable to generate fonts
+------------------------------
+
+Metafont outputs fonts in bitmap format, tuned for a particular device
+at a particular resolution, in order to allow for the highest-possible
+quality of output. Some DVI-to-whatever programs, such as Dvips, try to
+generate these on the fly when they are needed, but this generation may
+fail in several cases.
+
+ If 'mktexpk' runs, but fails with this error:
+ mktexpk: Can't guess mode for NNN dpi devices.
+ mktexpk: Use a config file to specify the mode, or update me.
+ you need to ensure the resolution and mode match; just specifying the
+resolution, as in '-D 360', is not enough.
+
+ You can specify the mode name with the '-mode' option on the Dvips
+command line, or in a Dvips configuration file (*note (dvips)Config
+files::), such as 'config.ps' in your document directory, '~/.dvipsrc'
+in your home directory, or in a system directory (again named
+'config.ps'). (Other drivers use other files, naturally.)
+
+ For example, if you need 360dpi fonts, you could include this in a
+configuration file:
+ D 360
+ M lqmed
+
+ If Metafont runs, but generates fonts at the wrong resolution or for
+the wrong device, most likely 'mktexpk''s built-in guess for the mode is
+wrong, and you should override it as above.
+
+ See <https://ctan.org/pkg/modes> for a list of resolutions and mode
+names for most devices (additional submissions are welcome).
+
+ If Metafont runs but generates fonts at a resolution of 2602dpi (and
+prints out the name of each character as well as just a character
+number, and maybe tries to display the characters), then your Metafont
+base file probably hasn't been made properly. (It's using the default
+'proof' mode, instead of an actual device mode.) To make a proper
+'plain.base', assuming the local mode definitions are contained in a
+file 'modes.mf', run the following command (assuming Unix):
+
+ inimf "plain; input modes; dump"
+
+Then copy the 'plain.base' file from the current directory to where the
+base files are stored on your system ('/usr/local/share/texmf/web2c' by
+default), and make a link (either hard or soft) from 'plain.base' to
+'mf.base' in that directory. *Note (web2c)inimf invocation::.
+
+ If 'mf' is a command not found at all by 'mktexpk', then you need to
+install Metafont (*note unixtex.ftp::).
+
+
+File: kpathsea.info, Node: TeX or Metafont failing, Prev: Unable to generate fonts, Up: Common problems
+
+8.5.4 TeX or Metafont failing
+-----------------------------
+
+If TeX or Metafont get a segmentation fault or otherwise fail while
+running a normal input file, the problem is usually a compiler bug
+(unlikely as that may sound). Even if the trip and trap tests are
+passed, problems may lurk. Optimization occasionally causes trouble in
+programs other than TeX and Metafont themselves, too.
+
+ For a workaround, if you enabled any optimization flags, it's best to
+omit optimization entirely. In any case, the way to find the facts is
+to run the program under the debugger and see where it's failing.
+
+ Also, if you have trouble with a system C compiler, I advise trying
+the GNU C compiler. And vice versa, unfortunately; but in that case I
+also recommend reporting a bug to the GCC mailing list; see *note
+(gcc)Bugs::.
+
+ To report compiler bugs effectively requires perseverance and
+perspicacity: you must find the miscompiled line, and that usually
+involves delving backwards in time from the point of error, checking
+through TeX's (or whatever program's) data structures. Good luck.
+
+
+File: kpathsea.info, Node: Index, Prev: Reporting bugs, Up: Top
+
+Index
+*****
+
+
+* Menu:
+
+* !! and casefolding: Casefolding examples.
+ (line 57)
+* !! in path specifications: ls-R. (line 57)
+* !! in 'TEXMFDBS': ls-R. (line 11)
+* $ expansion: Variable expansion. (line 6)
+* --all: Path searching options.
+ (line 12)
+* --casefold-search: Path searching options.
+ (line 19)
+* --cnf-line: Path searching options.
+ (line 28)
+* '--cnf-line', source for path: Path sources. (line 9)
+* --color=tty: ls-R. (line 25)
+* --debug=NUM: Auxiliary tasks. (line 9)
+* --dpi=NUM: Path searching options.
+ (line 49)
+* --engine=NAME: Path searching options.
+ (line 53)
+* --expand-braces=STRING: Auxiliary tasks. (line 12)
+* --expand-path=STRING: Auxiliary tasks. (line 16)
+* --expand-var=STRING: Auxiliary tasks. (line 34)
+* --format=NAME: Path searching options.
+ (line 69)
+* --help: Standard options. (line 8)
+* --help-formats: Auxiliary tasks. (line 42)
+* --interactive: Path searching options.
+ (line 151)
+* --mktex=FILETYPE: Path searching options.
+ (line 156)
+* --mode=STRING: Path searching options.
+ (line 162)
+* --must-exist: Path searching options.
+ (line 167)
+* --no-casefold-search: Path searching options.
+ (line 19)
+* --no-mktex=FILETYPE: Path searching options.
+ (line 156)
+* --path=STRING: Path searching options.
+ (line 172)
+* --progname=NAME: Path searching options.
+ (line 180)
+* --safe-in-name=NAME: Auxiliary tasks. (line 48)
+* --safe-out-name=NAME: Auxiliary tasks. (line 48)
+* --show-path=NAME: Auxiliary tasks. (line 54)
+* --subdir=STRING: Path searching options.
+ (line 185)
+* --var-brace-value=VARIABLE: Auxiliary tasks. (line 60)
+* --var-value=VARIABLE: Auxiliary tasks. (line 74)
+* --version: Standard options. (line 11)
+* --with-mktextex-default: mktex configuration. (line 12)
+* --without-mktexfmt-default: mktex configuration. (line 12)
+* --without-mktexmf-default: mktex configuration. (line 12)
+* --without-mktexocp-default: mktex configuration. (line 12)
+* --without-mktexofm-default: mktex configuration. (line 12)
+* --without-mktexpk-default: mktex configuration. (line 12)
+* --without-mktextfm-default: mktex configuration. (line 12)
+* -1 debugging value: Debugging. (line 23)
+* -A option to 'ls': ls-R. (line 39)
+* -D NUM: Path searching options.
+ (line 49)
+* -iname, find predicate: Casefolding examples.
+ (line 78)
+* -L option to 'ls': ls-R. (line 44)
+* . directories, ignored: ls-R. (line 39)
+* . files: ls-R. (line 39)
+* .2602gf: Unable to generate fonts.
+ (line 36)
+* .afm: Supported file formats.
+ (line 22)
+* .base: Supported file formats.
+ (line 26)
+* .bib: Supported file formats.
+ (line 30)
+* .bltxml: Supported file formats.
+ (line 34)
+* .bst: Supported file formats.
+ (line 38)
+* .cid: Supported file formats.
+ (line 68)
+* .cmap: Supported file formats.
+ (line 46)
+* .cnf: Supported file formats.
+ (line 49)
+* .dll: Supported file formats.
+ (line 42)
+* .enc: Supported file formats.
+ (line 61)
+* .eps: Supported file formats.
+ (line 79)
+* .epsi: Supported file formats.
+ (line 79)
+* .fea: Supported file formats.
+ (line 71)
+* .fmt: Supported file formats.
+ (line 64)
+* .ist: Supported file formats.
+ (line 84)
+* .lig: Supported file formats.
+ (line 88)
+* .map: Supported file formats.
+ (line 94)
+* .mem: Supported file formats.
+ (line 97)
+* .mf: Supported file formats.
+ (line 105)
+* .mft: Supported file formats.
+ (line 113)
+* .mlbib: Supported file formats.
+ (line 121)
+* .mlbst: Supported file formats.
+ (line 125)
+* .mp: Supported file formats.
+ (line 129)
+* .ocp: Supported file formats.
+ (line 137)
+* .ofm: Supported file formats.
+ (line 141)
+* .opl: Supported file formats.
+ (line 148)
+* .otp: Supported file formats.
+ (line 151)
+* .ovf: Supported file formats.
+ (line 154)
+* .ovp: Supported file formats.
+ (line 157)
+* .pfa: Supported file formats.
+ (line 211)
+* .pfb: Supported file formats.
+ (line 211)
+* .pk: Supported file formats.
+ (line 164)
+* .pool: Supported file formats.
+ (line 109)
+* .pool <1>: Supported file formats.
+ (line 133)
+* .pool <2>: Supported file formats.
+ (line 195)
+* .pro: Supported file formats.
+ (line 169)
+* .PROGNAME qualifier in 'texmf.cnf': Config files. (line 50)
+* .rhosts, writable by TeX: Security. (line 10)
+* .ris: Supported file formats.
+ (line 173)
+* .sfd: Supported file formats.
+ (line 177)
+* .so: Supported file formats.
+ (line 42)
+* .tex: Supported file formats.
+ (line 180)
+* .tex file, included in 'ls-R': ls-R. (line 39)
+* .tfm: Supported file formats.
+ (line 199)
+* .ttc: Supported file formats.
+ (line 207)
+* .ttf: Supported file formats.
+ (line 207)
+* .vf: Supported file formats.
+ (line 219)
+* .w: Supported file formats.
+ (line 53)
+* .web: Supported file formats.
+ (line 53)
+* .web <1>: Supported file formats.
+ (line 223)
+* / may not be /: Searching overview. (line 13)
+* /, trailing in home directory: Tilde expansion. (line 19)
+* //: Subdirectory expansion.
+ (line 6)
+* /etc/profile: Unable to find files.
+ (line 14)
+* /etc/profile and aliases: ls-R. (line 25)
+* /var/tmp/texfonts: mktex configuration. (line 113)
+* 2602gf: Unable to generate fonts.
+ (line 36)
+* 8.3 filenames, using: mktex configuration. (line 68)
+* : may not be :: Searching overview. (line 13)
+* :: expansion: Default expansion. (line 6)
+* ; translated to ':' in 'texmf.cnf': Config files. (line 66)
+* = omitted in 'texmf.cnf' and misparsing: Config files. (line 93)
+* \, line continuation in 'texmf.cnf': Config files. (line 37)
+* \openin: Searching overview. (line 31)
+* \special, suppressing warnings about: Suppressing warnings.
+ (line 31)
+* { expansion: Brace expansion. (line 6)
+* ~ expansion: Tilde expansion. (line 6)
+* absolute filenames: Searching overview. (line 58)
+* access system call: Casefolding examples.
+ (line 86)
+* access warnings: Searching overview. (line 63)
+* AFMFONTS: Supported file formats.
+ (line 22)
+* aliases for fonts: Fontmap. (line 6)
+* aliases, for filenames: Filename aliases. (line 6)
+* all: Suppressing warnings.
+ (line 13)
+* all matches, finding: Path searching options.
+ (line 12)
+* alphabetical order, not: Subdirectory expansion.
+ (line 6)
+* announcement mailing list: Mailing lists. (line 6)
+* API, re-entrant: Programming overview.
+ (line 16)
+* append-only directories and 'mktexpk': Security. (line 36)
+* appendonlydir: mktex configuration. (line 60)
+* Apple filesystem, case-insensitive: Casefolding rationale.
+ (line 6)
+* arguments to 'mktex': mktex script arguments.
+ (line 6)
+* argv[0]: Calling sequence. (line 14)
+* autoconf, recommended: Calling sequence. (line 117)
+* automounter, and 'ls-R': ls-R. (line 46)
+* auxiliary tasks: Auxiliary tasks. (line 6)
+* Bach, Johann Sebastian: Default expansion. (line 41)
+* backslash-newline: Config files. (line 37)
+* basic glyph lookup: Basic glyph lookup. (line 6)
+* Berry, Karl: History. (line 12)
+* BIBINPUTS: Supported file formats.
+ (line 30)
+* BIBINPUTS <1>: Supported file formats.
+ (line 121)
+* blank lines, in 'texmf.cnf': Config files. (line 35)
+* BLTXMLINPUTS: Supported file formats.
+ (line 34)
+* brace expansion: Brace expansion. (line 6)
+* Breitenlohner, Peter: History. (line 78)
+* BSTINPUTS: Supported file formats.
+ (line 38)
+* BSTINPUTS <1>: Supported file formats.
+ (line 125)
+* bug address: Reporting bugs. (line 6)
+* bug checklist: Bug checklist. (line 6)
+* bug mailing list: Mailing lists. (line 6)
+* bugs, reporting: Reporting bugs. (line 6)
+* c-*.h: Calling sequence. (line 117)
+* c-auto.h: Programming overview.
+ (line 35)
+* cache of fonts, local: Security. (line 22)
+* calling sequence: Calling sequence. (line 6)
+* casefolding examples: Casefolding examples.
+ (line 6)
+* casefolding fallback rationale: Casefolding rationale.
+ (line 6)
+* casefolding search: Casefolding search. (line 6)
+* ChangeLog entry: Bug checklist. (line 52)
+* checklist for bug reports: Bug checklist. (line 6)
+* checksum: Suppressing warnings.
+ (line 16)
+* circle fonts: Fontmap. (line 19)
+* client_path in 'kpse->format_info': Calling sequence. (line 47)
+* CLUAINPUTS: Supported file formats.
+ (line 42)
+* CMAPFONTS: Supported file formats.
+ (line 46)
+* cmr10, as fallback font: Fallback font. (line 15)
+* cmr10.vf: Searching overview. (line 31)
+* cnf.c: Config files. (line 112)
+* cnf.h: Programming with config files.
+ (line 27)
+* comments, in fontmap files: Fontmap. (line 27)
+* comments, in 'texmf.cnf': Config files. (line 27)
+* comments, making: Introduction. (line 29)
+* common features in glyph lookup: Basic glyph lookup. (line 6)
+* common problems: Common problems. (line 6)
+* compilation value, source for path: Path sources. (line 23)
+* compiler bugs: TeX or Metafont failing.
+ (line 6)
+* compiler bugs, finding: TeX or Metafont failing.
+ (line 21)
+* conditions for use: Introduction. (line 32)
+* config files: Config files. (line 6)
+* config files, for Kpathsea-using programs: Calling sequence.
+ (line 47)
+* config files, programming with: Programming with config files.
+ (line 6)
+* config.h: Programming overview.
+ (line 35)
+* config.log: Bug checklist. (line 24)
+* config.ps: Specially-recognized files.
+ (line 16)
+* config.ps, search path for: Supported file formats.
+ (line 57)
+* config.status: Bug checklist. (line 27)
+* configuration bugs: Bug checklist. (line 27)
+* configuration file, source for path: Path sources. (line 20)
+* configuration files as shell scripts.: Config files. (line 86)
+* configuration of 'mktex' scripts: mktex configuration. (line 6)
+* 'configure' options for 'mktex' scripts: mktex configuration.
+ (line 12)
+* context diff: Bug checklist. (line 52)
+* continuation character: Config files. (line 37)
+* core dumps, reporting: Bug checklist. (line 58)
+* crashes, reporting: Bug checklist. (line 58)
+* CWEBINPUTS: Supported file formats.
+ (line 53)
+* database search: Searching overview. (line 17)
+* database, for filenames: Filename database. (line 6)
+* database, format of: Database format. (line 6)
+* debug.h: Debugging. (line 6)
+* debugger: Bug checklist. (line 58)
+* debugging: Debugging. (line 6)
+* debugging options, in Kpathsea-using program: Calling sequence.
+ (line 39)
+* debugging output: Debugging. (line 27)
+* default expansion: Default expansion. (line 6)
+* default_texsizes: Fallback font. (line 6)
+* device, wrong: Unable to generate fonts.
+ (line 29)
+* directories, making append-only: mktex configuration. (line 61)
+* directory permissions: Security. (line 51)
+* directory structure, for TeX files: TeX directory structure.
+ (line 6)
+* disabling 'mktex' scripts: mktex configuration. (line 6)
+* disk search: Searching overview. (line 22)
+* disk searching, avoiding: ls-R. (line 57)
+* disk usage, reducing: Logging. (line 6)
+* doc files: Supported file formats.
+ (line 185)
+* DOS compatible names: mktex configuration. (line 68)
+* dosnames: mktex configuration. (line 67)
+* dot files: ls-R. (line 39)
+* doubled colons: Default expansion. (line 6)
+* dpiNNN directories: mktex configuration. (line 68)
+* DVILJMAKEPK: mktex script names. (line 32)
+* DVILJSIZES: Fallback font. (line 6)
+* dvipdfmx.cfg: Specially-recognized files.
+ (line 19)
+* DVIPSFONTS: Supported file formats.
+ (line 254)
+* DVIPSHEADERS: Supported file formats.
+ (line 211)
+* DVIPSMAKEPK: mktex script names. (line 32)
+* DVIPSSIZES: Fallback font. (line 6)
+* dynamic creation of files: mktex scripts. (line 6)
+* EC fonts, and dynamic source creation: mktex scripts. (line 6)
+* elt-dirs.c: Subdirectory expansion.
+ (line 41)
+* elt-dirs.c <1>: Subdirectory expansion.
+ (line 48)
+* enabling 'mktex' scripts: mktex configuration. (line 6)
+* ENCFONTS: Supported file formats.
+ (line 61)
+* engine name: Path searching options.
+ (line 53)
+* environment variable, source for path: Path sources. (line 12)
+* environment variables for TeX: Supported file formats.
+ (line 6)
+* environment variables in paths: Variable expansion. (line 6)
+* environment variables, old: Unable to find files.
+ (line 14)
+* epoch, seconds since: Logging. (line 15)
+* error message macros: Calling sequence. (line 22)
+* examples, of casefolding searches: Casefolding examples.
+ (line 6)
+* excessive startup time: Slow path searching. (line 6)
+* expand.c: Brace expansion. (line 26)
+* expanding symlinks: Calling sequence. (line 31)
+* expansion, default: Default expansion. (line 6)
+* expansion, path element: Searching overview. (line 49)
+* expansion, search path: Path expansion. (line 6)
+* expansion, subdirectory: Subdirectory expansion.
+ (line 6)
+* expansion, tilde: Tilde expansion. (line 6)
+* expansion, variable: Variable expansion. (line 6)
+* explicitly relative filenames: Searching overview. (line 58)
+* extensions, filename: File lookup. (line 24)
+* externally-built filename database: Filename database. (line 6)
+* extra colons: Default expansion. (line 6)
+* failed 'mktex...' script invocation: mktex script names. (line 35)
+* fallback font: Fallback font. (line 6)
+* fallback resolutions: Fallback font. (line 6)
+* FAQ, Kpathsea: Common problems. (line 6)
+* Farwell, Matthew: Subdirectory expansion.
+ (line 22)
+* file formats, supported: Supported file formats.
+ (line 6)
+* file lookup: File lookup. (line 6)
+* file permissions: Security. (line 47)
+* file types, registering new: Programming overview.
+ (line 41)
+* filename aliases: Filename aliases. (line 6)
+* filename database: Filename database. (line 6)
+* filenames, absolute or explicitly relative: Searching overview.
+ (line 58)
+* files, unable to find: Unable to find files.
+ (line 6)
+* filesystem search: Searching overview. (line 22)
+* filesystem, case-(in)sensitive: Casefolding rationale.
+ (line 6)
+* Findutils, GNU package: Casefolding examples.
+ (line 78)
+* floating directories: Searching overview. (line 22)
+* fmtutil: mktex script names. (line 10)
+* fmtutil.cnf: Specially-recognized files.
+ (line 22)
+* fmtutils.cnf: mktex configuration. (line 24)
+* font alias files: Fontmap. (line 6)
+* font generation failures: Unable to generate fonts.
+ (line 6)
+* font of last resort: Fallback font. (line 6)
+* font set, infinite: mktex scripts. (line 6)
+* FONTCIDMAPS: Supported file formats.
+ (line 68)
+* FONTFEATURES: Supported file formats.
+ (line 71)
+* fontmap files: Fontmap. (line 6)
+* fontmaps: mktex configuration. (line 86)
+* fontmaps <1>: mktex configuration. (line 87)
+* fontname: mktex configuration. (line 87)
+* fontnames, arbitrary length: Fontmap. (line 15)
+* FOOINPUTS: Supported file formats.
+ (line 236)
+* FOOINPUTS <1>: Supported file formats.
+ (line 239)
+* fopen, redefined: Debugging. (line 54)
+* format of external database: Database format. (line 6)
+* ftp.cs.stanford.edu: unixtex.ftp. (line 20)
+* ftp.tug.org: unixtex.ftp. (line 6)
+* fundamental purpose of Kpathsea: Introduction. (line 6)
+* gdb, recommended: Bug checklist. (line 58)
+* gf: Supported file formats.
+ (line 75)
+* GFFONTS: Supported file formats.
+ (line 75)
+* globally writable directories: Security. (line 30)
+* glyph lookup: Glyph lookup. (line 6)
+* glyph lookup bitmap tolerance: Basic glyph lookup. (line 15)
+* GLYPHFONTS: Supported file formats.
+ (line 75)
+* GLYPHFONTS <1>: Supported file formats.
+ (line 164)
+* glyphlist.txt: Specially-recognized files.
+ (line 25)
+* GNU C compiler bugs: TeX or Metafont failing.
+ (line 16)
+* GNU General Public License: Introduction. (line 32)
+* group-writable directories: Security. (line 40)
+* GSFTOPK_DEBUG (128): Debugging. (line 88)
+* hash table buckets, printing: Debugging. (line 105)
+* hash table routines: Calling sequence. (line 110)
+* hash_summary_only variable for debugging: Debugging. (line 105)
+* history of Kpathsea: History. (line 6)
+* Hoekwater, Taco: History. (line 78)
+* home directories in paths: Tilde expansion. (line 6)
+* HOME, as ~ expansion: Tilde expansion. (line 6)
+* identifiers, characters valid in: Config files. (line 47)
+* include fontmap directive: Fontmap. (line 36)
+* INDEXSTYLE: Supported file formats.
+ (line 84)
+* input lines, reading: Calling sequence. (line 110)
+* interactive query: Path searching options.
+ (line 151)
+* interface, not frozen: Introduction. (line 29)
+* introduction: Introduction. (line 6)
+* 'kdebug:': Debugging. (line 105)
+* kdefault.c: Default expansion. (line 48)
+* Knuth, Donald E.: History. (line 6)
+* Knuth, Donald E., archive of programs by: unixtex.ftp. (line 20)
+* Kpathsea config file, source for path: Path sources. (line 20)
+* kpathsea.h: Programming overview.
+ (line 26)
+* kpathsea_cnf_get: Programming with config files.
+ (line 27)
+* KPATHSEA_DEBUG: Calling sequence. (line 28)
+* KPATHSEA_DEBUG <1>: Debugging. (line 18)
+* kpathsea_find_file: File lookup. (line 38)
+* kpathsea_find_file <1>: Calling sequence. (line 62)
+* kpathsea_find_glyph: Glyph lookup. (line 26)
+* kpathsea_finish: Calling sequence. (line 106)
+* kpathsea_init_prog: Fallback font. (line 15)
+* kpathsea_init_prog <1>: Calling sequence. (line 53)
+* kpathsea_in_name_ok: Calling sequence. (line 101)
+* kpathsea_new: Calling sequence. (line 9)
+* kpathsea_open_file: Calling sequence. (line 74)
+* kpathsea_out_name_ok: Calling sequence. (line 82)
+* kpathsea_set_program_name: Calling sequence. (line 14)
+* kpathsea_var_value: Programming with config files.
+ (line 10)
+* KPATHSEA_WARNING: Config files. (line 18)
+* kpse->debug: Debugging. (line 6)
+* kpse->debug <1>: Debugging. (line 18)
+* kpse->debug variable: Calling sequence. (line 39)
+* kpse->format_info: Calling sequence. (line 47)
+* kpse->invocation_name: Calling sequence. (line 22)
+* kpse->invocation_short_name: Calling sequence. (line 22)
+* kpse->program_name: Calling sequence. (line 22)
+* kpsewhich: Invoking kpsewhich. (line 6)
+* Kpsewhich, and debugging: Debugging. (line 31)
+* KPSE_BITMAP_TOLERANCE: Basic glyph lookup. (line 15)
+* KPSE_DEBUG_EXPAND (16): Debugging. (line 68)
+* KPSE_DEBUG_FOPEN (4): Debugging. (line 53)
+* KPSE_DEBUG_HASH (2): Debugging. (line 46)
+* KPSE_DEBUG_PATHS (8): Debugging. (line 60)
+* KPSE_DEBUG_SEARCH (32): Debugging. (line 74)
+* KPSE_DEBUG_STAT (1): Debugging. (line 38)
+* KPSE_DEBUG_VARS (64): Debugging. (line 83)
+* KPSE_DOT expansion: KPSE_DOT expansion. (line 6)
+* kpse_format_info_type: Debugging. (line 61)
+* last-resort font: Fallback font. (line 6)
+* lcircle10: Fontmap. (line 19)
+* leading colons: Default expansion. (line 6)
+* leaf directories wrongly guessed: Unable to find files.
+ (line 21)
+* leaf directory trick: Subdirectory expansion.
+ (line 22)
+* license for using the library: Introduction. (line 32)
+* LIGFONTS: Supported file formats.
+ (line 88)
+* lines, reading arbitrary-length: Calling sequence. (line 110)
+* Linux File System Standard: mktex configuration. (line 113)
+* local cache of fonts: Security. (line 22)
+* log file: Logging. (line 6)
+* logging successful searches: Logging. (line 6)
+* lost+found directory: Searching overview. (line 63)
+* lostchar: Suppressing warnings.
+ (line 19)
+* ls-R: Supported file formats.
+ (line 91)
+* ls-R database file: ls-R. (line 6)
+* ls-R, simplest build: ls-R. (line 22)
+* Mac filesystem, case-insensitive: Casefolding rationale.
+ (line 6)
+* MacKenzie, David: History. (line 44)
+* MacKenzie, David <1>: Subdirectory expansion.
+ (line 22)
+* magic characters: Searching overview. (line 13)
+* mailing lists: Mailing lists. (line 6)
+* MAKETEX_DEBUG (512): Debugging. (line 91)
+* MAKETEX_FINE_DEBUG (1024): Debugging. (line 100)
+* memory allocation routines: Calling sequence. (line 110)
+* metafont driver files: mktex configuration. (line 93)
+* Metafont failures: TeX or Metafont failing.
+ (line 6)
+* Metafont installation: Unable to generate fonts.
+ (line 51)
+* Metafont making too-large fonts: Unable to generate fonts.
+ (line 36)
+* Metafont using the wrong device: Unable to generate fonts.
+ (line 29)
+* MFBASES: Supported file formats.
+ (line 26)
+* MFINPUTS: Supported file formats.
+ (line 105)
+* MFPOOL: Supported file formats.
+ (line 109)
+* MFTINPUTS: Supported file formats.
+ (line 113)
+* MISCFONTS: Supported file formats.
+ (line 117)
+* mismatched checksum warnings: Suppressing warnings.
+ (line 17)
+* missfont.log: mktex script names. (line 35)
+* MISSFONT_LOG: mktex script names. (line 40)
+* missing character warnings: Suppressing warnings.
+ (line 20)
+* mkocp: mktex script names. (line 18)
+* mkofm: mktex script names. (line 21)
+* 'mktex' script configuration: mktex configuration. (line 6)
+* 'mktex' script names: mktex script names. (line 6)
+* 'mktex' scripts: mktex scripts. (line 6)
+* mktex.cnf: Specially-recognized files.
+ (line 28)
+* mktex.cnf <1>: mktex configuration. (line 29)
+* mktex.opt: mktex configuration. (line 29)
+* mktex.opt <1>: mktex configuration. (line 39)
+* mktexdir: mktex configuration. (line 61)
+* mktexfmt: mktex script names. (line 10)
+* mktexmf: mktex script names. (line 15)
+* mktexpk: mktex script names. (line 24)
+* 'mktexpk' can't guess mode: Unable to generate fonts.
+ (line 12)
+* mktextex: mktex script names. (line 27)
+* mktextfm: mktex script names. (line 30)
+* MLBIBINPUTS: Supported file formats.
+ (line 121)
+* MLBSTINPUTS: Supported file formats.
+ (line 125)
+* mode directory, omitting: mktex configuration. (line 98)
+* Morgan, Tim: History. (line 12)
+* MPINPUTS: Supported file formats.
+ (line 129)
+* MPMEMS: Supported file formats.
+ (line 97)
+* MPPOOL: Supported file formats.
+ (line 133)
+* MPSUPPORT: Supported file formats.
+ (line 101)
+* MT_FEATURES: mktex configuration. (line 39)
+* multiple TeX hierarchies: Brace expansion. (line 20)
+* must exist: Searching overview. (line 31)
+* names for 'mktex' scripts: mktex script names. (line 6)
+* Neumann, Gustaf: History. (line 56)
+* NFS and 'ls-R': ls-R. (line 46)
+* nomfdrivers: mktex configuration. (line 92)
+* nomode: mktex configuration. (line 97)
+* none: Suppressing warnings.
+ (line 23)
+* null pointers, dereferencing: Bug checklist. (line 58)
+* numeric debugging values: Debugging. (line 34)
+* obtaining TeX: unixtex.ftp. (line 6)
+* OCPINPUTS: Supported file formats.
+ (line 137)
+* OFMFONTS: Supported file formats.
+ (line 141)
+* online Metafont display, spurious: Unable to generate fonts.
+ (line 36)
+* OPENTYPEFONTS: Supported file formats.
+ (line 145)
+* optimization caveat: TeX or Metafont failing.
+ (line 12)
+* options for debugging: Debugging. (line 6)
+* OTPINPUTS: Supported file formats.
+ (line 151)
+* overview of path searching: Searching overview. (line 6)
+* overview of programming with Kpathsea: Programming overview.
+ (line 6)
+* OVFFONTS: Supported file formats.
+ (line 154)
+* OVPFONTS: Supported file formats.
+ (line 157)
+* path expansion: Path expansion. (line 6)
+* path searching: Path searching. (line 6)
+* path searching options: Path searching options.
+ (line 6)
+* path searching, overview: Searching overview. (line 6)
+* path searching, standalone: Invoking kpsewhich. (line 6)
+* path sources: Path sources. (line 6)
+* pathsearch.h: Programming overview.
+ (line 26)
+* pc Pascal compiler: History. (line 12)
+* pdfglyphlist.txt: Specially-recognized files.
+ (line 31)
+* pdftex.cfg: Specially-recognized files.
+ (line 34)
+* PDFTEXCONFIG: Supported file formats.
+ (line 161)
+* pdftexconfig.tex: Specially-recognized files.
+ (line 34)
+* permission denied: Searching overview. (line 63)
+* permissions, directory: Security. (line 51)
+* permissions, file: Security. (line 47)
+* PKFONTS: Supported file formats.
+ (line 164)
+* plain.base: Unable to generate fonts.
+ (line 46)
+* privacy, semblance of: Logging. (line 32)
+* problems, common: Common problems. (line 6)
+* proginit.h: Calling sequence. (line 53)
+* program-varying paths: Supported file formats.
+ (line 12)
+* programming overview: Programming overview.
+ (line 6)
+* programming with config files: Programming with config files.
+ (line 6)
+* programming with Kpathsea: Calling sequence. (line 6)
+* programs using the library: Introduction. (line 13)
+* proof mode: Unable to generate fonts.
+ (line 36)
+* PSHEADERS: Supported file formats.
+ (line 169)
+* pxp Pascal preprocessor: History. (line 12)
+* quoting variable values: Variable expansion. (line 17)
+* rationale for casefolding fallback: Casefolding rationale.
+ (line 6)
+* re-entrant API: Programming overview.
+ (line 16)
+* readable: Suppressing warnings.
+ (line 26)
+* reading arbitrary-length lines: Calling sequence. (line 110)
+* recording successful searches: Logging. (line 6)
+* relative filenames: Searching overview. (line 58)
+* reporting bugs: Reporting bugs. (line 6)
+* resident.c: Calling sequence. (line 47)
+* resolution, setting: Path searching options.
+ (line 49)
+* resolutions, last-resort: Fallback font. (line 6)
+* retrieving TeX: unixtex.ftp. (line 6)
+* right-hand side of variable assignments: Config files. (line 57)
+* RISINPUTS: Supported file formats.
+ (line 173)
+* Rokicki, Tom: History. (line 12)
+* root user: Tilde expansion. (line 19)
+* runtime configuration files: Config files. (line 6)
+* runtime debugging: Debugging. (line 6)
+* Sauter fonts, and dynamic source creation: mktex scripts. (line 6)
+* scripts for file creation: mktex scripts. (line 6)
+* search path, defined: Searching overview. (line 6)
+* search, case-insensitive: Casefolding search. (line 6)
+* searching for files: File lookup. (line 6)
+* searching for glyphs: Glyph lookup. (line 6)
+* searching overview: Searching overview. (line 6)
+* searching the database: Searching overview. (line 17)
+* searching the disk: Searching overview. (line 22)
+* security considerations: Security. (line 6)
+* SELFAUTODIR: Calling sequence. (line 31)
+* SELFAUTOLOC: Calling sequence. (line 31)
+* SELFAUTOPARENT: Calling sequence. (line 31)
+* sending patches: Bug checklist. (line 52)
+* setgid scripts: Security. (line 40)
+* SFDFONTS: Supported file formats.
+ (line 177)
+* shell scripts as configuration files: Config files. (line 86)
+* shell variables: Variable expansion. (line 17)
+* shell_escape, example for code: Programming with config files.
+ (line 10)
+* site overrides for 'mktex...': mktex configuration. (line 29)
+* skeleton TeX directory: TeX directory structure.
+ (line 6)
+* slow startup time: Slow path searching. (line 6)
+* source files: Supported file formats.
+ (line 188)
+* sources for search paths: Path sources. (line 6)
+* special: Suppressing warnings.
+ (line 30)
+* stack trace: Bug checklist. (line 58)
+* standalone path searching: Invoking kpsewhich. (line 6)
+* standard error and debugging output: Debugging. (line 27)
+* standard options: Standard options. (line 6)
+* startup time, excessive: Slow path searching. (line 6)
+* string routines: Calling sequence. (line 110)
+* strip: mktex configuration. (line 107)
+* stripsupplier: mktex configuration. (line 101)
+* striptypeface: mktex configuration. (line 104)
+* st_nlink: Subdirectory expansion.
+ (line 26)
+* ST_NLINK_TRICK: Subdirectory expansion.
+ (line 38)
+* subdirectory searching: Subdirectory expansion.
+ (line 6)
+* suffixes, filename: File lookup. (line 24)
+* suggestions, making: Introduction. (line 29)
+* Sun 2: History. (line 12)
+* supplier directory, omitting: mktex configuration. (line 102)
+* supplier directory, omitting <1>: mktex configuration. (line 108)
+* supported file formats: Supported file formats.
+ (line 6)
+* suppressing warnings: Suppressing warnings.
+ (line 6)
+* symbolic links not found: Unable to find files.
+ (line 21)
+* symbolic links, and 'ls-R': ls-R. (line 44)
+* symlinks, resolving: Calling sequence. (line 31)
+* system C compiler bugs: TeX or Metafont failing.
+ (line 16)
+* system-dependent casefolding behavior: Casefolding rationale.
+ (line 6)
+* T1FONTS: Supported file formats.
+ (line 211)
+* T1INPUTS: Supported file formats.
+ (line 211)
+* T42FONTS: Supported file formats.
+ (line 216)
+* tcfmgr.map: Specially-recognized files.
+ (line 46)
+* TDS: TeX directory structure.
+ (line 6)
+* TeX directory structure: TeX directory structure.
+ (line 6)
+* TeX environment variables: Supported file formats.
+ (line 6)
+* TeX failures: TeX or Metafont failing.
+ (line 6)
+* TeX file lookup: File lookup. (line 6)
+* TeX glyph lookup: Glyph lookup. (line 6)
+* TeX support: TeX support. (line 6)
+* TeX Users Group: Introduction. (line 43)
+* tex-file.c: File lookup. (line 38)
+* tex-file.h: Programming overview.
+ (line 26)
+* tex-glyph.c: Glyph lookup. (line 26)
+* tex-glyph.h: Programming overview.
+ (line 26)
+* tex-k@tug.org: Mailing lists. (line 6)
+* tex-k@tug.org (bug address): Reporting bugs. (line 6)
+* tex.web: unixtex.ftp. (line 20)
+* TEXBIB: Supported file formats.
+ (line 30)
+* TEXBIB <1>: Supported file formats.
+ (line 121)
+* TEXCONFIG: Supported file formats.
+ (line 57)
+* TEXDOCS: Supported file formats.
+ (line 185)
+* TEXFONTMAPS: Supported file formats.
+ (line 94)
+* TEXFONTS: Supported file formats.
+ (line 75)
+* TEXFONTS <1>: Supported file formats.
+ (line 164)
+* TEXFONTS <2>: Supported file formats.
+ (line 199)
+* TEXFONTS <3>: Supported file formats.
+ (line 219)
+* texfonts.map: Fontmap. (line 6)
+* TEXFORMATS: Supported file formats.
+ (line 64)
+* TEXINDEXSTYLE: Supported file formats.
+ (line 84)
+* TEXINPUTS: Supported file formats.
+ (line 79)
+* TEXINPUTS <1>: Supported file formats.
+ (line 180)
+* TEXMF: TeX directory structure.
+ (line 6)
+* texmf.cnf: Specially-recognized files.
+ (line 38)
+* 'texmf.cnf' missing, warning about: Config files. (line 18)
+* texmf.cnf, and variable expansion: Variable expansion. (line 6)
+* texmf.cnf, definition for: Config files. (line 6)
+* texmf.cnf, source for path: Path sources. (line 20)
+* TEXMFCNF: Config files. (line 6)
+* TEXMFCNF <1>: Supported file formats.
+ (line 49)
+* TEXMFDBS: ls-R. (line 11)
+* TEXMFDBS <1>: Supported file formats.
+ (line 91)
+* TEXMFINI: Supported file formats.
+ (line 26)
+* TEXMFINI <1>: Supported file formats.
+ (line 64)
+* TEXMFINI <2>: Supported file formats.
+ (line 97)
+* TEXMFLOG: Logging. (line 10)
+* TEXMFOUTPUT: mktex script names. (line 40)
+* TEXMFSCRIPTS: Supported file formats.
+ (line 191)
+* texmfvar: mktex configuration. (line 122)
+* TEXMFVAR: mktex configuration. (line 123)
+* texmf_casefold_search: Casefolding search. (line 12)
+* TEXPICTS: Supported file formats.
+ (line 79)
+* TEXPKS: Supported file formats.
+ (line 164)
+* TEXPOOL: Supported file formats.
+ (line 195)
+* TEXPSHEADERS: Supported file formats.
+ (line 169)
+* TEXPSHEADERS <1>: Supported file formats.
+ (line 211)
+* TEXSIZES: Fallback font. (line 6)
+* TEXSOURCES: Supported file formats.
+ (line 188)
+* TEX_HUSH: Searching overview. (line 63)
+* TEX_HUSH <1>: Suppressing warnings.
+ (line 6)
+* TFMFONTS: Supported file formats.
+ (line 199)
+* tilde expansion: Tilde expansion. (line 6)
+* tilde.c: Tilde expansion. (line 25)
+* time system call: Logging. (line 15)
+* tolerance for glyph lookup: Basic glyph lookup. (line 15)
+* trailing '/' in home directory: Tilde expansion. (line 19)
+* trailing colons: Default expansion. (line 6)
+* translations, of path searching description: Path searching.
+ (line 10)
+* TRFONTS: Supported file formats.
+ (line 203)
+* trick for detecting leaf directories: Subdirectory expansion.
+ (line 22)
+* trojan horse attack: Security. (line 10)
+* try_std_extension_first: File lookup. (line 24)
+* TTFONTS: Supported file formats.
+ (line 207)
+* tug.org: unixtex.ftp. (line 6)
+* typeface directory, omitting: mktex configuration. (line 105)
+* typeface directory, omitting <1>: mktex configuration. (line 108)
+* unable to find files: Unable to find files.
+ (line 6)
+* unable to generate fonts: Unable to generate fonts.
+ (line 6)
+* uname: Bug checklist. (line 20)
+* unixtex.ftp: unixtex.ftp. (line 6)
+* unknown special warnings: Suppressing warnings.
+ (line 31)
+* unreadable file warnings: Suppressing warnings.
+ (line 27)
+* unreadable files: Searching overview. (line 63)
+* unusable 'ls-R' warning: ls-R. (line 51)
+* usage patterns, finding: Logging. (line 6)
+* USERPROFILE, as ~ expansion: Tilde expansion. (line 6)
+* USE_TEXMFVAR: mktex configuration. (line 128)
+* USE_VARTEXFONTS: mktex configuration. (line 118)
+* varfonts: mktex configuration. (line 112)
+* variable expansion: Variable expansion. (line 6)
+* variable.c: Variable expansion. (line 32)
+* variable.h: Programming with config files.
+ (line 10)
+* VARTEXFONTS: mktex configuration. (line 113)
+* VAX 11/750: History. (line 12)
+* version numbers, determining: Bug checklist. (line 15)
+* VF files, not found: Searching overview. (line 31)
+* VFFONTS: Supported file formats.
+ (line 219)
+* Vojta, Paul: History. (line 30)
+* Walsh, Norman: History. (line 56)
+* warning about unusable 'ls-R': ls-R. (line 51)
+* warning, about missing 'texmf.cnf': Config files. (line 18)
+* warnings, file access: Searching overview. (line 63)
+* warnings, suppressing: Suppressing warnings.
+ (line 6)
+* WEB2C: Supported file formats.
+ (line 227)
+* Weber, Olaf: History. (line 73)
+* WEBINPUTS: Supported file formats.
+ (line 223)
+* whitespace, in fontmap files: Fontmap. (line 31)
+* whitespace, not ignored on continuation lines: Config files.
+ (line 37)
+* Windows and casefolding: Casefolding rationale.
+ (line 21)
+* www.tug.org: unixtex.ftp. (line 6)
+* XDvi: Specially-recognized files.
+ (line 41)
+* XDVIFONTS: Supported file formats.
+ (line 254)
+* XDVIMAKEPK: mktex script names. (line 32)
+* XDVISIZES: Fallback font. (line 6)
+* zuhn, david: History. (line 50)
+
+
+
+Tag Table:
+Node: Top1480
+Node: Introduction2263
+Node: History4333
+Node: unixtex.ftp8929
+Node: Security10399
+Node: TeX directory structure12903
+Node: Path searching16944
+Node: Searching overview17902
+Node: Path sources21721
+Node: Config files22947
+Node: Path expansion28210
+Node: Default expansion29163
+Node: Variable expansion31233
+Node: Tilde expansion32634
+Node: Brace expansion33614
+Node: KPSE_DOT expansion34553
+Node: Subdirectory expansion35066
+Node: Casefolding search37414
+Node: Casefolding rationale38183
+Node: Casefolding examples39529
+Node: Filename database44575
+Node: ls-R45557
+Node: Filename aliases49233
+Node: Database format50411
+Node: Invoking kpsewhich51424
+Node: Path searching options52379
+Node: Specially-recognized files61977
+Node: Auxiliary tasks63332
+Node: Standard options67057
+Node: TeX support67413
+Node: Supported file formats68767
+Node: File lookup76435
+Node: Glyph lookup78184
+Node: Basic glyph lookup79308
+Node: Fontmap80188
+Node: Fallback font82717
+Node: Suppressing warnings83629
+Node: mktex scripts84756
+Node: mktex configuration85971
+Node: mktex script names91774
+Node: mktex script arguments93160
+Node: Programming94039
+Node: Programming overview94612
+Node: Calling sequence97473
+Node: Program-specific files104002
+Node: Programming with config files105025
+Node: Reporting bugs106612
+Node: Bug checklist107290
+Node: Mailing lists110759
+Node: Debugging111436
+Node: Logging116513
+Node: Common problems118380
+Node: Unable to find files118857
+Node: Slow path searching121267
+Node: Unable to generate fonts122642
+Node: TeX or Metafont failing125114
+Node: Index126316
+
+End Tag Table
diff --git a/Build/source/texk/kpathsea/doc/kpathsea.texi b/Build/source/texk/kpathsea/doc/kpathsea.texi
new file mode 100644
index 00000000000..00ff64eefbe
--- /dev/null
+++ b/Build/source/texk/kpathsea/doc/kpathsea.texi
@@ -0,0 +1,3931 @@
+\input texinfo
+@setfilename kpathsea.info
+@settitle Kpathsea: A library for path searching
+
+@set version 6.3.3
+@set month-year February 2021
+
+@copying
+This file documents the Kpathsea library for path searching.
+
+Copyright @copyright{} 1996--2021 Karl Berry & Olaf Weber.
+
+Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries a copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual).
+@end ignore
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+Permission is granted to copy and distribute translations of this manual
+into another language, under the above conditions for modified versions,
+except that this permission notice may be stated in a translation
+approved by the @TeX{} Users Group.
+@end copying
+
+@c Define new indices for commands, filenames, and options.
+@defcodeindex cm
+@defcodeindex fl
+@defcodeindex op
+
+@c Put everything in one index (arbitrarily chosen to be the concept index).
+@syncodeindex cm cp
+@syncodeindex fl cp
+@syncodeindex fn cp
+@syncodeindex ky cp
+@syncodeindex op cp
+@syncodeindex pg cp
+@syncodeindex tp cp
+@syncodeindex vr cp
+
+@dircategory TeX
+@direntry
+* Kpathsea: (kpathsea). File lookup along search paths.
+* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching.
+* mktexfmt: (kpathsea)mktex scripts. Format (fmt/base/mem) generation.
+* mktexlsr: (kpathsea)Filename database. Update ls-R.
+* mktexmf: (kpathsea)mktex scripts. MF source generation.
+* mktexpk: (kpathsea)mktex scripts. PK bitmap generation.
+* mktextex: (kpathsea)mktex scripts. TeX source generation.
+* mktextfm: (kpathsea)mktex scripts. TeX font metric generation.
+@end direntry
+
+
+@titlepage
+@title Kpathsea library
+@subtitle for version @value{version}
+@subtitle @value{month-year}
+@author Karl Berry
+@author Olaf Weber
+@author Taco Hoekwater
+@author @url{https://tug.org/kpathsea}
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+
+@contents
+
+
+@ifnottex
+@node Top
+@top Kpathsea library
+
+This manual documents the Kpathsea library for path searching. It
+corresponds to version @value{version}, released in
+@value{month-year}.
+
+@menu
+* Introduction:: Overview and history.
+
+* unixtex.ftp:: Obtaining @TeX{} software.
+* Security:: Who can write what files, etc.
+* TeX directory structure:: Managing the horde of @TeX{} input files.
+
+* Path searching:: How filename lookups work.
+* TeX support:: Special support for TeX-related file lookups.
+
+* Programming:: How to use Kpathsea features in your program.
+
+* Reporting bugs:: Where and how to report bugs.
+* Index:: General index.
+@end menu
+@end ifnottex
+
+
+@node Introduction
+@chapter Introduction
+
+@cindex introduction
+@cindex fundamental purpose of Kpathsea
+
+This manual corresponds to version @value{version} of the Kpathsea
+library, released in @value{month-year}.
+
+The library's fundamental purpose is to return a filename from a list of
+directories specified by the user, similar to what shells do when
+looking up program names to execute.
+
+@cindex programs using the library
+The following software, all of which is maintained in parallel, uses
+this library:
+
+@itemize @bullet
+@item Dviljk (see the @samp{dvilj} man page)
+@item Dvipsk (@pxref{,,,dvips, Dvips: A DVI driver})
+@item GNU font utilities (@pxref{,,,fontu, GNU font utilities})
+@item Web2c (@pxref{,,,web2c, Web2c: A @TeX{} implementation})
+@item Xdvik (see the @samp{xdvi} man page)
+@end itemize
+
+@noindent Other software that we do not maintain also uses it.
+
+Kpathsea is now maintained as part of the @TeX{} Live distribution
+(@url{https://tug.org/texlive}), which includes several more
+Kpathsea-using programs. For information on configuration, building,
+installing, and more, @pxref{,,,tlbuild, Building @TeX{} Live}.
+
+@cindex interface, not frozen
+@cindex comments, making
+@cindex suggestions, making
+The library is still actively maintained. If you have comments or
+suggestions, please send along (@pxref{Reporting bugs}).
+
+@cindex conditions for use
+@cindex license for using the library
+@cindex GNU General Public License
+The Kpathsea library is distributed under the GNU Library General
+Public License (LGPL), version@tie{}2.1 or (at your option) any later
+version. In short, this means if you write a program using the
+library, you must (offer to) distribute the source to the library,
+along with any changes you have made, and allow anyone to modify the
+library source and distribute their modifications. It does not mean
+you have to distribute the source to your program using the library,
+although we hope you will. See accompanying files for the text of the
+GNU licenses, or @url{https://gnu.org/licenses}.
+
+@cindex @TeX{} Users Group
+If you know enough about @TeX{} to be reading this manual, then you (or
+your institution) should consider joining the @TeX{} Users Group (if
+you're already a member, thanks!). TUG produces the periodical
+@cite{TUGboat}, sponsors an annual meeting and publishes the
+proceedings, and arranges courses on @TeX{} for all levels of users
+throughout the world. See @url{https://tug.org} for information.
+
+@menu
+* History::
+@end menu
+
+
+@node History
+@section History
+
+@cindex history of Kpathsea
+
+@cindex Knuth, Donald E.
+This section is for those people who are curious about how the library
+came about. If you like to read historical accounts of software, we
+urge you to seek out the GNU Autoconf manual and the ``Errors of
+@TeX{}'' paper by Don Knuth, published in his book @cite{Digital
+Typography}, among other places.
+
+@cindex Morgan, Tim
+@cindex Rokicki, Tom
+@cindex Berry, Karl
+@cindex VAX 11/750
+@cindex Sun 2
+@pindex pxp @r{Pascal preprocessor}
+@pindex pc @r{Pascal compiler}
+[Karl writes.] My first ChangeLog entry for Web2c seems to be
+February 1990, but I may have done some work before then. In any
+case, Tim Morgan and I were jointly maintaining it for a time. (I
+should mention here that Tim had made Web2c into a real distribution
+long before I had ever used it or even heard of it, and Tom Rokicki
+did the original implementation. When I started, I was using
+@code{pxp} and @code{pc} on VAX 11/750's and the hot new Sun 2
+machines.)
+
+It must have been later in 1990 and 1991 that I started working on
+@cite{@TeX{} for the Impatient}. Dvips, Xdvi, Web2c, and the GNU
+fontutils (which I was also writing at the time) all used different
+environment variables, and, more importantly, had different bugs in
+their path searching. This became extremely painful, as I was stressing
+everything to the limit working on the book. I also desperately wanted
+to implement subdirectory searching, since I couldn't stand putting
+everything in one big directory, and also couldn't stand having to
+explicitly specify @file{cm}, @file{pandora}, @dots{} in a path.
+
+@cindex Vojta, Paul
+In the first incarnation, I just hacked separately on each
+program---that was the original subdirectory searching code in both
+Xdvi and Dvips. That is, I tried to go with the flow in each program,
+rather than changing the program's calling sequences to conform to new
+routines.
+
+Then, as bugs inevitably appeared, I found I was fixing the same thing
+three times (Web2c and fontutils were already sharing code, since I
+maintained both of those---there was no Dvipsk or Xdvik or Dviljk at
+this point). After a while, I finally started sharing source files.
+They weren't yet a library, though. I just kept things up to date
+with shell scripts. (I was developing on a 386 running ISC 2.2 at the
+time, and so didn't have symbolic links. An awful experience.)
+
+@cindex MacKenzie, David
+The ChangeLogs for Xdvik and Dvipsk record initial releases of those
+distributions in May and June 1992. I think it was because I was tired
+of the different configuration strategies of each program, not so much
+because of the path searching. Autoconf was being developed by David
+MacKenzie and others, and I was adapting it to @TeX{} and friends.
+
+@cindex zuhn, david
+I started to make a separate library that other programs could link with
+on my birthday in April 1993, according to the ChangeLog. I don't
+remember exactly why I finally took the time to make it a separate
+library; a conversation with david zuhn initiated it. Just seemed
+like it was time.
+
+@cindex Walsh, Norman
+@cindex Neumann, Gustaf
+Dviljk got started in March 1994 after I bought a Laserjet 4. (Kpathsea
+work got suspended while Norm Walsh and I, with Gustaf Neumann's help,
+implemented a way for @TeX{} to get at all those neat builtin LJ4 fonts
+@dots{} such a treat to have something to typeset in besides Palatino!)
+
+By spring of 1995, I had implemented just about all the path-searching
+features in Kpathsea that I plan to, driven beyond my initial goals by
+Thomas Esser and others. I then started to integrate Web2c with
+Kpathsea. After the release of a stable Web2c, I hope to be able to stop
+development, and turn most of my attention back to making fonts for GNU.
+(Always assuming Micros**t hasn't completely obliterated Unix by then,
+or that software patents haven't stopped software development by anybody
+smaller than a company with a million-dollar-a-year legal budget. Which
+is actually what I think is likely to happen, but that's another
+story@dots{})
+
+@cindex Weber, Olaf
+[Olaf writes.] At the end of 1997, Unix is still alive and kicking,
+individuals still develop software, and Web2c development still
+continues. Karl had been looking for some time for someone to take up
+part of the burden, and I volunteered.
+
+@cindex Hoekwater, Taco
+@cindex Breitenlohner, Peter
+[Karl writes again.] Indeed, time goes on. As of 2006 or so, Olaf's
+available time for Kpathsea was reduced, and I started taking overall
+care of it again, although I did not do any significant new
+development. In 2009, Taco Hoekwater implemented a major
+rearrangement to make the library suitable for use within the MetaPost
+library (@pxref{Programming overview}). Also, for some years now,
+Peter Breitenlohner has made many improvements to the infrastructure
+and kept it up-to-date with respect to the overall @TeX{} Live build,
+where Kpathsea is now maintained.
+
+
+@c emacs-page separate file so we can easily generate unixtex.ftp.
+@include unixtex.texi
+
+
+@node Security
+@chapter Security
+
+@cindex security considerations
+
+None of the programs in the @TeX{} system require any special system
+privileges, so there's no first-level security concern of people gaining
+illegitimate root access.
+
+@cindex trojan horse attack
+@flindex .rhosts@r{, writable by @TeX{}}
+A @TeX{} document, however, can write to arbitrary files, e.g.,
+@file{~/.rhosts}, and thus an unwitting user who runs @TeX{} on a random
+document is vulnerable to a trojan horse attack. This loophole is
+closed by default, but you can be permissive if you so desire in
+@file{texmf.cnf}. @xref{tex invocation,,, web2c, Web2c}. MetaPost has
+the same issue.
+
+Dvips, Xdvi, and @TeX{} can also execute shell commands under some
+circumstances. To disable this, see the @samp{-R} option in @ref{Option
+details,,, dvips, Dvips}, the xdvi man page, and @ref{tex
+invocation,,, web2c, Web2c}, respectively.
+
+@cindex local cache of fonts
+@cindex cache of fonts, local
+Another security issue arises because it's very useful---almost
+necessary---to make arbitrary fonts on user demand with @code{mktexpk}
+and friends. Where do these files get installed? By default, the
+@code{mktexpk} distributed with Kpathsea assumes a world-writable
+@file{/var/tmp} directory; this is a simple and convenient approach, but
+it may not suit your situation because it means that a local cache of
+fonts is created on every machine.
+
+@cindex globally writable directories
+To avoid this duplication, many people consider a shared, globally
+writable font tree desirable, in spite of the potential security
+problems. To do this you should change the value of @code{VARTEXFONTS}
+in @file{texmf.cnf} to refer to some globally known directory.
+@xref{mktex configuration}.
+
+@cindex append-only directories and @code{mktexpk}
+The first restriction you can apply is to make newly-created directories
+under @file{texmf} be append-only with an option in @file{mktex.cnf}.
+@xref{mktex configuration}.
+
+@cindex group-writable directories
+@cindex setgid scripts
+Another approach is to establish a group (or user) for @TeX{} files,
+make the @file{texmf} tree writable only to that group (or user), and
+make @code{mktexpk} et al.@: setgid to that group (or setuid to that
+user). Then users must invoke the scripts to install things. (If
+you're worried about the inevitable security holes in scripts, then you
+could write a C wrapper to exec the script.)
+
+@cindex file permissions
+@cindex permissions, file
+The @file{mktex@dots{}} scripts install files with the same read and
+write permissions as the directory they are installed in. The
+executable, sgid, suid, and sticky bits are always cleared.
+
+@cindex directory permissions
+@cindex permissions, directory
+Any directories created by the @file{mktex@dots{}} scripts have the
+same permissions as their parent directory, unless the
+@code{appendonlydir} feature is used, in which case the sticky bit is
+always set.
+
+
+@node TeX directory structure
+@chapter @TeX{} directory structure
+
+@vindex TEXMF
+@cindex @TeX{} directory structure
+@cindex directory structure, for @TeX{} files
+@cindex skeleton @TeX{} directory
+@cindex TDS
+
+This section describes the default installation hierarchy of the
+distribution. It conforms to both the GNU coding standards and the
+@TeX{} directory structure (TDS) standard. For rationale and further
+explanation, please see those documents. The GNU document is
+available from @url{https://gnu.org/prep/standards}. The TDS
+document is available from @url{http://mirror.ctan.org/tds}
+(@pxref{unixtex.ftp}).
+
+In short, here is a skeleton of the default directory structure,
+extracted from the TDS document:
+
+@example
+@var{prefix}/ @r{installation root (@file{/usr/local} by default)}
+ bin/ @r{executables}
+ man/ @r{man pages}
+ include/ @r{C header files}
+ info/ @r{GNU info files}
+ lib/ @r{libraries (@file{libkpathsea.*})}
+ share/ @r{architecture-independent files}
+ texmf/ @r{TDS root}
+ bibtex/ @r{Bib@TeX{} input files}
+ bib/ @r{Bib@TeX{} databases}
+ base/ @r{base distribution (e.g., @samp{xampl.bib})}
+ misc/ @r{single-file databases}
+ @var{pkg}/ @r{name of a package}
+ bst/ @r{Bib@TeX{} style files}
+ base/ @r{base distribution (e.g., @samp{plain.bst}, @samp{acm.bst})}
+ misc/ @r{single-file styles}
+ @var{pkg}/ @r{name of a package}
+ doc/ @r{additional documentation}
+ dvips/ @r{@samp{.pro}, @samp{.ps}, @samp{psfonts.map}}
+ fonts/ @r{font-related files}
+ @var{type}/ @r{file type (e.g., @samp{tfm}, @samp{pk})}
+ @var{mode}/ @r{type of output device (types @samp{pk} and @samp{gf} only)}
+ @var{supplier}/ @r{name of a font supplier (e.g., @samp{public})}
+ @var{typeface}/ @r{name of a typeface (e.g., @samp{cm})}
+ dpi@var{nnn}/ @r{font resolution (types @samp{pk} and @samp{gf} only)}
+ metafont/ @r{Metafont (non-font) input files}
+ base/ @r{base distribution (e.g., @samp{plain.mf})}
+ misc/ @r{single-file packages (e.g., @samp{modes.mf})}
+ @var{pkg}/ @r{name of a package (e.g., @samp{mfpic})}
+ metapost/ @r{MetaPost input files}
+ base/ @r{base distribution (e.g., @samp{plain.mp})}
+ misc/ @r{single-file packages}
+ @var{pkg}/ @r{name of a package}
+ support/ @r{support files for MetaPost-related utilities (e.g., @samp{trfonts.map})}
+ mft/ @r{@samp{MFT} inputs (e.g., @samp{plain.mft})}
+ tex/ @r{@TeX{} input files}
+ @var{format}/ @r{name of a format (e.g., @samp{plain})}
+ base/ @r{base distribution for @var{format} (e.g., @samp{plain.tex})}
+ misc/ @r{single-file packages (e.g., @samp{webmac.tex})}
+ local/ @r{local additions to or local configuration files for @var{format}}
+ @var{pkg}/ @r{name of a package (e.g., @samp{graphics}, @samp{mfnfss})}
+ generic/ @r{format-independent packages}
+ hyphen/ @r{hyphenation patterns (e.g., @samp{hyphen.tex})}
+ images/ @r{image input files (e.g., Encapsulated PostScript)}
+ misc/ @r{single-file format-independent packages (e.g., @samp{null.tex}).}
+ @var{pkg}/ @r{name of a package (e.g., @samp{babel})}
+ web2c/ @r{implementation-dependent files (@file{.pool}, @file{.fmt}, @file{texmf.cnf}, etc.)}
+@end example
+
+Some concrete examples for most file types:
+
+@example
+/usr/local/bin/tex
+/usr/local/man/man1/xdvi.1
+/usr/local/info/kpathsea.info
+/usr/local/lib/libkpathsea.a
+/usr/local/share/texmf/bibtex/bst/base/plain.bst
+/usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
+/usr/local/share/texmf/fonts/source/public/pandora/pnr10.mf
+/usr/local/share/texmf/fonts/tfm/public/cm/cmr10.tfm
+/usr/local/share/texmf/fonts/type1/adobe/utopia/putr.pfa
+/usr/local/share/texmf/metafont/base/plain.mf
+/usr/local/share/texmf/metapost/base/plain.mp
+/usr/local/share/texmf/tex/plain/base/plain.tex
+/usr/local/share/texmf/tex/generic/hyphen/hyphen.tex
+/usr/local/share/texmf/web2c/tex.pool
+/usr/local/share/texmf/web2c/tex.fmt
+/usr/local/share/texmf/web2c/texmf.cnf
+@end example
+
+
+@node Path searching
+@chapter Path searching
+
+@cindex path searching
+
+This chapter describes the generic path searching mechanism Kpathsea
+provides. For information about searching for particular file types
+(e.g., @TeX{} fonts), see the next chapter.
+
+@cindex translations, of path searching description
+This section, with minor differences, has been translated into several
+other languages (Chinese, Spanish, Russian, Japanese, French, German,
+@dots{}) as part of the @TeX{} Live guide; see
+@url{https://tug.org/texlive/doc.html} for links.
+
+@menu
+* Searching overview:: Basic scheme for searching.
+* Path sources:: Where search paths can be defined.
+* Path expansion:: Special constructs in search paths.
+* Casefolding search:: Fallback to case-insensitive search.
+* Filename database:: Using an externally-built list to search.
+* Invoking kpsewhich:: Standalone path lookup.
+@end menu
+
+
+@node Searching overview
+@section Searching overview
+
+@cindex searching overview
+@cindex path searching, overview
+@cindex overview of path searching
+
+@cindex search path, defined
+A @dfn{search path} is a colon-separated list of @dfn{path elements},
+which are directory names with a few extra frills. A search path can
+come from (a combination of) many sources; see below. To look up a file
+@samp{foo} along a path @samp{.:/dir}, Kpathsea checks each element of
+the path in turn: first @file{./foo}, then @file{/dir/foo}, returning
+the first match (or possibly all matches).
+
+@cindex magic characters
+@kindex : @r{may not be :}
+@kindex / @r{may not be /}
+The ``colon'' and ``slash'' mentioned here aren't necessarily @samp{:}
+and @samp{/} on non-Unix systems. Kpathsea tries to adapt to other
+operating systems' conventions.
+
+@cindex database search
+@cindex searching the database
+To check a particular path element @var{e}, Kpathsea first sees if a
+prebuilt database (@pxref{Filename database}) applies to @var{e}, i.e.,
+if the database is in a directory that is a prefix of @var{e}. If so,
+the path specification is matched against the contents of the database.
+
+@cindex floating directories
+@cindex filesystem search
+@cindex disk search
+@cindex searching the disk
+If the database does not exist, or does not apply to this path element,
+or contains no matches, the filesystem is searched (if this was not
+forbidden by the specification with @samp{!!} and if the file being
+searched for must exist). Kpathsea constructs the list of directories
+that correspond to this path element, and then checks in each for the
+file being searched for. (To help speed future lookups of files in the
+same directory, the directory in which a file is found is floated to the
+top of the directory list.)
+
+@cindex must exist
+@cindex VF files, not found
+@flindex cmr10.vf
+@findex \openin
+The ``file must exist'' condition comes into play with VF files and
+input files read by the @TeX{} @samp{\openin} command. These files
+might very well not exist (consider @file{cmr10.vf}), and so it would
+be wrong to search the disk for them. Therefore, if you fail to
+update @file{ls-R} when you install a new VF file, it will not be
+found.
+
+Each path element is checked in turn: first the database, then the
+disk. If a match is found, the search stops and the result is
+returned (unless the search explicitly requested all matches). This
+avoids possibly-expensive processing of path specifications that are
+never needed on a particular run.
+
+On Unix-like systems, if no match is found by any of the above, and
+the path element allows checking the filesystem (per the above), a
+final check is made for a case-insensitive match. Thus, looking for a
+name like @samp{./FooBar.TeX} will match a file @samp{./foobar.tex},
+and vice versa. This is not done on Windows. @xref{Casefolding
+search}.
+
+@cindex expansion, path element
+Although the simplest and most common path element is a directory name,
+Kpathsea supports additional features in search paths: layered default
+values, environment variable names, config file values, users' home
+directories, and recursive subdirectory searching. Thus, we say that
+Kpathsea @dfn{expands} a path element, meaning transforming all the
+magic specifications into the basic directory name or names. This
+process is described in the sections below. It happens in the same
+order as the sections.
+
+@cindex absolute filenames
+@cindex relative filenames
+@cindex explicitly relative filenames
+@cindex filenames, absolute or explicitly relative
+Exception to all of the above: If the filename being searched for is
+absolute or explicitly relative, i.e., starts with @samp{/} or @samp{./}
+or @samp{../}, Kpathsea simply checks if that file exists, with a
+fallback to a casefolding match if needed and enabled, as described above.
+
+@cindex permission denied
+@cindex unreadable files
+@cindex access warnings
+@cindex warnings, file access
+@flindex lost+found @r{directory}
+@vindex TEX_HUSH
+Ordinarily, if Kpathsea tries to access a file or directory that
+cannot be read, it gives a warning. This is so you will be alerted to
+directories or files that accidentally lack any read permission (for
+example, a @file{lost+found} directory). If you prefer not to see
+these warnings, include the value @samp{readable} in the
+@code{TEX_HUSH} environment variable or config file value.
+
+This generic path searching algorithm is implemented in
+@file{kpathsea/pathsearch.c}. It is employed by a higher-level
+algorithm when searching for a file of a particular type (@pxref{File
+lookup}, and @ref{Glyph lookup}).
+
+
+@node Path sources
+@section Path sources
+
+@cindex path sources
+@cindex sources for search paths
+
+A search path or other configuration value can come from many sources.
+In the order in which Kpathsea looks for them:
+
+@enumerate
+@item
+@opindex @samp{--cnf-line}, source for path
+A command-line option such as @code{--cnf-line}, available in
+@file{kpsewhich} and most @TeX{} engines. @xref{Path searching
+options}.
+
+@cindex environment variable, source for path
+A user-set environment variable, e.g., @code{TEXINPUTS}.
+Environment variables with an underscore and the program name appended
+override; for example, @code{TEXINPUTS_latex} overrides @code{TEXINPUTS}
+if the program being run is named @samp{latex}.
+
+@item
+A program-specific configuration file, e.g., an @samp{S /a:/b} line in
+Dvips' @file{config.ps} (@pxref{Config files,,, dvips, Dvips}).
+
+@item
+@cindex configuration file, source for path
+@cindex Kpathsea config file, source for path
+@flindex texmf.cnf@r{, source for path}
+A line in a Kpathsea configuration file @file{texmf.cnf}, e.g.,
+@samp{TEXINPUTS=/c:/d} (see below).
+
+@item
+@cindex compilation value, source for path
+The compile-time default (specified in @file{kpathsea/paths.h}).
+@end enumerate
+
+You can see each of these values for a given search path by using the
+debugging options (@pxref{Debugging}).
+
+These sources may be combined via default expansion (@pxref{Default
+expansion}).
+
+@menu
+* Config files:: Kpathsea's runtime config files (texmf.cnf).
+@end menu
+
+
+@node Config files
+@subsection Config files
+
+@cindex config files
+@flindex texmf.cnf@r{, definition for}
+
+@cindex runtime configuration files
+@vindex TEXMFCNF
+As mentioned above, Kpathsea reads @dfn{runtime configuration files}
+named @file{texmf.cnf} for search path and other definitions. The
+search path used to look for these configuration files is named
+@code{TEXMFCNF}, and is constructed in the usual way, as described
+above, except that configuration files cannot be used to define the
+path, naturally; also, an @file{ls-R} database is not used to search for
+them.
+
+Kpathsea reads @emph{all} @file{texmf.cnf} files in the search path, not
+just the first one found; definitions in earlier files override those in
+later files. Thus, if the search path is @samp{.:$TEXMF}, values from
+@file{./texmf.cnf} override those from @file{$TEXMF/texmf.cnf}.
+
+@vindex KPATHSEA_WARNING
+@cindex warning, about missing @file{texmf.cnf}
+@cindex @file{texmf.cnf} missing, warning about
+If Kpathsea cannot find any @file{texmf.cnf} file, it reports a
+warning including all the directories it checked. If you don't want
+to see this warning, set the environment variable
+@env{KPATHSEA_WARNING} to the single character @samp{0} (zero, not
+oh).
+
+While (or instead of) reading this description, you may find it helpful
+to look at the distributed @file{texmf.cnf}, which uses or at least
+mentions most features. The format of @file{texmf.cnf} files follows:
+
+@itemize @bullet
+@item
+@cindex comments, in @file{texmf.cnf}
+Comments start with @samp{%}, either at the beginning of a line or
+preceded by whitespace, and continue to the end of the line. That is,
+similar to most shells, a @samp{%} in the ``middle'' of a value does not
+start a comment. Examples:
+
+@example
+% this is a comment
+var = a%b % but the value of var will be "a%b"
+@end example
+
+@item
+@cindex blank lines, in @file{texmf.cnf}
+Blank lines are ignored.
+
+@item
+@cindex backslash-newline
+@cindex continuation character
+@cindex whitespace, not ignored on continuation lines
+@kindex \@r{, line continuation in @file{texmf.cnf}}
+A @samp{\} at the end of a line acts as a continuation character, i.e.,
+the next line is appended. Whitespace at the beginning of continuation
+lines is not ignored.
+
+@item Each remaining line will look like:
+
+@example
+@var{variable} @r{[}. @var{progname}@r{]} @r{[}=@r{]} @var{value}
+@end example
+
+@noindent where the @samp{=} and surrounding whitespace is optional.
+
+@item
+@cindex identifiers, characters valid in
+The @var{variable} name may contain any character other than whitespace,
+@samp{=}, or @samp{.}, but sticking to @samp{A-Za-z_} is safest.
+
+@kindex .@var{progname} @r{qualifier in @file{texmf.cnf}}
+@item If @samp{.@var{progname}} is present (preceding spaces are
+ignored), the definition only applies if the program that is running
+is named (i.e., the last component of @code{argv[0]} is)
+@var{progname} or @file{@var{progname}.@{exe,bat,cmd,...@}}. Most
+notably, this allows different flavors of @TeX{} to have different
+search paths. The @var{progname} value is used literally, without
+variable or other expansions.
+
+@item
+@cindex right-hand side of variable assignments
+Considered as strings, @var{value} may contain any character.
+However, in practice most @file{texmf.cnf} values are related to path
+expansion, and since various special characters are used in expansion,
+such as braces and commas, they cannot be used in directory names.
+
+The @samp{$@var{var}.@var{prog}} feature is not available on the
+right-hand side; instead, you must use an additional variable (see
+below for example).
+
+@kindex ; @r{translated to @samp{:} in @file{texmf.cnf}}
+A @samp{;} in @var{value} is translated to @samp{:} if running under
+Unix, in order to have a single @file{texmf.cnf} that can support both
+Unix and Windows systems. This translation happens with any value, not
+just search paths, but fortunately in practice @samp{;} is not needed
+in other values.
+
+@item All definitions are read before anything is expanded, so you can
+use variables before they are defined (like Make, unlike most other
+programs).
+@end itemize
+
+@noindent Here is a configuration file fragment illustrating most of
+these points:
+
+@example
+% TeX input files -- i.e., anything to be found by \input or \openin ...
+latex209_inputs = .:$TEXMF/tex/latex209//:$TEXMF/tex//
+latex2e_inputs = .:$TEXMF/tex/latex//:$TEXMF/tex//
+TEXINPUTS = .:$TEXMF/tex//
+TEXINPUTS.latex209 = $latex209_inputs
+TEXINPUTS.latex2e = $latex2e_inputs
+TEXINPUTS.latex = $latex2e_inputs
+@end example
+
+@cindex shell scripts as configuration files
+@cindex configuration files as shell scripts.
+This format has some similarity to Bourne shell scripts---change the
+comment character to @code{#}, disallow spaces around the @code{=},
+and get rid of the @code{.@var{name}} convention, and it could be run
+through the shell. However, there seemed little advantage in this,
+since all the information would have to passed back to Kpathsea and
+parsed there anyway, since the @code{sh} process couldn't affect its
+parent's environment.
+
+@kindex = @r{omitted in @file{texmf.cnf} and misparsing}
+The combination of spaces being ignored before the @code{.} of a
+program name qualifer and the optional @samp{=} for the assignment has
+an unexpected consequence: if the value begins with a literal @samp{.}
+and the @samp{=} is omitted, the intended value is interpreted as a
+program name. For example, a line @code{var .;/some/path} is taken as
+an empty value for @code{var} running under the program named
+@samp{;/some/path}. To diagnose this, Kpathsea warns if the program
+name contains a path separator or other special character. The
+simplest way to avoid the problem is to use the @code{=}.
+
+Exactly when a character will be considered special or act as itself
+depends on the context in which it is used. The rules are inherent in
+the multiple levels of interpretation of the configuration (parsing,
+expansion, search, @dots{}) and so cannot be concisely stated,
+unfortunately. There is no general escape mechanism; in particular,
+@samp{\} is not an ``escape character'' in @file{texmf.cnf} files.
+When it comes choosing directory names for installation, it is safest to
+avoid them all.
+
+@flindex cnf.c
+The implementation of all this is in @file{kpathsea/cnf.c}.
+
+
+@node Path expansion
+@section Path expansion
+
+@cindex path expansion
+@cindex expansion, search path
+
+Kpathsea recognizes certain special characters and constructions in
+search paths, similar to that in shells. As a general example:
+@samp{~$USER/@{foo,bar@}//baz} expands to all subdirectories under
+directories @file{foo} and @file{bar} in @t{$USER}'s home directory that
+contain a directory or file @file{baz}.
+
+These expansions are explained in the sections below.
+
+@menu
+* Default expansion:: a: or :a or a::b expands to a default.
+* Variable expansion:: $foo and $@{foo@} expand to environment values.
+* Tilde expansion:: ~ and ~user expand to home directories.
+* Brace expansion:: a@{foo,bar@}b expands to afoob abarb.
+* KPSE_DOT expansion:: . is replaced with $KPSE_DOT if it is defined.
+* Subdirectory expansion:: a// and a//b recursively expand to subdirs.
+@end menu
+
+
+@node Default expansion
+@subsection Default expansion
+
+@kindex :: @r{expansion}
+@cindex doubled colons
+@cindex leading colons
+@cindex trailing colons
+@cindex extra colons
+@cindex default expansion
+@cindex expansion, default
+
+If the highest-priority search path (@pxref{Path sources}) contains an
+@dfn{extra colon} (i.e., leading, trailing, or doubled), Kpathsea
+inserts at that point the next-highest-priority search path that is
+defined. If that inserted path has an extra colon, the same happens
+with the next-highest. (An extra colon in the compile-time default
+value has unpredictable results, so installers beware.)
+
+For example, given an environment variable setting
+
+@example
+setenv TEXINPUTS /home/karl:
+@end example
+
+@noindent and a @code{TEXINPUTS} value from @file{texmf.cnf} of
+
+@example
+.:$TEXMF//tex
+@end example
+
+@noindent then the final value used for searching will be:
+
+@example
+/home/karl:.:$TEXMF//tex
+@end example
+
+Put another way, default expansion works on ``formats'' (search
+paths), and not directly on environment variables. Example, showing
+the trailing @samp{:} ignored in the first case and expanded in the second:
+
+@example
+$ env TTFONTS=/tmp: kpsewhich --expand-path '$TTFONTS'
+/tmp
+$ env TTFONTS=/tmp: kpsewhich --show-path=.ttf
+/tmp:.:/home/olaf/texmf/fonts/truetype//:...
+@end example
+
+Since Kpathsea looks for multiple configuration files, it would be
+natural to expect that (for example) an extra colon in
+@file{./texmf.cnf} would expand to the path in @file{$TEXMF/texmf.cnf}.
+Or, with Dvips' configuration files, that an extra colon in
+@file{config.$PRINTER} would expand to the path in @file{config.ps}.
+This doesn't happen. It's not clear this would be desirable in all
+cases, and trying to devise a way to specify the path to which the extra
+colon should expand seemed truly baroque.
+@cindex Bach, Johann Sebastian
+
+Technicality: Since it would be useless to insert the default value in
+more than one place, Kpathsea changes only one extra @samp{:} and leaves
+any others in place (they will eventually be ignored). Kpathsea checks
+first for a leading @samp{:}, then a trailing @samp{:}, then a doubled
+@samp{:}.
+
+@flindex kdefault.c
+You can trace this by debugging ``paths'' (@pxref{Debugging}).
+Default expansion is implemented in the source file
+@file{kpathsea/kdefault.c}.
+
+
+@node Variable expansion
+@subsection Variable expansion
+
+@kindex $ @r{expansion}
+@cindex environment variables in paths
+@cindex variable expansion
+@cindex expansion, variable
+@flindex texmf.cnf@r{, and variable expansion}
+
+@samp{$foo} or @samp{$@{foo@}} in a path element is replaced by (1) the
+value of an environment variable @samp{foo} (if defined); (2) the value
+of @samp{foo} from @file{texmf.cnf} (if defined); (3) the empty string.
+
+If the character after the @samp{$} is alphanumeric or @samp{_}, the
+variable name consists of all consecutive such characters. If the
+character after the @samp{$} is a @samp{@{}, the variable name consists
+of everything up to the next @samp{@}} (braces may not be nested around
+variable names). Otherwise, Kpathsea gives a warning and ignores the
+@samp{$} and its following character.
+
+@cindex quoting variable values
+@cindex shell variables
+You must quote the @t{$}'s and braces as necessary for your shell.
+@emph{Shell} variable values cannot be seen by Kpathsea, i.e., ones
+defined by @code{set} in C shells and without @code{export} in Bourne
+shells.
+
+For example, given
+@example
+setenv tex /home/texmf
+setenv TEXINPUTS .:$tex:$@{tex@}prev
+@end example
+@noindent the final @code{TEXINPUTS} path is the three directories:
+@example
+.:/home/texmf:/home/texmfprev
+@end example
+
+The @samp{.@var{progname}} suffix on variables and
+@samp{_@var{progname}} on environment variable names are not implemented
+for general variable expansions. These are only recognized when search
+paths are initialized (@pxref{Path sources}).
+
+@flindex variable.c
+Variable expansion is implemented in the source file
+@file{kpathsea/variable.c}.
+
+
+@node Tilde expansion
+@subsection Tilde expansion
+
+@kindex ~ @r{expansion}
+@cindex home directories in paths
+@cindex tilde expansion
+@cindex expansion, tilde
+
+@vindex HOME@r{, as ~ expansion}
+@vindex USERPROFILE@r{, as ~ expansion}
+A leading @samp{~} in a path element is replaced by the value of the
+environment variable @code{HOME}, or @file{.} if @code{HOME} is not
+set. On Windows, the environment variable @code{USERPROFILE} is
+checked instead of @code{HOME}.
+
+A leading @samp{~@var{user}} in a path element is replaced by
+@var{user}'s home directory from the system @file{passwd} database.
+
+For example,
+@example
+setenv TEXINPUTS ~/mymacros:
+@end example
+
+@noindent will prepend a directory @file{mymacros} in your home
+directory to the default path.
+
+@cindex @t{root} user
+@cindex trailing @samp{/} in home directory
+@kindex /@r{, trailing in home directory}
+As a special case, if a home directory ends in @samp{/}, the trailing
+slash is dropped, to avoid inadvertently creating a @samp{//} construct
+in the path. For example, if the home directory of the user @samp{root}
+is @samp{/}, the path element @samp{~root/mymacros} expands to just
+@samp{/mymacros}, not @samp{//mymacros}.
+
+@flindex tilde.c
+Tilde expansion is implemented in the source file @file{kpathsea/tilde.c}.
+
+
+@node Brace expansion
+@subsection Brace expansion
+
+@kindex @{ @r{expansion}
+@cindex brace expansion
+
+@samp{x@{@var{a},@var{b}@}y} expands to @samp{x@var{a}y:x@var{b}y}.
+For example:
+
+@example
+foo/@{1,2@}/baz
+@end example
+
+@noindent expands to @samp{foo/1/baz:foo/2/baz}. @samp{:} is the path
+separator on the current system; e.g., on a Windows system, it's @samp{;}.
+
+Braces can be nested; for example, @samp{x@{A,B@{1,2@}@}y} expands to
+@samp{xAy:xB1y:xB2y}.
+
+Multiple non-nested braces are expanded from right to left; for example,
+@samp{x@{A,B@}@{1,2@}y} expands to @samp{x@{A,B@}1y:x@{A,B@}2y}, which
+expands to @samp{xA1y:xB1y:xA2y:xB2y}.
+
+@cindex multiple @TeX{} hierarchies
+This feature can be used to implement multiple @TeX{} hierarchies, by
+assigning a brace list to @code{$TEXMF}, as mentioned in
+@file{texmf.in}.
+
+You can also use the path separator instead of the comma. The last
+example could have been written @samp{x@{A:B@}@{1:2@}y} (on Unix).
+
+
+@flindex expand.c
+Brace expansion is implemented in the source file
+@file{kpathsea/expand.c}.
+
+
+@node KPSE_DOT expansion
+@subsection @code{KPSE_DOT} expansion
+
+@kindex KPSE_DOT @r{expansion}
+
+When @code{KPSE_DOT} is defined in the environment, it names a directory
+that should be considered the current directory for the purpose of
+looking up files in the search paths. This feature is needed by the
+@samp{mktex@dots{}} scripts @ref{mktex scripts}, because these
+change the working directory. You should not ever define it yourself.
+
+
+@node Subdirectory expansion
+@subsection Subdirectory expansion
+
+@kindex //
+@cindex subdirectory searching
+@cindex expansion, subdirectory
+
+@cindex alphabetical order, not
+Two or more consecutive slashes in a path element following a directory
+@var{d} is replaced by all subdirectories of @var{d}: first those
+subdirectories directly under @var{d}, then the subsubdirectories under
+those, and so on. At each level, the order in which the directories are
+searched is unspecified. (It's ``directory order'', and definitely not
+alphabetical.)
+
+If you specify any filename components after the @samp{//}, only
+subdirectories which match those components are included. For example,
+@samp{/a//b} would expand into directories @file{/a/1/b}, @file{/a/2/b},
+@file{/a/1/1/b}, and so on, but not @file{/a/b/c} or @file{/a/1}.
+
+You can include multiple @samp{//} constructs in the path.
+
+@samp{//} at the beginning of a path is ignored; you didn't really want
+to search every directory on the system, did you?
+
+@cindex trick for detecting leaf directories
+@cindex leaf directory trick
+@cindex Farwell, Matthew
+@cindex MacKenzie, David
+I should mention one related implementation trick, which I took from GNU
+find. Matthew Farwell suggested it, and David MacKenzie implemented it.
+
+@vindex st_nlink
+The trick is that in every real Unix implementation (as opposed to the
+POSIX specification), a directory which contains no subdirectories will
+have exactly two links (namely, one for @file{.} and one for @file{..}).
+That is to say, the @code{st_nlink} field in the @samp{stat} structure
+will be two. Thus, we don't have to stat everything in the bottom-level
+(leaf) directories---we can just check @code{st_nlink}, notice it's two,
+and do no more work.
+
+But if you have a directory that contains a single subdirectory and 500
+regular files, @code{st_nlink} will be 3, and Kpathsea has to stat every
+one of those 501 entries. Therein lies slowness.
+
+@vindex ST_NLINK_TRICK
+You can disable the trick by undefining @code{ST_NLINK_TRICK} in
+@file{kpathsea/config.h}. (It is undefined by default except under Unix.)
+
+@flindex elt-dirs.c
+Unfortunately, in some cases files in leaf directories are
+@code{stat}'d: if the path specification is, say,
+@samp{$TEXMF/fonts//pk//}, then files in a subdirectory
+@samp{@dots{}/pk}, even if it is a leaf, are checked. The reason
+cannot be explained without reference to the implementation, so read
+@file{kpathsea/elt-dirs.c} (search for @samp{may descend}) if you are
+curious. And if you find a way to solve the problem, please let me
+know.
+
+@flindex elt-dirs.c
+Subdirectory expansion is implemented in the source file
+@file{kpathsea/elt-dirs.c}.
+
+
+@node Casefolding search
+@section Casefolding search
+
+@cindex casefolding search
+@cindex search, case-insensitive
+
+In Kpathsea version 6.3.0 (released with @TeX{} Live 2018), a new
+fallback search was implemented on Unix-like systems, including Macs:
+for each path element in turn, if no match is found by the normal
+search, and the path element allows for checking the filesystem, a
+second check is made for a case-insensitive match.
+
+@vindex texmf_casefold_search
+This is enabled at compile-time on Unix systems, and enabled at
+runtime by setting the configuration variable
+@code{texmf_casefold_search}, to a true value, e.g., @samp{1}; this is
+done by default in @TeX{} Live.
+
+@menu
+* Rationale: Casefolding rationale.
+* Examples: Casefolding examples.
+@end menu
+
+@node Casefolding rationale
+@subsection Casefolding rationale
+
+@cindex casefolding fallback rationale
+@cindex rationale for casefolding fallback
+@cindex system-dependent casefolding behavior
+
+@cindex filesystem, case-(in)sensitive
+@cindex Apple filesystem, case-insensitive
+@cindex Mac filesystem, case-insensitive
+The purpose of the fallback casefolding search is to ease moving
+complex documents between case-insensitive (file)systems and
+case-sensitive ones. In particular, Apple decided to make the default
+filesystem on Macs be case-insensitive some years ago, and this has
+exacerbated a problem of people creating documents that use, say, an
+image under the name @file{foo.jpg}, while the actual file is named
+@file{foo.JPG} or @file{Foo.jpg}. It works on the Mac but if the
+document is transferred and run on a standard case-sensitive Unix
+(file)system, the file can't be found, due only to differences in
+case.
+
+This same problematic scenario has always existed on Windows, but for
+whatever reason, it has become much more common since Apple also went
+to a case-insensitive filesystem. Hence the relatively late change
+to the Kpathsea behavior.
+
+@cindex Windows and casefolding
+The fallback case-insensitive search is omitted at compile-time on
+Windows, where (for practical purposes) all file names are
+case-insensitive at the kernel level, and so the normal search will
+already have definitively matched or not. Therefore, search results
+in unusual cases can be different on Windows and Unix---but this has
+always been true.
+
+
+@node Casefolding examples
+@subsection Casefolding examples
+
+@cindex casefolding examples
+@cindex examples, of casefolding searches
+
+The casefolding implementation prefers exact matches to casefolded
+matches within a given path element, so as to retain most
+compatibility. Backward compatibility is not perfect, however, as a
+casefolded match may be found in an earlier path element than an exact
+match was previously found (see example #4 below). Still, preferring
+the match in the earlier element seemed potentially less confusing
+than otherwise, and is in fact consistent with past behavior on
+Windows. Since case mismatches are rare to begin with, and name
+collisions with respect only to case thus even more rare, the hope is
+that it will not cause difficulties in practice.
+
+If it's desirable in a given situation to have the exact same search
+behavior as previously, that can be accomplished by setting the
+configuration variable @code{texmf_casefold_search} to @samp{0}
+(@pxref{Path sources}).
+
+Some examples to illustrate the new behavior follow.
+
+Example #1: suppose the file @file{./foobar.tex} exists. Now,
+searching for @file{./FooBar.TeX} (or any other case variation) will
+succeed, returning @file{./foobar.tex}---the name as stored on disk.
+In previous releases, or if @code{texmf_casefold_search} is false, the
+search would fail.
+
+Example #2: suppose we are using a case-sensitive (file)system, and
+the search path is @samp{.:/somedir}, and the files
+@file{./foobar.tex} and @file{/somedir/FooBar.TeX} both exist. Both
+now and previously, searching for @file{foobar.tex} returns
+@file{./foobar.tex}. However, searching for @file{FooBar.TeX} now
+returns @file{./foobar.tex} instead of @file{/somedir/FooBar.TeX};
+this is the incompatibility mentioned above. Also (as expected),
+searching for @file{FOOBAR.TEX} (or whatever variation) will now
+return @file{./foobar.tex}, whereas before it would fail. Searching
+for all (@samp{kpsewhich --all}) @file{foobar.tex} will return both
+matches.
+
+Example #3: same as example #2, but on a case-insensitive
+(file)system: both now and previously, searching for @file{FooBar.TeX}
+returns @file{./foobar.tex}, since the system considers that a match.
+The Kpathsea casefolding never comes into play.
+
+Example #4: if we have (on a case-sensitive system) both
+@file{./foobar.tex} and @file{./FOOBAR.TEX}, searching with the exact
+case returns that exact match, now and previously. Searching for
+@file{FooBar.tex} will now return one or the other (chosen
+arbitrarily), rather than failing. Perhaps unexpectedly, searching
+for all @file{foobar.tex} or @file{FooBar.tex} will also return only
+one or the other, not both (see more below).
+
+Example #5: the font file @file{STIX-Regular.otf} is included in
+@TeX{} Live in the system directory
+@file{texmf-dist/fonts/opentype/public/stix}. Because Kpathsea never
+searches the disk in the big system directory, the casefolding is not
+done, and a search for @samp{stix-regular.otf} will fail (on
+case-sensitive systems), as it always has.
+
+@kindex !! @r{and casefolding}
+The caveat about not searching the disk amounts to saying that
+casefolding does not happen in the trees specified with @samp{!!}
+(@pxref{ls-R}), that is, where only database (@file{ls-R}) searching
+is done. In @TeX{} Live, that is the @samp{texmf-local} and
+@samp{texmf-dist} trees (also @code{$TEXMFSYSCONFIG} and
+@code{$TEXMFSYSVAR}, but those are rarely noticed). The rationale for
+this is that in practice, case mangling happens with user-created
+files, not with packages distributed as part of the @TeX{} system.
+
+One more caveat: the purpose of @code{kpsewhich} is to exercise the
+path searching in Kpathsea as it is actually done. Therefore, as
+shown above, @samp{kpsewhich --all} will not return all matches
+regardless of case within a given path element. If you want to find
+all matches in all directories, @code{find} is the best tool, although
+the setup takes a couple steps:
+
+@example
+kpsewhich -show-path=tex >/tmp/texpath # search path specification
+kpsewhich -expand-path="`cat /tmp/texpath`" >/tmp/texdirs # all dirs
+tr ':' '\n' </tmp/texdirs >/tmp/texdirlist # colons to newlines
+find `cat /tmp/texdirlist` -iname somefile.tex -print </tmp/texdirlist
+@end example
+
+@cindex Findutils, GNU package
+@opindex -iname@r{, find predicate}
+Sorry that it's annoyingly lengthy, but implementing this inside
+Kpathsea would be a lot of error-prone trouble for something that is
+only useful for debugging. If your @code{find} does not support
+@code{-iname}, you can get GNU Find from
+@url{https://gnu.org/software/findutils}.
+
+The casefolding search is implemented in the source file
+@file{kpathsea/pathsearch.c}. Two implementation points:
+
+@itemize
+@findex access @r{system call}
+@item
+Kpathsea never tries to check if a given directory resides on a
+case-insensitive filesystem, because there is no efficient and
+portable way to do so. All it does is try to see if a potential file
+name is a readable normal file (with, usually, the @code{access}
+system call).
+
+@item
+Kpathsea does not do any case-insensitive matching of the directories
+along the path. It's not going to find @file{/Some/Random/file.tex}
+when looking for @file{/some/random/file.tex}. The casefolding only
+happens with the elements of the leaf directory.
+
+@end itemize
+
+
+@node Filename database
+@section Filename database (@code{ls-R})
+
+@cindex filename database
+@cindex database, for filenames
+@cindex externally-built filename database
+
+Kpathsea goes to some lengths to minimize disk accesses for searches
+(@pxref{Subdirectory expansion}). Nevertheless, in practice searching
+every possible directory in typical @TeX{} installations takes an
+excessively long time.
+
+Therefore, Kpathsea can use an externally-built @dfn{filename
+database} file named @file{ls-R} that maps files to directories, thus
+avoiding the need to exhaustively search the disk.
+
+A second database file @file{aliases} allows you to give additional
+names to the files listed in @file{ls-R}.
+
+The @file{ls-R} and @file{aliases} features are implemented in the
+source file @file{kpathsea/db.c}.
+
+@menu
+* ls-R:: The main filename database.
+* Filename aliases:: Aliases for those names.
+* Database format:: Syntax details of the database file.
+@end menu
+
+
+@node ls-R
+@subsection @file{ls-R}
+
+@flindex ls-R @r{database file}
+
+As mentioned above, you must name the main filename database
+@file{ls-R}. You can put one at the root of each @TeX{} installation
+hierarchy you wish to search (@code{$TEXMF} by default, which expands
+to a braced list of several hierarchies in @TeX{} Live).
+
+@vindex TEXMFDBS
+@kindex !! @r{in @code{TEXMFDBS}}
+Kpathsea looks for @file{ls-R} files along the @code{TEXMFDBS}
+path. It is best for this to contain all and only those hierarchies
+from @code{$TEXMF} which are specified with @code{!!}---and also to
+specify them with @code{!!} in @code{TEXMFDBS}. (See the end of this
+section for more on @code{!!}.)
+
+The recommended way to create and maintain @samp{ls-R} is to run the
+@code{mktexlsr} script, which is installed in @samp{$(bindir)}
+(@file{/usr/local/bin} by default). That script goes to some trouble to
+follow symbolic links as necessary, etc. It's also invoked by the
+distributed @samp{mktex@dots{}} scripts.
+
+@flindex ls-R@r{, simplest build}
+At its simplest, though, you can build @file{ls-R} with the command
+@example
+cd @var{/your/texmf/root} && ls -LAR ./ >ls-R
+@end example
+
+@noindent
+@opindex --color=tty
+@flindex /etc/profile @r{and aliases}
+presuming your @code{ls} produces the right output format (see the
+section below). GNU @code{ls}, for example, outputs in this format.
+Also presuming your @code{ls} hasn't been aliased in a system file
+(e.g., @file{/etc/profile}) to something problematic, e.g., @samp{ls
+--color=tty}. In that case, you will have to disable the alias before
+generating @file{ls-R}. For the precise definition of the file format,
+see @ref{Database format}.
+
+Regardless of whether you use the supplied script or your own, you
+will almost certainly want to invoke it via @code{cron}, so when you
+make changes in the installed files (say if you install a new @LaTeX{}
+package), @file{ls-R} will be automatically updated. However, for
+those using @TeX{} Live or system distributions, the package managers
+should run @code{mktexlsr} as needed.
+
+@opindex -A @r{option to @code{ls}}
+@cindex dot files
+@flindex . @r{files}
+@flindex . @r{directories, ignored}
+@flindex .tex @r{file, included in @file{ls-R}}
+The @samp{-A} option to @code{ls} includes files beginning with @samp{.}
+(except for @file{.} and @file{..}), such as the file @file{.tex}
+included with the @LaTeX{} tools package. (On the other hand,
+@emph{directories} whose names begin with @samp{.} are always ignored.)
+
+@cindex symbolic links, and @file{ls-R}
+@opindex -L @r{option to @code{ls}}
+If your system does not support symbolic links, omit the @samp{-L}.
+
+@cindex automounter, and @file{ls-R}
+@cindex NFS and @file{ls-R}
+@code{ls -LAR @var{/your/texmf/root}} will also work. But using
+@samp{./} avoids embedding absolute pathnames, so the hierarchy can be
+easily transported. It also avoids possible trouble with automounters
+or other network filesystem conventions.
+
+@cindex warning about unusable @file{ls-R}
+@cindex unusable @file{ls-R} warning
+Kpathsea warns you if it finds an @file{ls-R} file, but the file does
+not contain any usable entries. The usual culprit is running plain
+@samp{ls -R} instead of @samp{ls -LR ./} or @samp{ls -R
+@var{/your/texmf/root}}. Another possibility is some system directory
+name starting with a @samp{.} (perhaps if you are using AFS); Kpathsea
+ignores everything under such directories.
+
+@kindex !! @r{in path specifications}
+@cindex disk searching, avoiding
+If a particular path element begins with @samp{!!}, @emph{only} the
+database will be searched for that element, never the disk; and if the
+database does not exist, nothing at all will be searched. In @TeX{}
+Live, most of the trees are specified with @samp{!!}.
+
+For path elements that do not begin with @samp{!!}, if the database
+exists, it will be used, and the disk will not be searched. However,
+in this case, if the database does not exist, the disk will be
+searched. In @TeX{} Live, the most notable case of this is the
+@code{TEXMFHOME} tree, to allow users to add and remove files from
+their own tree without having to worry about @code{ls-R}.
+
+(Aside: there are uncommon cases where a @samp{!!} tree will be
+searched on disk even if the @code{ls-R} file exists; they are too
+obscure to try to explain here. See @file{pathsearch.c} in the source
+if you need to know.)
+
+To sum up: do not create an @code{ls-R} file unless you also take care
+to keep it up to date. Otherwise newly-installed files will not be
+found.
+
+
+
+@node Filename aliases
+@subsection Filename aliases
+
+@cindex filename aliases
+@cindex aliases, for filenames
+
+In some circumstances, you may wish to find a file under several names.
+For example, suppose a @TeX{} document was created using a DOS system
+and tries to read @file{longtabl.sty}. But now it's being run on a Unix
+system, and the file has its original name, @file{longtable.sty}. The
+file won't be found. You need to give the actual file
+@file{longtable.sty} an alias @samp{longtabl.sty}.
+
+@c As another example, suppose you are creating a @TeX{} distribution on a
+@c CD-ROM or a DOS system; then the file @file{mf.base} gets stored as
+@c @file{mf.bas}. But Metafont on Unix wants to find @file{mf.base}. Here
+@c you need to give the actual file @file{mf.bas} an alias @samp{mf.base}.
+
+You can handle this by creating a file @file{aliases} as a companion to
+the @file{ls-R} for the hierarchy containing the file in question. (You
+must have an @file{ls-R} for the alias feature to work.)
+
+The format of @file{aliases} is simple: two whitespace-separated words
+per line; the first is the real name @file{longtable.sty}, and second is
+the alias (@file{longtabl.sty}). These must be base filenames, with no
+directory components. @file{longtable.sty} must be in the sibling
+@file{ls-R}.
+
+Also, blank lines and lines starting with @samp{%} or @samp{#} are
+ignored in @file{aliases}, to allow for comments.
+
+If a real file @file{longtabl.sty} exists, it is used regardless of any
+aliases.
+
+
+@node Database format
+@subsection Database format
+
+@cindex format of external database
+@cindex database, format of
+
+The ``database'' read by Kpathsea is a line-oriented file of plain
+text. The format is that generated by GNU (and most other) @code{ls}
+programs given the @samp{-R} option, as follows.
+
+@itemize @bullet
+@item
+Blank lines are ignored.
+
+@item
+If a line begins with @samp{/} or @samp{./} or @samp{../} and ends with
+a colon, it's the name of a directory. (@samp{../} lines aren't useful,
+however, and should not be generated.)
+
+@item
+All other lines define entries in the most recently seen directory.
+@t{/}'s in such lines will produce possibly-strange results.
+
+@item
+Files with no preceding directory line are ignored.
+@end itemize
+
+For example, here's the first few lines of @file{ls-R} (which totals
+about 30K bytes) on my system:
+
+@example
+bibtex
+dvips
+fonts
+ls-R
+metafont
+metapost
+tex
+web2c
+
+./bibtex:
+bib
+bst
+doc
+
+./bibtex/bib:
+asi.bib
+btxdoc.bib
+@dots{}
+@end example
+
+
+@node Invoking kpsewhich
+@section @code{kpsewhich}: Standalone path searching
+
+@pindex kpsewhich
+@cindex path searching, standalone
+@cindex standalone path searching
+
+The Kpsewhich program exercises the path searching functionality
+independent of any particular application. This can also be useful as a
+sort of @code{find} program to locate files in your @TeX{} hierarchies,
+perhaps in administrative scripts. It is used heavily in the
+distributed @samp{mktex@dots{}} scripts.
+
+Synopsis:
+
+@example
+kpsewhich @var{option}@dots{} @var{filename}@dots{}
+@end example
+
+The options and filename(s) to look up can be intermixed.
+Options can start with either @samp{-} or @samp{--}, and any unambiguous
+abbreviation is accepted.
+
+@menu
+* Path searching options:: Changing the mode, resolution, etc.
+* Specially-recognized files:: Default formats for texmf.cnf, etc.
+* Auxiliary tasks:: Path and variable expansion, etc.
+* Standard options:: @samp{--help} and @samp{--version}.
+@end menu
+
+
+@node Path searching options
+@subsection Path searching options
+
+@cindex path searching options
+
+Kpsewhich looks up each non-option argument on the command line as a
+filename, and returns the first file found.
+
+Various options alter the path searching behavior:
+
+@table @samp
+@item --all
+@opindex --all
+@cindex all matches, finding
+Report all matches found, one per line. By default, if there is more
+than one match, just one will be reported (chosen effectively at
+random). Exception: with the glyph formats (@code{pk}, @code{gf}),
+this option has no effect and only the first match is returned.
+
+@item --casefold-search
+@itemx --no-casefold-search
+@opindex --casefold-search
+@opindex --no-casefold-search
+Explicitly enable or disable the fallback to a case-insensitive search
+on Unix platforms (@pxref{Casefolding search}); no effect on Windows.
+The default is enabled, set in @code{texmf.cnf}. Disabling
+(@code{--no-casefold-search}) does not mean that searches magically
+become case-sensitive when the underlying (file)system is
+case-insensitive, it merely means that Kpathsea does not do any
+casefolding itself.
+
+@item --cnf-line=@var{str}
+@opindex --cnf-line
+Parse @var{str} as if it were a line in the @file{texmf.cnf}
+configuration file (@pxref{Config files}), overriding settings in the
+actual configuration files, and also in the environment (@pxref{Path
+sources}). This is implemented by making any settings from @var{str}
+in the environment, overwriting any value already there. Thus, an
+extra colon in a @samp{--cnf-line} value will refer to the value from
+a configuration file, not a user-set environment variable.
+
+Furthermore, any variable set from @var{str} will also be set with the
+program name suffix. For example, @code{pdftex
+--cnf-line=TEXINPUTS=/foo:} will set both @code{TEXINPUTS} and
+@code{TEXINPUTS_pdftex} in the environment (and the value will be
+@file{/foo} followed by the setting from @file{texmf.cnf}, ignoring
+any user-set @code{TEXINPUTS}).
+
+This behavior is desirable because, in practice, many variables in the
+distributed @file{texmf.cnf} are program-specific, and the intuitive
+behavior is for values set on the command line with @code{--cnf-line}
+to override them.
+
+@item --dpi=@var{num}
+@opindex --dpi=@var{num}
+@opindex -D @var{num}
+@cindex resolution, setting
+Set the resolution to @var{num}; this only affects @samp{gf} and
+@samp{pk} lookups. @samp{-D} is a synonym, for compatibility with
+Dvips. Default is 600.
+
+@item --engine=@var{name}
+@opindex --engine=@var{name}
+@cindex engine name
+Set the engine name to @var{name}. By default it is not set. The
+engine name is used in some search paths to allow files with the same
+name but used by different engines to coexist.
+
+In particular, since the memory dump files
+(@file{.fmt}/@file{.base}/@file{.mem}) are now stored in
+subdirectories named for the engine (@file{tex}, @file{pdftex},
+@file{xetex}, etc.), you must specify an engine name in order to find
+them. For example, @file{cont-en.fmt} typically exists for both
+@file{pdftex} and @file{xetex}. With the default path settings, you
+can use @samp{--engine=/} to look for any dump file, regardless of
+engine; if a dump file exists for more than one engine, it's
+indeterminate which one is returned. (The @samp{/} ends up specifying
+a normal recursive search along the path where the dumps are stored,
+namely @samp{$TEXMF/web2c@{/$engine,@}}.)
+
+@item --format=@var{name}
+@opindex --format=@var{name}
+Set the format for lookup to @var{name}. By default, the format is
+guessed from the filename, with @samp{tex} being used if nothing else
+fits. The recognized filename extensions (including any leading
+@samp{.}) are also allowable @var{name}s.
+
+All formats also have a name, which is the only way to specify formats
+with no associated suffix. For example, for Dvips configuration files
+you can use @samp{--format="dvips config"}. (The quotes are for the
+sake of the shell.)
+
+Here's the current list of recognized names and the associated suffixes.
+@xref{Supported file formats}, for more information on each of these.
+
+The strings in parentheses are abbreviations recognized only by
+@code{kpsewhich} (not the underlying library calls). They are
+provided when it would otherwise require an argument containing a
+space to specify the format, to simplify quoting of calls from shells.
+
+@example
+gf: gf
+pk: pk
+bitmap font (bitmapfont):
+tfm: .tfm
+afm: .afm
+base: .base
+bib: .bib
+bst: .bst
+cnf: .cnf
+ls-R: ls-R ls-r
+fmt: .fmt
+map: .map
+mem: .mem
+mf: .mf
+mfpool: .pool
+mft: .mft
+mp: .mp
+mppool: .pool
+MetaPost support (mpsupport):
+ocp: .ocp
+ofm: .ofm .tfm
+opl: .opl .pl
+otp: .otp
+ovf: .ovf .vf
+ovp: .ovp .vpl
+graphic/figure: .eps .epsi
+tex: .tex .sty .cls .fd .aux .bbl .def .clo .ldf
+TeX system documentation (doc):
+texpool: .pool
+TeX system sources (source): .dtx .ins
+PostScript header: .pro
+Troff fonts (trofffont):
+type1 fonts: .pfa .pfb
+vf: .vf
+dvips config (dvipsconfig):
+ist: .ist
+truetype fonts: .ttf .ttc .TTF .TTC .dfont
+type42 fonts: .t42 .T42
+web2c files (web2c):
+other text files (othertext):
+other binary files (otherbin):
+misc fonts (miscfont):
+web: .web .ch
+cweb: .w .web .ch
+enc files: .enc
+cmap files (cmap):
+subfont definition files: .sfd
+opentype fonts: .otf
+pdftex config (pdftexconfig):
+lig files: .lig
+texmfscripts:
+lua: .lua .luatex .luc .luctex .texlua .texluc .tlu
+font feature files: .fea
+cid maps: .cid .cidmap
+mlbib: .mlbib .bib
+mlbst: .mlbst .bst
+clua: .dll .so
+ris: .ris
+bltxml: .bltxml
+@end example
+
+This option and @samp{--path} are mutually exclusive.
+
+@item --interactive
+@opindex --interactive
+@cindex interactive query
+After processing the command line, read additional filenames to look up
+from standard input.
+
+@item --mktex=@var{filetype}
+@itemx --no-mktex=@var{filetype}
+@opindex --mktex=@var{filetype}
+@opindex --no-mktex=@var{filetype}
+Turn on or off the @samp{mktex} script associated with @var{filetype}.
+Usual values for @var{filetype} are @samp{pk}, @samp{mf}, @samp{tex},
+and @samp{tfm}. By default, all are off in Kpsewhich, even if they
+are enabled for @TeX{}. This option implies setting
+@code{--must-exist}. @xref{mktex scripts}.
+
+@item --mode=@var{string}
+@opindex --mode=@var{string}
+Set the mode name to @var{string}; this also only affects @samp{gf} and
+@samp{pk} lookups. No default: any mode will be found. @xref{mktex
+script arguments}.
+
+@item --must-exist
+@opindex --must-exist
+Do everything possible to find the files, notably including searching
+the disk and running the @samp{mktex} scripts. By default, only the
+@file{ls-R} database is checked, in the interest of efficiency.
+
+@item --path=@var{string}
+@opindex --path=@var{string}
+Search along the path @var{string} (colon-separated as usual), instead
+of guessing the search path from the filename. @samp{//} and all the
+usual expansions are supported (@pxref{Path expansion}). This option
+and @samp{--format} are mutually exclusive. To output the complete
+directory expansion of a path, instead of doing a one-shot lookup, see
+@samp{--expand-path} and @samp{--show-path} in the following section.
+
+@item --progname=@var{name}
+@opindex --progname=@var{name}
+Set the program name to @var{name}; default is @samp{kpsewhich}. This
+can affect the search paths via the @samp{.@var{prognam}} feature in
+configuration files (@pxref{Config files}).
+
+@item --subdir=@var{string}
+@opindex --subdir=@var{string}
+Report only those matches whose directory part @emph{ends} with
+@var{string} (compared literally, except case is ignored on a
+case-insensitive operating system). For example, suppose there are
+two matches for a given name:
+
+@example
+kpsewhich foo.sty
+@result{} /some/where/foo.sty
+/another/place/foo.sty
+@end example
+
+@noindent
+Then we can narrow the result to what we are interested in with
+@option{--subdir}:
+
+@example
+kpsewhich --subdir=where foo.sty
+@result{} /some/where/foo.sty
+
+kpsewhich --subdir=place foo.sty
+@result{} /another/place/foo.sty
+@end example
+
+@noindent
+The string to match must be at the end of the directory part of the
+match, and it is taken literally, with no pattern matching:
+
+@example
+kpsewhich --subdir=another foo.sty
+@result{}
+@end example
+
+@noindent
+The string to match may cross directory components:
+
+@example
+kpsewhich --subdir=some/where foo.sty
+@result{} /some/where/foo.sty
+@end example
+
+@noindent
+@option{--subdir} implies @option{--all}; if there is more than one
+match, they will all be reported (in our example, both @samp{where}
+and @samp{place} end in @samp{e}):
+
+@example
+kpsewhich --subdir=e
+@result{} /some/where/foo.sty
+/another/place/foo.sty
+@end example
+
+@noindent
+Because of the above rules, the presence of a leading @samp{/} is
+important, since it ``anchors'' the match to a full component name:
+
+@example
+kpsewhich --subdir=/lace foo.sty
+@result{}
+@end example
+
+@noindent
+However, a trailing @samp{/} is immaterial (and ignored), since the
+match always takes place at the end of the directory part:
+
+@example
+kpsewhich --subdir=lace/ foo.sty
+@result{} /another/place/foo.sty
+@end example
+
+@noindent
+The purpose of these rules is to make it convenient to find results
+only within a particular area of the tree. For instance, a given
+script named @file{foo.lua} might exist within both
+@file{texmf-dist/scripts/pkg1/} and @file{texmf-dist/scripts/pkg2/}.
+By specifying, say, @samp{--subdir=/pkg1}, you can be sure of getting
+the one you are interested in.
+
+We only match at the end because a site might happen to install @TeX{}
+in @file{/some/coincidental/pkg1/path/}, and we wouldn't want to match
+@file{texmf-dist/scripts/pkg2/} that when searching for @samp{/pkg1}.
+
+@end table
+
+
+@node Specially-recognized files
+@subsection Specially-recognized files for @command{kpsewhich}
+
+@command{kpsewhich} recognizes a few special filenames on the command
+line and defaults to using the `known' file formats for them, merely
+to save the time and trouble of specifying the format. This is only a
+feature of @command{kpsewhich}; when using the Kpathsea library
+itself, none of these special filenames are recognized, and it's still
+up to the caller to specify the desired format.
+
+Here is the list of special filenames to @command{kpsewhich}, along
+with their corresponding format:
+
+@table @file
+
+@flindex config.ps
+@item config.ps
+@code{dvips config}
+
+@flindex dvipdfmx.cfg
+@item dvipdfmx.cfg
+@samp{other text files}
+
+@flindex fmtutil.cnf
+@item fmtutil.cnf
+@samp{web2c files}
+
+@flindex glyphlist.txt
+@item glyphlist.txt
+@samp{map}
+
+@flindex mktex.cnf
+@item mktex.cnf
+@samp{web2c files}
+
+@flindex pdfglyphlist.txt
+@item pdfglyphlist.txt
+@samp{map}
+
+@flindex pdftex.cfg
+@flindex pdftexconfig.tex
+@item pdftex.cfg
+@samp{pdftex config} (although @file{pdftex.cfg} is not used any more;
+look for the file @file{pdftexconfig.tex} instead.)
+
+@flindex texmf.cnf
+@item texmf.cnf
+@samp{cnf}
+
+@flindex XDvi
+@item XDvi
+@samp{other text files}
+
+@end table
+
+A user-specified format will override the above defaults.
+
+@flindex tcfmgr.map
+Another useful configuration file in this regard is @file{tcfmgr.map},
+found in @file{texmf/texconfig/tcfmgr.map}, which records various
+information about the above configuration files (among others).
+
+
+@node Auxiliary tasks
+@subsection Auxiliary tasks
+
+@cindex auxiliary tasks
+
+Kpsewhich provides some features in addition to path lookup as such:
+
+@table @samp
+@item --debug=@var{num}
+@opindex --debug=@var{num}
+Set debugging options to @var{num}. @xref{Debugging}.
+
+@item --expand-braces=@var{string}
+@opindex --expand-braces=@var{string}
+Output variable, tilde, and brace expansion of @var{string}, which is
+assumed to be a single path element. @xref{Path expansion}.
+
+@item --expand-path=@var{string}
+@opindex --expand-path=@var{string}
+Output the complete expansion of @var{string}, with each element
+separated by the usual path separator on the current system (@samp{;}
+on Windows, @samp{:} otherwise). This may be useful to construct a
+custom search path for a format not otherwise supported. To retrieve
+the search path for a format that is already supported, see
+@samp{--show-path}.
+
+Nonexistent directories are culled from the output:
+
+@example
+$ kpsewhich --expand-path '/tmp'
+@result{} /tmp
+$ kpsewhich --expand-path '/nonesuch'
+@result{}
+@end example
+
+For one-shot uses of an arbitrary (not built in to Kpathsea) path, see
+@samp{--path} (@pxref{Path searching options}).
+
+@item --expand-var=@var{string}
+@opindex --expand-var=@var{string}
+Output the variable and tilde expansion of @var{string}. For example,
+with the usual @file{texmf.cnf}, @samp{kpsewhich
+--expand-var='$TEXMF'} returns the @TeX{} system hierarchy root(s).
+@xref{Path expansion}. The specified @var{string} can contain
+anything, though, not just variable references. This calls
+@code{kpse_var_expand} (@pxref{Programming with config files}).
+
+@item --help-formats
+@opindex --help-formats
+Output information about each supported format (@pxref{Supported file
+formats}), including the names and abbreviations, variables
+looked for, and the original path.
+
+@item --safe-in-name=@var{name}
+@itemx --safe-out-name=@var{name}
+@opindex --safe-in-name=@var{name}
+@opindex --safe-out-name=@var{name}
+Exit successfully if @var{name} is safe to open for reading or
+writing, respectively, else unsuccessfully. No output is written.
+These tests take account of the related Kpathsea configuration
+settings (@pxref{Calling sequence}).
+
+@item --show-path=@var{name}
+@opindex --show-path=@var{name}
+Show the path that would be used for file lookups of file type
+@var{name}. Either a filename extension (@samp{pk}, @samp{.vf}, etc.)
+or an integer can be used, just as with @samp{--format}, described in
+the previous section.
+
+@item --var-brace-value=@var{variable}
+@opindex --var-brace-value=@var{variable}
+Like @samp{--var-value} (next), but also expands @samp{@{...@}}
+constructs. (@pxref{Brace expansion}). Thus, the value is assumed to
+possibly be several path elements, and @samp{~} is expanded at the
+beginning of each. The path separator is changed to that of the
+current system in the expansion.
+
+Example: @samp{FOO='.;~' kpsewhich --var-brace-value=FOO} outputs (on
+a Unix-ish system) @samp{.:/home/karl}, supposing the latter is the
+current user's home directory. Note that the @samp{;} in the source
+value, as commonly used in @file{texmf.cnf}, has changed to a
+@samp{:}, as the normal path separator on the current system. On a
+Windows-ish system, the @samp{;} would remain.
+
+@item --var-value=@var{variable}
+@opindex --var-value=@var{variable}
+Outputs the value of @var{variable} (a simple identifier like
+@samp{TEXMFDIST}, with no @samp{$} or other constructs), expanding
+@samp{$} (@pxref{Variable expansion}) and @samp{~} (@pxref{Tilde
+expansion}) constructs in the value. @samp{~} expansion happens at the
+beginning of the overall value and at the beginning of a variable
+expansion, but not arbitrarily within the string. Braces are not expanded.
+
+Example: @samp{--var-value=texmf_casefold_search} outputs (if the
+default is not changed) @samp{1}.
+
+Example to contrast with @samp{--var-brace-value}: @samp{FOO='.;~'
+kpsewhich --var-value=FOO} outputs @samp{.;~}, i.e., the same as the
+input value, on all systems.
+
+@end table
+
+
+@node Standard options
+@subsection Standard options
+
+@cindex standard options
+
+Kpsewhich accepts the standard GNU options:
+
+@itemize @bullet
+@item
+@opindex --help
+@samp{--help} prints a help message on standard output and exits
+successfully.
+
+@item
+@opindex --version
+@samp{--version} prints the Kpathsea version number and exits successfully.
+@end itemize
+
+
+@node TeX support
+@chapter @TeX{} support
+
+@cindex @TeX{} support
+
+Although the basic features in Kpathsea can be used for any type of
+path searching, it came about, as usual, with a specific application
+in mind: I wrote Kpathsea specifically for @TeX{} system programs. I
+had been struggling with the programs I was using (Dvips, Xdvi, and
+@TeX{} itself) having slightly different notions of how to specify
+paths; and debugging was painful, since no code was shared.
+
+Therefore, Kpathsea provides some @TeX{}-specific formats and
+features. Indeed, many of the purportedly generic path searching
+features were provided because they seemed useful in that con@TeX{}t
+(font lookup, particularly).
+
+Kpathsea provides a standard way to search for files of any of the
+supported file types; glyph fonts are a bit different than all the
+rest. Searches are based solely on names of files, not their
+contents---if a GF file is (mis)named @file{cmr10.600pk}, it will be
+found as a PK file.
+
+@menu
+* Supported file formats:: File types Kpathsea knows about.
+* File lookup:: Searching for most kinds of files.
+* Glyph lookup:: Searching for bitmap fonts.
+* Suppressing warnings:: Avoiding warnings via TEX_HUSH.
+* mktex scripts:: Generating files at runtime.
+@end menu
+
+
+@node Supported file formats
+@section Supported file formats
+
+@cindex supported file formats
+@cindex file formats, supported
+
+@cindex environment variables for @TeX{}
+@cindex @TeX{} environment variables
+
+Kpathsea has support for a number of file types. Each file type has a
+list of environment and config file variables that are checked to define
+the search path, and most have a default suffix that plays a role in
+finding files (see the next section). Some also define additional
+suffixes, and/or a program to be run to create missing files on the fly.
+
+@cindex program-varying paths
+Since environment variables containing periods, such as
+@samp{TEXINPUTS.latex}, are not allowed on some systems, Kpathsea looks
+for environment variables with an underscore, e.g.,
+@samp{TEXINPUTS_latex} (@pxref{Config files}).
+
+The following table lists the above information. You can also get the
+list by giving the @samp{--help-formats} option to @code{kpsewhich}
+(@pxref{Auxiliary tasks}).
+
+@table @samp
+@item afm
+@flindex .afm
+@vindex AFMFONTS
+(Adobe font metrics, @pxref{Metric files,,, dvips, Dvips})
+@code{AFMFONTS};
+suffix @samp{.afm}.
+
+@item base
+@flindex .base
+@vindex MFBASES
+@vindex TEXMFINI
+(Metafont memory dump, @pxref{Memory dumps,,, web2c, Web2c})
+@code{MFBASES}, @code{TEXMFINI};
+suffix @samp{.base}.
+
+@item bib
+@flindex .bib
+@vindex BIBINPUTS
+@vindex TEXBIB
+(Bib@TeX{} bibliography source, @pxref{bibtex invocation,,, web2c, Web2c})
+@code{BIBINPUTS}, @code{TEXBIB};
+suffix @samp{.bib}.
+
+@item bltxml
+@flindex .bltxml
+@vindex BLTXMLINPUTS
+(Bib@LaTeX{}ML bibliography files for Biber, @url{https://ctan.org/pkg/biber})
+@code{BLTXMLINPUTS}
+suffix @samp{.bltxml}.
+
+@item bst
+@flindex .bst
+@vindex BSTINPUTS
+(Bib@TeX{} style, @pxref{Basic BibTeX style files,, Basic Bib@TeX{}
+style files, web2c, Web2c})
+@code{BSTINPUTS};
+suffix @samp{.bst}.
+
+@item clua
+@flindex .dll
+@flindex .so
+@vindex CLUAINPUTS
+(dynamic libraries for Lua, @url{https://ctan.org/pkg/luatex})
+@code{CLUAINPUTS}
+suffixes @samp{.dll} and @samp{.so}.
+
+@item cmap
+@flindex .cmap
+@vindex CMAPFONTS
+(character map files)
+@code{CMAPFONTS};
+suffix @samp{.cmap}.
+
+@item cnf
+@flindex .cnf
+@vindex TEXMFCNF
+(Runtime configuration files, @pxref{Config files})
+@code{TEXMFCNF};
+suffix @samp{.cnf}.
+
+@item cweb
+@flindex .w
+@flindex .web
+@vindex CWEBINPUTS
+(CWEB input files)
+@code{CWEBINPUTS};
+suffixes @samp{.w}, @samp{.web};
+additional suffix @samp{.ch}.
+
+@item dvips config
+@vindex TEXCONFIG
+@flindex config.ps@r{, search path for}
+(Dvips @samp{config.*} files, such as @file{config.ps}, @pxref{Config
+files,,, dvips, Dvips})
+@code{TEXCONFIG}.
+
+@item enc files
+@flindex .enc
+@vindex ENCFONTS
+(encoding vectors)
+@code{ENCFONTS};
+suffix @samp{.enc}.
+
+@item fmt
+@flindex .fmt
+@vindex TEXFORMATS
+@vindex TEXMFINI
+(@TeX{} memory dump, @pxref{Memory dumps,,, web2c, Web2c})
+@code{TEXFORMATS}, @code{TEXMFINI};
+suffix @samp{.fmt}.
+
+@item font cid map
+@flindex .cid
+@vindex FONTCIDMAPS
+(CJK mapping)
+@code{FONTCIDMAPS}
+suffix @samp{.cid}.
+
+@item font feature files
+@flindex .fea
+@vindex FONTFEATURES
+(primarily for OpenType font features)
+@code{FONTFEATURES}
+suffix @samp{.fea}.
+
+@item gf
+@flindex gf
+@vindex GFFONTS
+@vindex GLYPHFONTS
+@vindex TEXFONTS
+(generic font bitmap, @pxref{Glyph files,,, dvips, Dvips})
+@code{@var{program}FONTS}, @code{GFFONTS}, @code{GLYPHFONTS}, @code{TEXFONTS};
+suffix @samp{gf}.
+
+@item graphic/figure
+@flindex .eps
+@flindex .epsi
+@vindex TEXPICTS
+@vindex TEXINPUTS
+(Encapsulated PostScript figures, @pxref{PostScript figures,,, dvips, Dvips})
+@code{TEXPICTS}, @code{TEXINPUTS};
+additional suffixes: @samp{.eps}, @samp{.epsi}.
+
+@item ist
+@flindex .ist
+@vindex TEXINDEXSTYLE
+@vindex INDEXSTYLE
+(makeindex style files)
+@code{TEXINDEXSTYLE}, @code{INDEXSTYLE};
+suffix @samp{.ist}.
+
+@item lig files
+@flindex .lig
+@vindex LIGFONTS
+(ligature definition files)
+@code{LIGFONTS};
+suffix @samp{.lig}.
+
+@item ls-R
+@flindex ls-R
+@vindex TEXMFDBS
+(Filename databases, @pxref{Filename database})
+@code{TEXMFDBS}.
+
+@item map
+@flindex .map
+@vindex TEXFONTMAPS
+(Fontmaps, @pxref{Fontmap})
+@code{TEXFONTMAPS};
+suffix @samp{.map}.
+
+@item mem
+@flindex .mem
+@vindex MPMEMS
+@vindex TEXMFINI
+(MetaPost memory dump, @pxref{Memory dumps,,, web2c, Web2c})
+@code{MPMEMS}, @code{TEXMFINI};
+suffix @samp{.mem}.
+
+@item @r{MetaPost support}
+@vindex MPSUPPORT
+(MetaPost support files, used by DMP; @pxref{dmp invocation,,, web2c, Web2c})
+@code{MPSUPPORT}.
+
+@item mf
+@flindex .mf
+@vindex MFINPUTS
+(Metafont source, @pxref{mf invocation,,, web2c, Web2c})
+@code{MFINPUTS};
+suffix @samp{.mf};
+dynamic creation program: @code{mktexmf}.
+
+@item mfpool
+@flindex .pool
+@vindex MFPOOL
+(Metafont program strings, @pxref{pooltype invocation,,, web2c, Web2c})
+@code{MFPOOL}, @code{TEXMFINI};
+suffix @samp{.pool}.
+
+@item mft
+@flindex .mft
+@vindex MFTINPUTS
+(@code{MFT} style file, @pxref{mft invocation,,, web2c, Web2c})
+@code{MFTINPUTS};
+suffix @samp{.mft}.
+
+@item misc fonts
+@vindex MISCFONTS
+(font-related files that don't fit the other categories)
+@code{MISCFONTS}
+
+@item mlbib
+@flindex .mlbib
+@vindex MLBIBINPUTS
+@vindex BIBINPUTS
+@vindex TEXBIB
+(MlBib@TeX{} bibliography source)
+@code{MLBIBINPUTS}, @code{BIBINPUTS}, @code{TEXBIB};
+suffixes @samp{.mlbib}, @samp{.mlbib}.
+
+@item mlbst
+@flindex .mlbst
+@vindex MLBSTINPUTS
+@vindex BSTINPUTS
+(MlBib@TeX{} style)
+@code{MLBSTINPUTS}, @code{BSTINPUTS};
+suffixes @samp{.mlbst}, @samp{.bst}.
+
+@item mp
+@flindex .mp
+@vindex MPINPUTS
+(MetaPost source, @pxref{mpost invocation,,, web2c, Web2c})
+@code{MPINPUTS};
+suffix @samp{.mp}.
+
+@item mppool
+@flindex .pool
+@vindex MPPOOL
+(MetaPost program strings, @pxref{pooltype invocation,,, web2c, Web2c})
+@code{MPPOOL}, @code{TEXMFINI};
+suffix @samp{.pool}.
+
+@item ocp
+@flindex .ocp
+@vindex OCPINPUTS
+(Omega compiled process files)
+@code{OCPINPUTS}; @*
+suffix @samp{.ocp};
+dynamic creation program: @code{MakeOmegaOCP}.
+
+@item ofm
+@flindex .ofm
+@vindex OFMFONTS
+(Omega font metrics)
+@code{OFMFONTS}, @code{TEXFONTS}; @*
+suffixes @samp{.ofm}, @samp{.tfm};
+dynamic creation program: @code{MakeOmegaOFM}.
+
+@item opentype fonts
+@vindex OPENTYPEFONTS
+(OpenType fonts)
+@code{OPENTYPEFONTS}.
+
+@item opl
+@flindex .opl
+(Omega property lists)
+@code{OPLFONTS}, @code{TEXFONTS};
+suffix @samp{.opl}.
+
+@item otp
+@flindex .otp
+@vindex OTPINPUTS
+(Omega translation process files)
+@code{OTPINPUTS};
+suffix @samp{.otp}.
+
+@item ovf
+@flindex .ovf
+@vindex OVFFONTS
+(Omega virtual fonts)
+@code{OVFFONTS}, @code{TEXFONTS};
+suffix @samp{.ovf}.
+
+@item ovp
+@flindex .ovp
+@vindex OVPFONTS
+(Omega virtual property lists)
+@code{OVPFONTS}, @code{TEXFONTS};
+suffix @samp{.ovp}.
+
+@item pdftex config
+@vindex PDFTEXCONFIG
+(PDF@TeX{}-specific configuration files)
+@code{PDFTEXCONFIG}.
+
+@item pk
+@flindex .pk
+@vindex PKFONTS
+@vindex TEXPKS
+@vindex GLYPHFONTS
+@vindex TEXFONTS
+(packed bitmap fonts, @pxref{Glyph files,,, dvips, Dvips})
+@code{@var{PROGRAM}FONTS} (@var{program} being @samp{XDVI}, etc.),
+@code{PKFONTS}, @code{TEXPKS}, @code{GLYPHFONTS}, @code{TEXFONTS};
+suffix @samp{pk};
+dynamic creation program: @code{mktexpk}.
+
+@item PostScript header
+@flindex .pro
+@vindex TEXPSHEADERS
+@vindex PSHEADERS
+(downloadable PostScript, @pxref{Header files,,, dvips, Dvips})
+@code{TEXPSHEADERS}, @code{PSHEADERS};
+additional suffix @samp{.pro}.
+
+@item ris
+@flindex .ris
+@vindex RISINPUTS
+(RIS bibliography files, primarily for Biber, @url{https://ctan.org/pkg/biber})
+@code{RISINPUTS}
+suffix @samp{.ris}.
+
+@item subfont definition files
+@flindex .sfd
+@vindex SFDFONTS
+(subfont definition files)
+@code{SFDFONTS}
+suffix @samp{.sfd}.
+
+@item tex
+@flindex .tex
+@vindex TEXINPUTS
+(@TeX{} source, @pxref{tex invocation,,, web2c, Web2c})
+@code{TEXINPUTS};
+suffix @samp{.tex};
+additional suffixes: none, because such a list cannot be complete;
+dynamic creation program: @code{mktextex}.
+
+@item TeX system documentation
+@flindex doc files
+@vindex TEXDOCS
+(Documentation files for the @TeX{} system)
+@code{TEXDOCS}.
+
+@item TeX system sources
+@flindex source files
+@vindex TEXSOURCES
+(Source files for the @TeX{} system)
+@code{TEXSOURCES}.
+
+@item texmfscripts
+@vindex TEXMFSCRIPTS
+(Architecture-independent executables distributed in the texmf trees)
+@code{TEXMFSCRIPTS}.
+
+@item texpool
+@flindex .pool
+@vindex TEXPOOL
+(@TeX{} program strings, @pxref{pooltype invocation,,, web2c, Web2c})
+@code{TEXPOOL}, @code{TEXMFINI};
+suffix @samp{.pool}.
+
+@item tfm
+@flindex .tfm
+@vindex TFMFONTS
+@vindex TEXFONTS
+(@TeX{} font metrics, @pxref{Metric files,,, dvips, Dvips})
+@code{TFMFONTS}, @code{TEXFONTS};
+suffix @samp{.tfm};
+dynamic creation program: @code{mktextfm}.
+
+@item Troff fonts
+@vindex TRFONTS
+(Troff fonts, used by DMP; @pxref{DMP invocation,,, web2c, Web2c})
+@code{TRFONTS}.
+
+@item truetype fonts
+@flindex .ttf
+@flindex .ttc
+@vindex TTFONTS
+(TrueType outline fonts) @code{TTFONTS}; suffixes @samp{.ttf} and
+@samp{.TTF}, @samp{.ttc} and @samp{.TTC}, @samp{.dfont}.
+
+@item type1 fonts
+@flindex .pfa
+@flindex .pfb
+@vindex T1FONTS
+@vindex T1INPUTS
+@vindex TEXPSHEADERS
+@vindex DVIPSHEADERS
+(Type 1 PostScript outline fonts, @pxref{Glyph files,,, dvips, Dvips})
+@code{T1FONTS}, @code{T1INPUTS}, @code{TEXPSHEADERS}, @code{DVIPSHEADERS};
+suffixes @samp{.pfa}, @samp{.pfb}.
+
+@item type42 fonts
+@vindex T42FONTS
+(Type 42 PostScript outline fonts) @code{T42FONTS}.
+
+@item vf
+@flindex .vf
+@vindex VFFONTS
+@vindex TEXFONTS
+(virtual fonts, @pxref{Virtual fonts,,, dvips, Dvips})
+@code{VFFONTS}, @code{TEXFONTS};
+suffix @samp{.vf}.
+
+@item web
+@flindex .web
+@vindex WEBINPUTS
+(WEB input files)
+@code{WEBINPUTS};
+suffix @samp{.web};
+additional suffix @samp{.ch}.
+
+@item web2c files
+@vindex WEB2C
+(files specific to the web2c implementation)
+@code{WEB2C}.
+@end table
+
+There are two special cases, because the paths and environment variables
+always depend on the name of the program: the variable name is
+constructed by converting the program name to upper case, and then
+appending @samp{INPUTS}. Assuming the program is called @samp{foo},
+this gives us the following table.
+
+@table @samp
+@item other text files
+@vindex FOOINPUTS
+(text files used by @samp{foo})
+@code{FOOINPUTS}.
+
+@item other binary files
+@vindex FOOINPUTS
+(binary files used by @samp{foo})
+@code{FOOINPUTS}.
+@end table
+
+If an environment variable by these names are set, the corresponding
+@file{texmf.cnf} definition won't be looked at (unless, as usual, the
+environment variable value has an extra @samp{:}). @xref{Default
+expansion}.
+
+For the font variables, the intent is that:
+@itemize @bullet
+@item
+@code{TEXFONTS} is the default for everything.
+
+@item
+@code{GLYPHFONTS} is the default for bitmap (or, more precisely,
+non-metric) files.
+
+@item
+Each font format has a variable of its own.
+
+@item
+@vindex XDVIFONTS
+@vindex DVIPSFONTS
+Each program has its own font override path as well; e.g.,
+@code{DVIPSFONTS} for Dvipsk. Again, this is for bitmaps, not metrics.
+
+@end itemize
+
+
+@node File lookup
+@section File lookup
+
+@cindex file lookup
+@cindex searching for files
+@cindex @TeX{} file lookup
+
+This section describes how Kpathsea searches for most files (bitmap font
+searches are the exception, as described in the next section).
+
+Here is the search strategy for a file @var{name}:
+
+@enumerate
+@item
+If the file format defines default suffixes, and the suffix of
+@var{name} name is not already a known suffix for that format, try the
+name with each default appended, and use alternative names found in
+the fontmaps if necessary. Example: given @samp{foo.bar}, look for
+@samp{foo.bar.tex}.
+
+@item
+Search for @var{name}, and if necessary for alternative names found in
+the fontmaps. Example: given @samp{foo.bar}, we also look for
+@samp{foo.bar}.
+
+@item
+If the file format defines a program to invoke to create missing files,
+run it (@pxref{mktex scripts}).
+@end enumerate
+
+@cindex extensions, filename
+@cindex suffixes, filename
+@vindex try_std_extension_first
+The order in which we search for ``suffixed'' name (item@tie{}1) or
+the ``as-is'' name (item@tie{}2) is controlled by the
+@file{try_std_extension_first} configuration value. The default set
+in @file{texmf.cnf} is true, since common suffixes are already
+recognized: @samp{babel.sty} will only look for @samp{babel.sty}, not
+@samp{babel.sty.tex}, regardless of this setting.
+
+When the suffix is unknown (e.g., @samp{foo.bar}), both names are
+always tried; the difference is the order in which they are tried.
+
+@file{try_std_extension_first} only affects names being looked up
+which *already* have an extension. A name without an extension (e.g.,
+@samp{tex story}) will always have an extension added first.
+
+@flindex tex-file.c
+@findex kpathsea_find_file
+This algorithm is implemented in the function
+@code{kpathsea_find_file} in the source file
+@file{kpathsea/tex-file.c}. You can watch it in action with the
+debugging options (@pxref{Debugging}).
+
+
+@node Glyph lookup
+@section Glyph lookup
+
+@cindex glyph lookup
+@cindex searching for glyphs
+@cindex @TeX{} glyph lookup
+
+This section describes how Kpathsea searches for a bitmap font in GF or
+PK format (or either) given a font name (e.g., @samp{cmr10}) and a
+resolution (e.g., 600).
+
+Here is an outline of the search strategy (details in the sections
+below) for a file @var{name} at resolution @var{dpi}. The search stops
+at the first successful lookup.
+
+@enumerate
+@item
+Look for an existing file @var{name}.@var{dpi}@var{format} in the
+specified format(s).
+
+@item If @var{name} is an alias for a file @var{f} in the fontmap
+file @file{texfonts.map}, look for @var{f}.@var{dpi}.
+
+@item Run an external program (typically named @samp{mktexpk}) to
+generate the font (@pxref{mktex scripts})
+
+@item Look for @var{fallback}.@var{dpi}, where @var{fallback} is some
+last-resort font (typically @samp{cmr10}).
+@end enumerate
+
+@flindex tex-glyph.c
+@findex kpathsea_find_glyph
+This is implemented in @code{kpathsea_find_glyph} in
+@file{kpathsea/tex-glyph.c}.
+
+@menu
+* Basic glyph lookup:: Features common to all glyph lookups.
+* Fontmap:: Aliases for fonts.
+* Fallback font:: Resolutions and fonts of last resort.
+@end menu
+
+
+@node Basic glyph lookup
+@subsection Basic glyph lookup
+
+@cindex basic glyph lookup
+@cindex common features in glyph lookup
+
+When Kpathsea looks for a bitmap font @var{name} at resolution @var{dpi}
+in a format @var{format}, it first checks each directory in the search
+path for a file @samp{@var{name}.@var{dpi}@var{format}}; for example,
+@samp{cmr10.600pk}. Kpathsea looks for a PK file first, then a GF file.
+
+If that fails, Kpathsea looks for
+@samp{dpi@var{dpi}/@var{name}.@var{format}}; for example,
+@samp{dpi600/cmr10.pk}. This is how fonts are typically stored on
+filesystems (such as DOS) that permit only three-character extensions.
+
+@cindex tolerance for glyph lookup
+@cindex glyph lookup bitmap tolerance
+@findex KPSE_BITMAP_TOLERANCE
+If that fails, Kpathsea looks for a font with a close-enough @var{dpi}.
+``Close enough'' is defined by the macro @code{KPSE_BITMAP_TOLERANCE} in
+@file{kpathsea/tex-glyph.h} to be @code{@var{dpi} / 500 + 1}. This is
+slightly more than the 0.2% minimum allowed by the DVI standard
+(@url{@var{CTAN:}/dviware/driv-standard/level-0}).
+
+
+@node Fontmap
+@subsection Fontmap
+
+@cindex fontmap files
+@cindex font alias files
+@cindex aliases for fonts
+
+@flindex texfonts.map
+If a bitmap font or metric file is not found with the original name (see
+the previous section), Kpathsea looks through any @dfn{fontmap} files
+for an @dfn{alias} for the original font name. These files are named
+@file{texfonts.map} and searched for along the @code{TEXFONTMAPS}
+environment/config file variable. All @file{texfonts.map} files that
+are found are read; earlier definitions override later ones.
+
+This feature is intended to help in two respects:
+
+@enumerate
+
+@item
+@cindex fontnames, arbitrary length
+An alias name is limited in length only by available memory, not by your
+filesystem. Therefore, if you want to ask for @samp{Times-Roman}
+instead of @file{ptmr}, you can (you get @samp{ptmr8r}).
+
+@item
+@cindex circle fonts
+@flindex lcircle10
+A few fonts have historically had multiple names: specifically,
+La@TeX{}'s ``circle font'' has variously been known as @file{circle10},
+@file{lcircle10}, and @file{lcirc10}. Aliases can make all the names
+equivalent, so that it no longer matters what the name of the installed
+file is; @TeX{} documents will find their favorite name.
+
+@end enumerate
+
+The format of fontmap files is straightforward:
+
+@itemize @bullet
+@cindex comments, in fontmap files
+@item Comments start with the last @samp{%} on a line and continue to
+the end of the line. (This provides for names that include a %,
+ill-advised as that may be.)
+
+@cindex whitespace, in fontmap files
+@item Blank lines are ignored.
+
+@item Each nonblank line is broken up into a series of @dfn{words}:
+ a sequence of non-whitespace characters.
+
+@findex include @r{fontmap directive}
+@item If the first word is @samp{include}, the second word is used as
+ a filename, and it is searched for and read.
+
+@item Otherwise, the first word on each line is the true filename;
+
+@item the second word is the alias;
+
+@item subsequent words are ignored.
+@end itemize
+
+If an alias has an extension, it matches only those files with that
+extension; otherwise, it matches anything with the same root, regardless
+of extension. For example, an alias @samp{foo.tfm} matches only when
+@file{foo.tfm} is being searched for; but an alias @samp{foo} matches
+@file{foo.vf}, @file{foo.600pk}, etc.
+
+As an example, here is an excerpt from the @file{texfonts.map} in the
+Web2c distribution. It makes the old and new names of the @LaTeX{}
+circle fonts equivalent.
+
+@example
+circle10 lcircle10
+circle10 lcirc10
+lcircle10 circle10
+lcircle10 lcirc10
+lcirc10 circle10
+lcirc10 lcircle10
+@dots{}
+@end example
+
+Fontmaps are implemented in the file @file{kpathsea/fontmap.c}.
+The Fontname distribution has much more information on font naming
+(@pxref{,,,fontname, Filenames for @TeX{} fonts}).
+
+
+@node Fallback font
+@subsection Fallback font
+
+@cindex fallback font
+@cindex fallback resolutions
+@cindex font of last resort
+@cindex resolutions, last-resort
+@cindex last-resort font
+
+@vindex DVIPSSIZES
+@vindex XDVISIZES
+@vindex DVILJSIZES
+@vindex TEXSIZES
+@vindex default_texsizes
+If a bitmap font cannot be found or created at the requested size,
+Kpathsea looks for the font at a set of @dfn{fallback resolutions}. You
+specify these resolutions as a colon-separated list (like search paths).
+Kpathsea looks first for a program-specific environment variable (e.g.,
+@code{DVIPSSIZES} for Dvipsk), then the environment variable
+@code{TEXSIZES}, then a default specified at compilation time (the Make
+variable @code{default_texsizes}). You can set this list to be empty if
+you prefer to find fonts at their stated size or not at all.
+
+@flindex cmr10@r{, as fallback font}
+@findex kpathsea_init_prog
+Finally, if the font cannot be found even at the fallback resolutions,
+Kpathsea looks for a fallback font, typically @file{cmr10}. Programs
+must enable this feature by calling @code{kpathsea_init_prog}
+(@pxref{Calling sequence}); the default is no fallback font.
+
+
+@node Suppressing warnings
+@section Suppressing warnings
+
+@cindex warnings, suppressing
+@cindex suppressing warnings
+
+@vindex TEX_HUSH
+Kpathsea provides a way to suppress selected usually-harmless warnings;
+this is useful at large sites where most users are not administrators,
+and thus the warnings are merely a source of confusion, not a help. To
+do this, you set the environment variable or configuration file value
+@code{TEX_HUSH} to a colon-separated list of values. Here are the
+possibilities:
+
+@vtable @samp
+@item all
+Suppress everything possible.
+
+@item checksum
+@cindex mismatched checksum warnings
+Suppress mismatched font checksum warnings.
+
+@item lostchar
+@cindex missing character warnings
+Suppress warnings when a character is missing from a font that a DVI or
+VF file tries to typeset.
+
+@item none
+Don't suppress any warnings.
+
+@item readable
+@cindex unreadable file warnings
+Suppress warnings about attempts to access a file whose permissions
+render it unreadable.
+
+@item special
+@cindex unknown special warnings
+@findex \special@r{, suppressing warnings about}
+Suppresses warnings about an unimplemented or unparsable
+@samp{\special} command.
+@end vtable
+
+@noindent @file{tex-hush.c} defines the function that checks the
+variable value. Each driver implements its own checks where
+appropriate.
+
+
+@node mktex scripts
+@section @file{mktex} scripts
+
+@cindex @file{mktex} scripts
+@cindex scripts for file creation
+
+@cindex font set, infinite
+@cindex dynamic creation of files
+@cindex Sauter fonts, and dynamic source creation
+@cindex EC fonts, and dynamic source creation
+If Kpathsea cannot otherwise find a file, for some file types it is
+configured by default to invoke an external program to create it
+dynamically (@pxref{mktex configuration}). These are collectively
+known as @dfn{@code{mktex} scripts}, since most of them are named
+@code{mktex...}.
+
+For example, this is useful for fonts (bitmaps, TFM's, and
+arbitrarily-sizable Metafont sources such as the Sauter and EC fonts),
+since any given document can use fonts never before referenced.
+Building all fonts in advance is therefore impractical, if not
+impossible.
+
+It is also useful for the @TeX{} @samp{.fmt} (and Metafont
+@samp{.base} and Metapost @samp{.mem} files, @pxref{Memory
+dumps,,,Web2c,web2c}), where pre-generating every format consumes a
+lot of both time and space.
+
+The script is passed the name of the file to create and possibly other
+arguments, as explained below. It must echo the full pathname of the
+file it created (and nothing else) to standard output; it can write
+diagnostics to standard error.
+
+@menu
+* config: mktex configuration.
+* names: mktex script names.
+* args: mktex script arguments.
+@end menu
+
+
+@node mktex configuration
+@subsection @file{mktex} configuration
+
+@cindex @file{mktex} script configuration
+@cindex configuration of @file{mktex} scripts
+@cindex enabling @file{mktex} scripts
+@cindex disabling @file{mktex} scripts
+
+The list of file types and program names that can run an external
+program to create missing files is listed in the next section. In the
+absence of @code{configure} options specifying otherwise, everything
+but @file{mktextex} will be enabled by default. The @code{configure}
+options to change the defaults are:
+
+@cindex @code{configure} options for @file{mktex} scripts
+@opindex --without-mktexfmt-default
+@opindex --without-mktexmf-default
+@opindex --without-mktexocp-default
+@opindex --without-mktexofm-default
+@opindex --without-mktexpk-default
+@opindex --without-mktextfm-default
+@opindex --with-mktextex-default
+@example
+--without-mktexfmt-default
+--without-mktexmf-default
+--without-mktexocp-default
+--without-mktexofm-default
+--without-mktexpk-default
+--without-mktextfm-default
+--with-mktextex-default
+@end example
+
+The @code{configure} setting is overridden if the environment variable
+or configuration file value named for the script is set; e.g.,
+@file{MKTEXPK} (@pxref{mktex script arguments}).
+
+@flindex fmtutils.cnf
+@code{mktexfmt} reads a file @file{fmtutil.cnf}, typically located in
+@file{texmf/web2c/} to glean its configuration information. The rest
+of the files and features in this section are primarily intended for
+the font generation scripts.
+
+@flindex mktex.cnf
+@flindex mktex.opt
+@cindex site overrides for @code{mktex@dots{}}
+As distributed, all the scripts source a file
+@file{texmf/web2c/mktex.cnf} if it exists, so you can override various
+defaults.
+See @file{mktex.opt}, for instance, which defines the default mode,
+resolution, some special directory names, etc. If you prefer not to
+change the distributed scripts, you can simply create @file{mktex.cnf}
+with the appropriate definitions (you do not need to create it if you
+have nothing to put in it). @file{mktex.cnf} has no special syntax;
+it's an arbitrary Bourne shell script. The distribution contains a
+sample @file{mktex.cnf} for you to copy and modify as you please (it
+is not installed anywhere).
+
+@flindex mktex.opt
+@vindex MT_FEATURES
+In addition, you can configure a number of features with the
+@code{MT_FEATURES} variable, which you can define:
+
+@itemize @bullet
+@item
+in @file{mktex.opt}, as just mentioned;
+
+@item
+by editing the file @file{mktex.opt}, either before @samp{make
+install} (in the source hierarchy) or after (in the installed
+hierarchy);
+
+@item
+or in the environment.
+@end itemize
+
+If none of the options below are enabled, @code{mktexpk},
+@code{mktextfm}, and @code{mktexmf} follow the following procedure to
+decide where fonts should be installed. Find the tree where the font's
+sources are, and test the permissions of the @samp{fonts} directory of
+that tree to determine whether it is writable. If it is, put the files
+in the tree in appropriate locations. If it isn't writable, see whether
+the tree is a system tree (named in @code{SYSTEXMF}). If so, the
+@code{VARTEXFONTS} tree is used. In all other cases the working
+directory is used.
+
+The @samp{appendonlydir} option is enabled by default.
+
+@vtable @samp
+@item appendonlydir
+@cindex directories, making append-only
+@flindex mktexdir
+Tell @code{mktexdir} to create directories append-only, i.e., set
+their sticky bit (@pxref{Mode Structure,,, coreutils, GNU Core
+Utilities}). This feature is silently ignored on non-Unix platforms
+(e.g. Windows/NT and MS-DOS) which don't support similar functionality.
+This feature is enabled by default.
+
+@item dosnames
+@cindex 8.3 filenames, using
+@cindex DOS compatible names
+@flindex dpi@var{nnn} directories
+Use 8.3 names; e.g., @file{dpi600/cmr10.pk} instead of
+@file{cmr10.600pk}. Note that this feature only affects filenames that
+would otherwise clash with other TeX-related filenames; @file{mktex}
+scripts do nothing about filenames which exceed the 8+3 MS-DOS limits
+but remain unique when truncated (by the OS) to these limits, and nether
+do the scripts care about possible clashes with files which aren't
+related with TeX. For example, @file{cmr10.600pk} would clash with
+@file{cmr10.600gf} and is therefore changed when @samp{dosnames} is in
+effect, but @file{mf.pool} and @file{mp.base} don't clash with any
+TeX-related files and are therefore unchanged.
+
+This feature is turned on by default on MS-DOS. If you do not wish
+@samp{dosnames} to be set on an MS-DOS platform, you need to set the
+@code{MT_FEATURES} environment variable to a value that doesn't include
+@samp{dosnames}. You can also change the default setting by editing
+@file{mktex.opt}, but only if you use the @file{mktex} shell scripts;
+the emulation programs don't consult @file{mktex.opt}.
+
+@item fontmaps
+@cindex fontmaps
+@cindex fontname
+Instead of deriving the location of a font in the destination tree from
+the location of the sources, the aliases and directory names from the
+Fontname distribution are used. (@pxref{Top,, Introduction, fontname,
+Fontname}).
+
+@item nomfdrivers
+@cindex metafont driver files
+Let mktexpk and mktextfm create metafont driver files in a temporary
+directory. These will be used for just one metafont run and not
+installed permanently.
+
+@item nomode
+@cindex mode directory, omitting
+Omit the directory level for the mode name; this is fine as long as
+you generate fonts for only one mode.
+
+@item stripsupplier
+@cindex supplier directory, omitting
+Omit the font supplier name directory level.
+
+@item striptypeface
+@cindex typeface directory, omitting
+Omit the font typeface name directory level.
+
+@item strip
+@cindex supplier directory, omitting
+@cindex typeface directory, omitting
+Omit the font supplier and typeface name directory levels. This feature
+is deprecated in favour of @samp{stripsupplier} and @samp{striptypeface}.
+
+@item varfonts
+@flindex /var/tmp/texfonts
+@vindex VARTEXFONTS
+@cindex Linux File System Standard
+When this option is enabled, fonts that would otherwise be written in
+system texmf tree go to the @code{VARTEXFONTS} tree instead. The
+default value in @file{kpathsea/Makefile.in} is
+@file{/var/tmp/texfonts}. The @cite{Linux File System Standard}
+recommends @file{/var/tex/fonts}.
+
+@vindex USE_VARTEXFONTS
+The @samp{varfonts} setting in @code{MT_FEATURES} is overridden by the
+@code{USE_VARTEXFONTS} environment variable: if set to @samp{1}, the
+feature is enabled, and if set to @samp{0}, the feature is disabled.
+
+@item texmfvar
+@vindex TEXMFVAR
+Force generated files that would go into a system tree (as defined by
+@code{SYSTEXMF}) into @code{TEXMFVAR}. Starting with te@TeX{}-3.0, the
+variable @code{TEXMFVAR} is always set. The @samp{varfonts} feature takes
+precedence if also set.
+
+@vindex USE_TEXMFVAR
+The @samp{texmfvar} setting in @code{MT_FEATURES} is overridden by the
+@code{USE_TEXMFVAR} environment variable: if set to @samp{1}, the
+feature is enabled, and if set to @samp{0}, the feature is disabled.
+@end vtable
+
+
+@node mktex script names
+@subsection @file{mktex} script names
+
+@cindex @file{mktex} script names
+@cindex names for @file{mktex} scripts
+
+The following table shows the default name of the script for each
+of the file types which support runtime generation.
+
+@table @file
+@item mktexfmt
+@pindex mktexfmt
+@pindex fmtutil
+(@samp{.fmt}, @samp{.base}, @samp{.mem}) @TeX{}/Metafont/MetaPost
+formats. This script is also named @command{fmtutil}, and reads
+@file{fmtutil.cnf} for configuration information.
+
+@item mktexmf
+@pindex mktexmf
+(@samp{.mf}) Metafont input files.
+
+@item mkocp
+@pindex mkocp
+(@samp{.ocp}) Omega compiled process files.
+
+@item mkofm
+@pindex mkofm
+(@samp{.ofm}) Omega font metric files.
+
+@item mktexpk
+@pindex mktexpk
+(@samp{pk}) Glyph fonts.
+
+@item mktextex
+@pindex mktextex
+(@samp{.tex}) @TeX{} input files (disabled by default).
+
+@item mktextfm
+@pindex mktextfm
+(@samp{.tfm}) TFM files.
+@end table
+
+@vindex DVIPSMAKEPK
+@vindex XDVIMAKEPK
+@vindex DVILJMAKEPK
+@noindent These names can be overridden by an environment variable specific
+to the program---for example, @code{DVIPSMAKEPK} for Dvipsk.
+
+@comment next two paragraphs are repeated in dvips.texi
+@flindex missfont.log
+@cindex failed @code{mktex@dots{}} script invocation
+If a @code{mktex@dots{}} script fails, the invocation is appended to a
+file @file{missfont.log} (by default) in the current directory. You can
+then execute the log file to create the missing files after fixing the
+problem.
+
+@vindex TEXMFOUTPUT
+@vindex MISSFONT_LOG
+If the current directory is not writable and the environment variable or
+configuration file value @code{TEXMFOUTPUT} is set, its value is
+used. Otherwise, nothing is written. The name @samp{missfont.log} is
+overridden by the @code{MISSFONT_LOG} environment variable or
+configuration file value.
+
+
+@node mktex script arguments
+@subsection @file{mktex} script arguments
+
+@cindex arguments to @file{mktex}
+
+The first argument to a @file{mktex} script is always the name
+of the file to be created.
+
+In the default @file{mktexpk} implementation, additional arguments may
+also be passed:
+
+@table @samp
+@item --dpi @var{num}
+Sets the resolution of the generated font to @var{num}.
+@item --mfmode @var{name}
+Sets the Metafont mode to @var{name}.
+@item --bdpi @var{num}
+Sets the ``base dpi'' for the font. This must match the mode being
+used.
+@item --mag @var{string}
+A ``magstep'' string suitable for the Metafont @code{mag} variable.
+This must match the combination of @var{bdpi} and @var{dpi} being used.
+@item --destdir @var{string}
+A directory name. If the directory is absolute, it is used as-is.
+Otherwise, it is appended to the root destination directory set in the
+script.
+@end table
+
+
+@node Programming
+@chapter Programming
+
+This chapter is for programmers who wish to use Kpathsea.
+@xref{Introduction}, for the conditions under which you may do so (in
+short, it is released under LGPLv2.1 or later).
+
+@menu
+* Overview: Programming overview. Introduction.
+* Calling sequence:: Specifics of what to call.
+* Program-specific files:: How to handle these.
+* Config: Programming with config files. Getting info from texmf.cnf.
+@end menu
+
+
+@node Programming overview
+@section Programming overview
+
+@cindex programming overview
+@cindex overview of programming with Kpathsea
+
+Aside from this manual, your best source of information is the source
+to the programs that use Kpathsea (@pxref{Introduction}). First,
+Kpsewhich is a small utility program whose sole purpose is to exercise
+the main path-searching functionality. Of the drivers, Dviljk is
+probably the simplest full application program. Xdvik adds VF support
+and the complication of X resources. Dvipsk adds the complication of
+its own config files. Web2c is source code I also maintain, so it
+uses Kpathsea rather straightforwardly, but is of course complicated
+by the Web to C translation.
+
+@cindex re-entrant API
+@cindex API, re-entrant
+When looking at these program sources, you should know that previous
+versions of the library had a different programming interface; the
+current interface supports re-entrancy. Historically, the library
+function names were prefixed with @code{kpse_} instead of
+@code{kpathsea_}, and they did not need an instance variable as first
+argument. This change was made in 2009. The old functions will never
+disappear, and can reliably continue to be used when they suffice, as
+they do for the programs above. The main application using the
+re-entrant API is the MetaPost library used by MetaPost and Lua@TeX{}.
+
+@flindex pathsearch.h
+@flindex tex-file.h
+@flindex tex-glyph.h
+@flindex kpathsea.h
+Beyond these examples, the @file{.h} files in the Kpathsea source
+describe the interfaces and functionality (and of course the @file{.c}
+files define the actual routines, which are the ultimate documentation).
+@file{pathsearch.h} declares the basic searching routine.
+@file{tex-file.h} and @file{tex-glyph.h} define the interfaces for
+looking up particular kinds of files. In view of the way the headers
+depend on each other, it is recommended to use @code{#include
+<kpathsea/kpathsea.h>}, which includes every Kpathsea header.
+
+@flindex config.h
+@flindex c-auto.h
+If you want to include only specific headers, you should still consider
+including @file{kpathsea/config.h} before including any other Kpathsea
+header, as it provides symbols used in the other headers. Note that
+@file{kpathsea/config.h} includes @file{kpathsea/c-auto.h}, which is
+generated by Autoconf.
+
+@cindex file types, registering new
+The library provides no way for an external program to register new file
+types: @file{tex-file.[ch]} must be modified to do this. For example,
+Kpathsea has support for looking up Dvips config files, even though no
+program other than Dvips will likely ever want to do so. I felt this
+was acceptable, since along with new file types should also come new
+defaults in @file{texmf.cnf} (and its descendant @file{paths.h}), since
+it's simplest for users if they can modify one configuration file for
+all kinds of paths.
+
+Kpathsea does not parse any formats itself; it barely opens any files.
+Its primary purpose is to return filenames. The GNU font utilities does
+contain libraries to read TFM, GF, and PK files, as do the programs
+above, of course.
+
+
+@node Calling sequence
+@section Calling sequence
+
+@cindex programming with Kpathsea
+@cindex calling sequence
+
+The typical way to use Kpathsea in your program goes something like this:
+
+@enumerate
+
+@item
+@findex kpathsea_new
+Call @code{kpathsea_new} to create a new library instance. This variable
+must be passed as the first argument to all the following library functions.
+The rest of this manual will be using @code{kpse} as a placeholder for
+the name of this variable.
+
+@item
+@findex kpathsea_set_program_name
+@vindex argv[0]
+Call @code{kpathsea_set_program_name} with @code{argv[0]} as the second
+argument; the third argument is a string or @code{NULL}. The third
+argument is used by Kpathsea as the program name for the
+@code{.@var{program}} feature of config files (@pxref{Config files}).
+If the third argument is @code{NULL}, the value of the second argument
+is used. This function must be called before any other use of the
+Kpathsea library.
+
+@vindex kpse->invocation_name
+@vindex kpse->invocation_short_name
+@vindex kpse->program_name
+@cindex error message macros
+@code{kpathsea_set_program_name} always sets the variables
+@code{kpse->invocation_name} and @code{kpse->invocation_short_name}.
+These variables are used in the error message macros defined in
+@file{kpathsea/lib.h}. It sets the variable
+@code{kpse->program_name} to the program name it uses.
+
+@vindex KPATHSEA_DEBUG
+It also initializes debugging options based on the environment
+variable @code{KPATHSEA_DEBUG} (if that is set).
+
+@cindex SELFAUTOLOC
+@cindex SELFAUTODIR
+@cindex SELFAUTOPARENT
+@cindex symlinks, resolving
+@cindex expanding symlinks
+Finally, it sets the environment variables @code{SELFAUTOLOC}, @code{SELFAUTODIR}
+and @code{SELFAUTOPARENT} to the location, parent and grandparent
+directory of the executable, removing @file{.} and @file{..} path
+elements and resolving symbolic links. These are used in the default
+configuration file to allow people to invoke TeX from anywhere. You
+can use @samp{kpsewhich --expand-var=\$SELFAUTOLOC}, etc., to see the
+values.
+
+@item
+@vindex kpse->debug @r{variable}
+@cindex debugging options, in Kpathsea-using program
+Set debugging options. @xref{Debugging}. If your program doesn't have a
+debugging option already, you can define one and set
+@code{kpse->debug} to the number that the user supplies (as in Dviljk
+and Web2c), or you can just omit this altogether (people can always set
+@code{KPATHSEA_DEBUG}). If you do have runtime debugging already, you
+need to merge Kpathsea's options with yours (as in Dvipsk and Xdvik).
+
+@item
+@vindex client_path @r{in @code{kpse->format_info}}
+@vindex kpse->format_info
+@flindex resident.c
+@cindex config files, for Kpathsea-using programs
+If your program has its own configuration files that can define search
+paths, you should assign those paths to the @code{client_path} member in
+the appropriate element of the @code{kpse->format_info} array. (This
+array is indexed by file type; see @file{tex-file.h}.) See
+@file{resident.c} in Dvipsk for an example.
+
+@item
+@findex kpathsea_init_prog
+@flindex proginit.h
+Call @code{kpathsea_init_prog} (see @file{proginit.c}). It's useful for the
+DVI drivers, at least, but for other programs it may be simpler to
+extract the parts of it that actually apply. This does not initialize
+any paths, it just looks for (and sets) certain environment variables
+and other random information. (A search path is always initialized at
+the first call to find a file of that type; this eliminates much useless
+work, e.g., initializing the Bib@TeX{} search paths in a DVI driver.)
+
+@item
+@findex kpathsea_find_file
+The routine to actually find a file of type @var{format} is
+@file{kpathsea_find_file}. You can call
+@code{kpathsea_find_file} after doing only the first and second of the
+initialization steps above---Kpathsea automatically reads the
+@file{texmf.cnf} generic config files, looks for environment variables,
+and does expansions at the first lookup.
+
+@item
+To find PK and/or GF bitmap fonts, the routine
+is @code{kpathsea_find_glyph}, defined in
+@file{tex-glyph.h}. This returns a structure in addition to the
+resultant filename, because fonts can be found in so many ways. See the
+documentation in the source.
+
+@item
+@findex kpathsea_open_file
+To actually open a file, not just return a filename, call
+@code{kpathsea_open_file}. This function takes the name to look up and a
+Kpathsea file format as arguments, and returns the usual @code{FILE *}.
+It always assumes the file must exist, and thus will search the disk if
+necessary (unless the search path specified @samp{!!}, etc.). In other
+words, if you are looking up a VF or some other file that need not
+exist, don't use this.
+
+@item
+@findex kpathsea_out_name_ok
+@TeX{} can write output files, via the @code{\openout} primitive; this opens
+a security hole vulnerable to Trojan horse attack: an unwitting user could
+run a @TeX{} program that overwrites, say, @file{~/.rhosts}. Analogous
+security holes exist for many other programs. To alleviate this, there is a
+configuration variable @code{openout_any}, which selects one of three levels
+of security. When it is set to @samp{a} (for ``any''), no restrictions are
+imposed. When it is set to @samp{r} (for ``restricted''), filenames
+beginning with @samp{.} are disallowed (except @file{.tex} because @LaTeX{}
+needs it). When it is set to @samp{p} (for ``paranoid'') additional
+restrictions are imposed: an absolute filename must refer to a file in (a
+subdirectory) of @code{TEXMFOUTPUT}, and any attempt to go up a directory
+level is forbidden (that is, paths may not contain a @samp{..} component).
+The paranoid setting is the default. (For backwards compatibility, @samp{y}
+and @samp{1} are synonyms of @samp{a}, while @samp{n} and @samp{0} are
+synonyms for @samp{r}.) The function @code{kpathsea_out_name_ok}, with a
+filename as second argument, returns @code{true} if that filename is
+acceptable to be opend for output or @code{false} otherwise.
+
+@item
+@findex kpathsea_in_name_ok
+Similarly, the function @code{kpathsea_in_name_ok}, with a filename as
+second argument, returns @code{true} if that filename is acceptable to be
+opend for input or @code{false} otherwise, depending on the value of the
+configuration variable @code{openin_any} (with @samp{a} as default).
+
+@item
+@findex kpathsea_finish
+To close the kpathsea library instance you are using, call
+@code{kpathsea_finish}. This function closes any open log files and
+frees the memory used by the instance.
+
+@end enumerate
+
+@cindex hash table routines
+@cindex memory allocation routines
+@cindex string routines
+@cindex reading arbitrary-length lines
+@cindex input lines, reading
+@cindex lines, reading arbitrary-length
+Kpathsea also provides many utility routines. Some are generic: hash
+tables, memory allocation, string concatenation and copying, string
+lists, reading input lines of arbitrary length, etc. Others are
+filename-related: default path, tilde, and variable expansion,
+@code{stat} calls, etc. (Perhaps someday I'll move the former to a
+separate library.)
+
+@flindex c-*.h
+@pindex autoconf@r{, recommended}
+The @file{c-*.h} header files can also help your program adapt to many
+different systems. You will almost certainly want to use Autoconf and
+probably Automake for configuring and building your software if you use
+Kpathsea; I strongly recommend using Autoconf and Automake regardless.
+They are available from @url{https://gnu.org/software}.
+
+
+@node Program-specific files
+@section Program-specific files
+
+Many programs will need to find some configuration files. Kpathsea
+contains some support to make it easy to place them in their own
+directories. The Standard @TeX{} directory structure (@pxref{Top,,
+Introduction, tds, A Directory Structure for @TeX{} files}), specifies
+that such files should go into a subdirectory named after the program,
+like @samp{texmf/ttf2pk}.
+
+Two formats, @samp{kpse_program_text_format} and
+@samp{kpse_program_binary_format}, use @code{.:$TEXMF/@var{program}//}
+as their compiled-in search path. To override this default, you can
+use the variable @code{@var{PROGRAM}INPUTS} in the environment and/or
+@samp{texmf.cnf}. That is to say, the name of the variable is
+constructed by converting the name of the program to upper case, and
+appending @code{INPUTS}.
+
+The only difference between these two formats is whether
+@code{kpathsea_open_file} will open the files it finds in text or binary
+mode.
+
+
+@node Programming with config files
+@section Programming with config files
+
+@cindex programming with config files
+@cindex config files, programming with
+
+You can (and probably should) use the same @code{texmf.cnf}
+configuration file that Kpathsea uses for your program. This helps
+installers by keeping all configuration in one place.
+
+@findex kpathsea_var_value
+@flindex variable.h
+@vindex shell_escape@r{, example for code}
+To retrieve a value for a configuration variable @var{var}, the best
+way is to call @code{kpathsea_var_value} on the string
+@code{@var{var}}. This will look first for an environment variable
+@var{var}, then a config file value. The result will be the value
+found or @samp{NULL}. This function is declared in
+@file{kpathsea/variable.h}. For an example, see the
+@code{shell_escape} code in @file{web2c/lib/texmfmp.c}.
+
+The routine to do full variable and tilde expansion of an arbitrary
+string in the context of a search path (as opposed to simply
+retrieving a value) is @code{kpathsea_var_expand}, also declared in
+@file{kpathsea/variable.h}. However, it's generally only necessary to
+set the search path structure components as explained in the previous
+section instead of using this directly. Because of its usage with any
+input string, undefined @code{$FOO} constructs in the argument to
+@code{kpathsea_var_expand} are returned literally (@code{"$FOO"}),
+while undefined @code{$@{FOO@}} constructs are expanded to the empty
+string.
+
+@findex kpathsea_cnf_get
+@flindex cnf.h
+If for some reason you want to retrieve a value @emph{only} from a
+config file, not automatically looking for a corresponding environment
+variable, call @code{kpathsea_cnf_get} (declared in @file{kpathsea/cnf.h})
+with the string @var{var}.
+
+No initialization calls are needed.
+
+
+@node Reporting bugs
+@chapter Reporting bugs
+
+@cindex reporting bugs
+@cindex bugs, reporting
+
+@flindex tex-k@@tug.org @r{(bug address)}
+@cindex bug address
+If you have problems or suggestions, please report them to
+@email{tex-k@@tug.org} using the bug checklist below.
+
+Please report bugs in the documentation; not only factual errors or
+inconsistent behavior, but unclear or incomplete explanations, typos,
+wrong fonts, @dots{}
+
+@menu
+* Bug checklist:: What to include in a good bug report.
+* Mailing lists:: Joining the bugs or announcements mailing lists.
+* Debugging:: Analyzing runtime problems.
+* Logging:: Recording searches.
+* Common problems:: When things go wrong.
+@end menu
+
+
+@node Bug checklist
+@section Bug checklist
+
+@cindex checklist for bug reports
+@cindex bug checklist
+
+Before reporting a bug, please check below to be sure it isn't already
+known (@pxref{Common problems}).
+
+Bug reports should be sent via electronic mail to
+@email{tex-k@@tug.org}.
+
+The general principle is that a good bug report includes all the
+information necessary for reproduction. Therefore, to enable
+investigation, your report should include the following:
+
+@itemize @bullet
+@item
+@cindex version numbers, determining
+The version number(s) of the program(s) involved, and of Kpathsea
+itself. You can get the former by giving a sole option @samp{--version}
+to the program, and the latter by running @samp{kpsewhich --version}.
+The @file{NEWS} and @file{ChangeLog} files also contain the version
+number.
+
+@item
+@pindex uname
+The hardware, operating system (including version), compiler, and
+@code{make} program you are using (the output of @code{uname -a} is a
+start on the first two, though incomplete).
+
+@item
+@flindex config.log
+Any options you gave to @code{configure}. This is recorded in the
+@file{config.status} files.
+
+@cindex configuration bugs
+@flindex config.status
+If you are reporting a bug in @samp{configure} itself, it's probably
+system-dependent, and it will be unlikely the maintainers can do
+anything useful if you merely report that thus-and-such is broken.
+Therefore, you need to do some additional work: for some bugs, you can
+look in the file @file{config.log} where the test that failed should
+appear, along with the compiler invocation and source program in
+question. You can then compile it yourself by hand, and discover why
+the test failed. Other @samp{configure} bugs do not involve the
+compiler; in that case, the only recourse is to inspect the
+@code{configure} shell script itself, or the Autoconf macros that
+generated @code{configure}.
+
+@item
+The log of all debugging output, if the bug is in path searching. You
+can get this by setting the environment variable @code{KPATHSEA_DEBUG}
+to @samp{-1} before running the program. Please look at the log
+yourself to make sure the behavior is really a bug before reporting it;
+perhaps ``old'' environment variable settings are causing files not to
+be found, for example.
+
+@item
+The contents of any input files necessary to reproduce the bug. For
+bugs in DVI-reading programs, for example, this generally means a DVI
+file (and any EPS or other files it uses)---@TeX{} source files are
+helpful, but the DVI file is required, because that's the actual
+program input.
+
+@item
+@cindex context diff
+@cindex sending patches
+@flindex ChangeLog @r{entry}
+If you are sending a patch (do so if you can!), please do so in the form
+of a context diff (@samp{diff -c}) against the original distribution
+source. Any other form of diff is either not as complete or harder for
+me to understand. Please also include a @file{ChangeLog} entry.
+
+@item
+@cindex stack trace
+@cindex debugger
+@cindex crashes, reporting
+@cindex core dumps, reporting
+@cindex null pointers, dereferencing
+@pindex gdb@r{, recommended}
+If the bug involved is an actual crash (i.e., core dump), it is easy
+and useful to include a stack trace from a debugger (I recommend the
+GNU debugger GDB (@url{https://gnu.org/software/gdb}). If the
+cause is apparent (a @code{NULL} value being dereferenced, for
+example), please send the details along. If the program involved is
+@TeX{} or Metafont, and the crash is happening at apparently-sound
+code, however, the bug may well be in the compiler, rather than in the
+program or the library (@pxref{TeX or Metafont failing,, @TeX{} or
+Metafont failing}).
+
+@item
+Any additional information that will be helpful in reproducing,
+diagnosing, or fixing the bug.
+@end itemize
+
+
+@node Mailing lists
+@section Mailing lists
+
+@cindex mailing lists
+@cindex bug mailing list
+@cindex announcement mailing list
+
+@flindex tex-k@@tug.org
+Web2c and Kpathsea in general are discussed on the mailing list
+@email{tex-k@@tug.org}. You can subscribe and peruse the archives on
+the web @url{https://lists.tug.org/tex-k}.
+
+You do not need to join to submit a report, nor will it affect whether
+you get a response. Be aware that large data files are sometimes
+included in bug reports. If this is a problem for you, do not join
+the list.
+
+If you are looking for general @TeX{} help, such as how to install a
+full @TeX{} system or how to use @LaTeX{}, please see
+@url{https://tug.org/begin.html}.
+
+
+@node Debugging
+@section Debugging
+
+@cindex debugging
+@cindex runtime debugging
+@cindex options for debugging
+
+@vindex kpse->debug
+@flindex debug.h
+Kpathsea provides a number of runtime debugging options, detailed below
+by their names and corresponding numeric values. When the files you
+expect aren't being found, the thing to do is enable these options and
+examine the output.
+
+You can set these with some runtime argument (e.g., @samp{-d}) to the
+program; in that case, you should use the numeric values described in
+the program's documentation (which, for Dvipsk and Xdvik, are different
+than those below). It's best to give the @samp{-d} (or whatever) option
+first, for maximal output. Dvipsk and Xdvik have additional
+program-specific debugging options as well.
+
+@vindex KPATHSEA_DEBUG
+@vindex kpse->debug
+You can also set the environment variable @code{KPATHSEA_DEBUG}; in this
+case, you should use the numbers below. If you run the program under a
+debugger and set the instance variable @code{kpse->debug}, also use the numbers
+below.
+
+@kindex -1 @r{debugging value}
+In any case, by far the simplest value to use is @samp{-1}, which will
+turn on all debugging output. This is usually better than guessing
+which particular values will yield the output you need.
+
+@cindex debugging output
+@cindex standard error and debugging output
+Debugging output always goes to standard error, so you can redirect it
+easily. For example, in Bourne-compatible shells:
+@example
+dvips -d -1 @dots{} 2>/tmp/debug
+@end example
+
+@cindex Kpsewhich, and debugging
+It is sometimes helpful to run the standalone Kpsewhich utility
+(@pxref{Invoking kpsewhich}), instead of the original program.
+
+@cindex numeric debugging values
+In any case, you cannot use the names below; you must always use
+somebody's numbers. (Sorry.) To set more than one option, just sum
+the corresponding numbers.
+
+@vtable @code
+@item KPSE_DEBUG_STAT @r{(1)}
+Report @samp{stat}(2) calls. This is useful for verifying that your
+directory structure is not forcing Kpathsea to do many additional file
+tests (@pxref{Slow path searching}, and @pxref{Subdirectory
+expansion}). If you are using an up-to-date @file{ls-R} database
+(@pxref{Filename database}), this should produce no output unless a
+nonexistent file that must exist is searched for.
+
+@item KPSE_DEBUG_HASH @r{(2)}
+Report lookups in all hash tables: @file{ls-R} and @file{aliases}
+(@pxref{Filename database}); font aliases (@pxref{Fontmap}); and config
+file values (@pxref{Config files}). Useful when expected values are not
+being found, e.g.., file searches are looking at the disk instead of
+using @file{ls-R}.
+
+@item KPSE_DEBUG_FOPEN @r{(4)}
+@findex fopen@r{, redefined}
+Report file openings and closings. Especially useful when your system's
+file table is full, for seeing which files have been opened but never
+closed. In case you want to set breakpoints in a debugger: this works by
+redefining @samp{fopen} (@samp{fclose}) to be @samp{kpse_fopen_trace}
+(@samp{kpse_fclose_trace}).
+
+@item KPSE_DEBUG_PATHS @r{(8)}
+@tindex kpse_format_info_type
+Report general path information for each file type Kpathsea is asked to
+search. This is useful when you are trying to track down how a
+particular path got defined---from @file{texmf.cnf}, @file{config.ps},
+an environment variable, the compile-time default, etc. This is the
+contents of the @code{kpse_format_info_type} structure defined in
+@file{tex-file.h}.
+
+@item KPSE_DEBUG_EXPAND @r{(16)}
+Report the directory list corresponding to each path element Kpathsea
+searches. This is only relevant when Kpathsea searches the disk, since
+@file{ls-R} searches don't look through directory lists in this way.
+
+@item KPSE_DEBUG_SEARCH @r{(32)}
+Report on each file search: the name of the file searched for, the path
+searched in, whether or not the file must exist (when drivers search for
+@file{cmr10.vf}, it need not exist), and whether or not we are
+collecting all occurrences of the file in the path (as with, e.g.,
+@file{texmf.cnf} and @file{texfonts.map}), or just the first (as with
+most lookups). This can help you correlate what Kpathsea is doing with
+what is in your input file.
+
+@item KPSE_DEBUG_VARS @r{(64)}
+Report the value of each variable Kpathsea looks up. This is useful for
+verifying that variables do indeed obtain their correct values.
+
+@item GSFTOPK_DEBUG @r{(128)}
+Activates debugging printout specific to @code{gsftopk} program.
+
+@item MAKETEX_DEBUG @r{(512)}
+If you use the optional @code{mktex} programs instead of the
+traditional shell scripts, this will report the name of the site file
+(@file{mktex.cnf} by default) which is read, directories created by
+@code{mktexdir}, the full path of the @file{ls-R} database built by
+@code{mktexlsr}, font map searches, @code{MT_FEATURES} in effect,
+parameters from @code{mktexnam}, filenames added by
+@code{mktexupd}, and some subsidiary commands run by the programs.
+
+@item MAKETEX_FINE_DEBUG @r{(1024)}
+When the optional @code{mktex} programs are used, this will print
+additional debugging info from functions internal to these programs.
+@end vtable
+
+@cindex @samp{kdebug:}
+@vindex hash_summary_only @r{variable for debugging}
+@cindex hash table buckets, printing
+Debugging output from Kpathsea is always written to standard error, and
+begins with the string @samp{kdebug:}. (Except for hash table buckets,
+which just start with the number, but you can only get that output
+running under a debugger. See comments at the @code{hash_summary_only}
+variable in @file{kpathsea/db.c}.)
+
+
+@node Logging
+@section Logging
+
+@cindex log file
+
+@cindex logging successful searches
+@cindex recording successful searches
+@cindex usage patterns, finding
+@cindex disk usage, reducing
+Kpathsea can record the time and filename found for each successful
+search. This may be useful in finding good candidates for deletion when
+your filesystem is full, or in discovering usage patterns
+at your site.
+
+@vindex TEXMFLOG
+To do this, define the environment or config file variable
+@code{TEXMFLOG}. The value is the name of the file to append the
+information to. The file is created if it doesn't exist, and appended
+to if it does.
+
+@cindex epoch, seconds since
+@findex time @r{system call}
+Each successful search turns into one line in the log file: two words
+separated by a space. The first word is the time of the search, as the
+integer number of seconds since ``the epoch'', i.e., UTC midnight 1
+January 1970 (more precisely, the result of the @code{time} system
+call). The second word is the filename.
+
+For example, after @code{setenv TEXMFLOG /tmp/log}, running Dvips on
+@file{story.dvi} appends the following lines:
+
+@example
+774455887 /usr/local/share/texmf/dvips/config.ps
+774455887 /usr/local/share/texmf/dvips/psfonts.map
+774455888 /usr/local/share/texmf/dvips/texc.pro
+774455888 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmbx10.600pk
+774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmsl10.600pk
+774455889 /usr/local/share/texmf/fonts/pk/ljfour/public/cm/cmr10.600pk
+774455889 /usr/local/share/texmf/dvips/texc.pro
+@end example
+
+@cindex privacy, semblance of
+@noindent Only filenames that are absolute are recorded, to preserve
+some semblance of privacy.
+
+In addition to this Kpathsea-specific logging, @command{pdftex}
+provides an option @option{-recorder} to write the names of all files
+accessed during a run to the file @file{@var{basefile}.fls}.
+
+Finally, most systems provide a general tool to output each system
+call, thus including opening and closing files. It might be named
+@command{strace}, @command{truss}, @command{struss}, or something
+else.
+
+
+@node Common problems
+@section Common problems
+
+@cindex common problems
+@cindex problems, common
+@cindex FAQ, Kpathsea
+
+Here are some common problems with configuration, compilation, linking,
+execution, @dots{}
+
+@menu
+* Unable to find files:: If your program can't find fonts (or whatever).
+* Slow path searching:: If it takes forever to find anything.
+* Unable to generate fonts:: If mktexpk fails.
+* TeX or Metafont failing:: Likely compiler bugs.
+@end menu
+
+@node Unable to find files
+@subsection Unable to find files
+
+@cindex unable to find files
+@cindex files, unable to find
+
+If a program complains it cannot find fonts (or other input files), any
+of several things might be wrong. In any case, you may find the
+debugging options helpful. @xref{Debugging}.
+
+@itemize @bullet
+@item
+Perhaps you simply haven't installed all the necessary files; the basic
+fonts and input files are distributed separately from the programs.
+@xref{unixtex.ftp}.
+
+@item
+@flindex /etc/profile
+@cindex environment variables, old
+You have (perhaps unknowingly) told Kpathsea to use search paths that
+don't reflect where the files actually are. One common cause is having
+environment variables set from a previous installation, thus overriding
+what you carefully set in @file{texmf.cnf} (@pxref{Supported file
+formats}). System @file{/etc/profile} or other files such may be the
+culprit.
+
+@item
+@cindex symbolic links not found
+@cindex leaf directories wrongly guessed
+Your files reside in a directory that is only pointed to via a symbolic
+link, in a leaf directory and is not listed in @file{ls-R}.
+
+Unfortunately, Kpathsea's subdirectory searching has an irremediable
+deficiency: If a directory @var{d} being searched for subdirectories
+contains plain files and symbolic links to other directories, but no
+true subdirectories, @var{d} will be considered a leaf directory, i.e.,
+the symbolic links will not be followed. @xref{Subdirectory expansion}.
+
+You can work around this problem by creating an empty dummy subdirectory
+in @var{d}. Then @var{d} will no longer be a leaf, and the symlinks will
+be followed.
+
+The directory immediately followed by the @samp{//} in the path
+specification, however, is always searched for subdirectories, even if
+it is a leaf. Presumably you would not have asked for the directory to
+be searched for subdirectories if you didn't want it to be.
+
+@item
+If the fonts (or whatever) don't already exist, @code{mktexpk} (or
+@code{mktexmf} or @code{mktextfm}) will try to create them. If
+these rather complicated shell scripts fail, you'll eventually get an
+error message saying something like @samp{Can't find font
+@var{fontname}}. The best solution is to fix (or at least report) the
+bug in @code{mktexpk}; the workaround is to generate the necessary
+fonts by hand with Metafont, or to grab them from a CTAN site
+(@pxref{unixtex.ftp}).
+
+@item
+There is a bug in the library. @xref{Reporting bugs}.
+@end itemize
+
+
+@node Slow path searching
+@subsection Slow path searching
+
+@cindex excessive startup time
+@cindex slow startup time
+@cindex startup time, excessive
+
+If your program takes an excessively long time to find fonts or other
+input files, but does eventually succeed, here are some possible culprits:
+
+@itemize @bullet
+@item
+Most likely, you just have a lot of directories to search, and that
+takes a noticeable time. The solution is to create and maintain a
+separate @file{ls-R} file that lists all the files in your main @TeX{}
+hierarchy. @xref{Filename database}. Kpathsea always uses @file{ls-R}
+if it's present; there's no need to recompile or reconfigure any of the
+programs.
+
+@item
+Your recursively-searched directories (e.g.,
+@file{/usr/local/share/texmf/fonts//}), contain a mixture of files and
+directories. This prevents Kpathsea from using a useful optimization
+(@pxref{Subdirectory expansion}).
+
+It is best to have only directories (and perhaps a @file{README}) in the
+upper levels of the directory structure, and it's very important to have
+@emph{only} files, and no subdirectories, in the leaf directories where
+the dozens of TFM, PK, or whatever files reside.
+@end itemize
+
+In any case, you may find the debugging options helpful in determining
+precisely when the disk or network is being pounded. @xref{Debugging}.
+
+
+@node Unable to generate fonts
+@subsection Unable to generate fonts
+
+@cindex unable to generate fonts
+@cindex font generation failures
+
+Metafont outputs fonts in bitmap format, tuned for a particular
+device at a particular resolution, in order to allow for the
+highest-possible quality of output. Some DVI-to-whatever programs,
+such as Dvips, try to generate these on the fly when they are needed,
+but this generation may fail in several cases.
+
+@cindex @code{mktexpk} can't guess mode
+If @code{mktexpk} runs, but fails with this error:
+@example
+mktexpk: Can't guess mode for @var{nnn} dpi devices.
+mktexpk: Use a config file to specify the mode, or update me.
+@end example
+you need to ensure the resolution and mode match; just
+specifying the resolution, as in @code{-D 360}, is not enough.
+
+You can specify the mode name with the @code{-mode} option on the
+Dvips command line, or in a Dvips configuration file (@pxref{Config
+files,,, dvips, Dvips}), such as @file{config.ps} in your document
+directory, @file{~/.dvipsrc} in your home directory, or in a system
+directory (again named @file{config.ps}). (Other drivers use other
+files, naturally.)
+
+For example, if you need 360@dmn{dpi} fonts, you could include this in
+a configuration file:
+@example
+D 360
+M lqmed
+@end example
+
+@cindex Metafont using the wrong device
+@cindex device, wrong
+If Metafont runs, but generates fonts at the wrong resolution or for
+the wrong device, most likely @code{mktexpk}'s built-in guess for the
+mode is wrong, and you should override it as above.
+
+See @url{https://ctan.org/pkg/modes} for a list of resolutions and mode
+names for most devices (additional submissions are welcome).
+
+@flindex .2602gf
+@flindex 2602gf
+@cindex Metafont making too-large fonts
+@cindex proof mode
+@cindex online Metafont display, spurious
+If Metafont runs but generates fonts at a resolution of 2602@dmn{dpi}
+(and prints out the name of each character as well as just a character
+number, and maybe tries to display the characters), then your Metafont
+base file probably hasn't been made properly. (It's using the default
+@code{proof} mode, instead of an actual device mode.) To make a proper
+@file{plain.base}, assuming the local mode definitions are contained in
+a file @file{modes.mf}, run the following command (assuming Unix):
+
+@example
+inimf "plain; input modes; dump"
+@end example
+
+@noindent
+@flindex plain.base
+Then copy the @file{plain.base} file from the current directory to where
+the base files are stored on your system
+(@file{/usr/local/share/texmf/web2c} by default), and make a link
+(either hard or soft) from @file{plain.base} to @file{mf.base} in that
+directory.
+@xref{inimf invocation,,, web2c, Web2c}.
+
+@cindex Metafont installation
+If @code{mf} is a command not found at all by @code{mktexpk}, then you
+need to install Metafont (@pxref{unixtex.ftp}).
+
+
+@node TeX or Metafont failing
+@subsection @TeX{} or Metafont failing
+
+@cindex @TeX{} failures
+@cindex Metafont failures
+@cindex compiler bugs
+If @TeX{} or Metafont get a segmentation fault or otherwise fail while
+running a normal input file, the problem is usually a compiler bug
+(unlikely as that may sound). Even if the trip and trap tests are
+passed, problems may lurk. Optimization occasionally causes trouble in
+programs other than @TeX{} and Metafont themselves, too.
+
+@cindex optimization caveat
+For a workaround, if you enabled any optimization flags, it's best to
+omit optimization entirely. In any case, the way to find the facts is
+to run the program under the debugger and see where it's failing.
+
+@cindex GNU C compiler bugs
+@cindex system C compiler bugs
+Also, if you have trouble with a system C compiler, I advise trying the
+GNU C compiler. And vice versa, unfortunately; but in that case I also
+recommend reporting a bug to the GCC mailing list; see @ref{Bugs,,, gcc,
+Using and Porting GNU CC}.
+
+@cindex compiler bugs, finding
+To report compiler bugs effectively requires perseverance and
+perspicacity: you must find the miscompiled line, and that usually
+involves delving backwards in time from the point of error, checking
+through @TeX{}'s (or whatever program's) data structures. Good luck.
+
+
+@node Index
+@unnumbered Index
+
+@printindex cp
+
+@bye
diff --git a/Build/source/texk/kpathsea/doc/unixtex.texi b/Build/source/texk/kpathsea/doc/unixtex.texi
new file mode 100644
index 00000000000..f91f453ce8c
--- /dev/null
+++ b/Build/source/texk/kpathsea/doc/unixtex.texi
@@ -0,0 +1,50 @@
+@ifclear version
+@defcodeindex fl
+@defcodeindex op
+@end ifclear
+
+@node unixtex.ftp
+@chapter @file{unixtex.ftp}: Obtaining @TeX{}
+
+@cindex obtaining @TeX{}
+@cindex retrieving @TeX{}
+
+@flindex unixtex.ftp
+@flindex tug.org
+@flindex www.tug.org
+@flindex ftp.tug.org
+This
+@iftex
+chapter
+@end iftex
+is @uref{ftp://tug.org/tex/unixtex.ftp}, a.k.a.@:
+@uref{https://tug.org/unixtex.ftp}, last updated 29 February 2020.
+Email @email{tex-k@@tug.org} with comments or questions.
+
+The principal free @TeX{} distribution for Unix-like systems is @TeX{}
+Live, on the web at @url{http://tug.org/texlive}. The pages there
+describe many ways to acquire and/or build @TeX{}, over the Internet
+or on physical media, both the sources and precompiled binaries for
+many systems, either standalone or as part of various operating system
+distributions.
+
+Web2c, Kpathsea, Dvips, and Dviljk, among others, are no longer
+released as a separate packages. Their sources are now maintained as
+part of @TeX{} Live.
+
+@flindex ftp.cs.stanford.edu
+@flindex tex.web
+@cindex Knuth, Donald E., archive of programs by
+The host @t{ftp.cs.stanford.edu} is the original source for the files
+for which Donald Knuth is directly responsible: @file{tex.web},
+@file{plain.tex}, etc. However, unless you want to undertake the
+project of building your @TeX{} system from scratch, it is more
+reliable and less work to retrieve these files as part of a larger
+package.
+
+In any case, the Stanford ftp site is not the canonical source for
+anything except what was created as part of Knuth's original @TeX{},
+so do not rely on any other files available there being up-to-date.
+The best place to check for up-to-date files is CTAN (the
+Comprehensive @TeX{} Archive Network), @url{https://ctan.org}.
+
diff --git a/Build/source/texk/kpathsea/elt-dirs.c b/Build/source/texk/kpathsea/elt-dirs.c
new file mode 100644
index 00000000000..ec60fe82d70
--- /dev/null
+++ b/Build/source/texk/kpathsea/elt-dirs.c
@@ -0,0 +1,546 @@
+/* elt-dirs.c: Translate a path element to its corresponding director{y,ies}.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 2008, 2009, 2010, 2011, 2016,
+ 2017, 2018 Karl Berry.
+ Copyright 1997, 1998, 1999, 2000, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/fn.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/xopendir.h>
+
+/* To avoid giving prototypes for all the routines and then their real
+ definitions, we give all the subroutines first. The entry point is
+ the last routine in the file. */
+
+/* Make a copy of DIR (unless it's null) and save it in L. Ensure that
+ DIR ends with a DIR_SEP for the benefit of later searches. */
+
+static void
+dir_list_add (str_llist_type *l, string dir)
+{
+ char last_char = dir[strlen (dir) - 1];
+ string saved_dir
+ = IS_DIR_SEP_CH (last_char) || IS_DEVICE_SEP (last_char)
+ ? xstrdup (dir)
+ : concat (dir, DIR_SEP_STRING);
+
+ str_llist_add (l, saved_dir);
+}
+
+
+/* If DIR is a directory, add it to the list L. */
+
+static void
+checked_dir_list_add (kpathsea kpse, str_llist_type *l, string dir)
+{
+ if (kpathsea_dir_p (kpse, dir))
+ dir_list_add (l, dir);
+}
+
+/* The cache. Typically, several paths have the same element; for
+ example, /usr/local/lib/texmf/fonts//. We don't want to compute the
+ expansion of such a thing more than once. Even though we also cache
+ the dir_links call, that's not enough -- without this path element
+ caching as well, the execution time doubles. */
+
+/* Associate KEY with VALUE. We implement the cache as a simple linear
+ list, since it's unlikely to ever be more than a dozen or so elements
+ long. We don't bother to check here if PATH has already been saved;
+ we always add it to our list. We copy KEY but not VALUE; not sure
+ that's right, but it seems to be all that's needed. */
+
+static void
+cache (kpathsea kpse, const_string key, str_llist_type *value)
+{
+ kpse->cache_length++;
+ XRETALLOC (kpse->the_cache, kpse->cache_length, cache_entry);
+ kpse->the_cache[kpse->cache_length - 1].key = xstrdup (key);
+ kpse->the_cache[kpse->cache_length - 1].value = value;
+}
+
+
+/* To retrieve, just check the list in order. */
+
+static str_llist_type *
+cached (kpathsea kpse, const_string key)
+{
+ unsigned p;
+
+ for (p = 0; p < kpse->cache_length; p++)
+ {
+ if (FILESTRCASEEQ (kpse->the_cache[p].key, key))
+ return kpse->the_cache[p].value;
+ }
+
+ return NULL;
+}
+
+/* Handle the magic path constructs. */
+
+/* Declare recursively called routine. */
+static void expand_elt (kpathsea, str_llist_type *, string, unsigned);
+
+
+/* POST is a pointer into the original element (which may no longer be
+ ELT) to just after the doubled DIR_SEP, perhaps to the null. Append
+ subdirectories of ELT (up to ELT_LENGTH, which must be a /) to
+ STR_LIST_PTR. ELT must not be the empty string (or NULL). */
+
+#ifdef WIN32
+/* Shared across recursive calls, it acts like a stack. */
+static char dirname[MAX_PATH*2];
+static wchar_t dirnamew[MAX_PATH];
+static char *potname;
+#endif
+
+static void
+do_subdir (kpathsea kpse, str_llist_type *str_list_ptr, string elt,
+ unsigned elt_length, string post)
+{
+#ifdef WIN32
+ WIN32_FIND_DATAW find_file_data;
+ HANDLE hnd;
+ int proceed;
+ int nlinks = 2;
+#else
+ DIR *dir;
+ struct dirent *e;
+#endif /* not WIN32 */
+ fn_type name;
+
+ /* Some old compilers don't allow aggregate initialization. */
+ name = fn_copy0 (elt, elt_length);
+
+ assert (elt_length > 0
+ && (IS_DIR_SEP_CH (elt[elt_length - 1])
+ || IS_DEVICE_SEP (elt[elt_length - 1])));
+
+#if defined (WIN32)
+ strcpy(dirname, FN_STRING(name));
+ strcat(dirname, "/*.*"); /* "*.*" or "*" -- seems equivalent. */
+ get_wstring_from_mbstring(kpse->File_system_codepage, dirname, dirnamew);
+ hnd = FindFirstFileW(dirnamew, &find_file_data);
+
+ if (hnd == INVALID_HANDLE_VALUE) {
+ fn_free(&name);
+ return;
+ }
+
+ /* Include top level before subdirectories, if nothing to match. */
+ if (*post == 0)
+ dir_list_add (str_list_ptr, FN_STRING (name));
+ else {
+ /* If we do have something to match, see if it exists. For
+ example, POST might be `pk/ljfour', and they might have a
+ directory `$TEXMF/fonts/pk/ljfour' that we should find. */
+ fn_str_grow (&name, post);
+ expand_elt (kpse, str_list_ptr, FN_STRING (name), elt_length);
+ fn_shrink_to (&name, elt_length);
+ }
+ proceed = 1;
+ while (proceed) {
+ if (find_file_data.cFileName[0] != L'.') {
+ int links;
+
+ /* Construct the potential subdirectory name. */
+ potname = get_mbstring_from_wstring(kpse->File_system_codepage, find_file_data.cFileName, potname=NULL);
+ fn_str_grow (&name, potname);
+ free(potname);
+
+ /* Maybe we have cached the leafness of this directory.
+ The function will return 0 if unknown,
+ else the actual (Unix-like) value. */
+ links = kpathsea_dir_links (kpse, FN_STRING (name), 0);
+
+ if (find_file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ unsigned potential_len = FN_LENGTH (name);
+ /* in any case, compute the leafness */
+ nlinks++;
+
+ /* It's a directory, so append the separator. */
+ fn_str_grow (&name, DIR_SEP_STRING);
+ if (*post != 0) {
+ fn_str_grow (&name, post);
+ /* Unfortunately we can't check if the new element is
+ a leaf directory, because we don't have a directory
+ name here, we just have a path spec. This means we
+ may descend into a leaf directory cm/pk, if the
+ spec is ...fonts//pk//. */
+ expand_elt (kpse, str_list_ptr, FN_STRING (name), potential_len);
+ fn_shrink_to (&name, potential_len);
+ }
+ /* Should we recurse? To see if the subdirectory is a
+ leaf, check if it has two links (one for . and one for
+ ..). This means that symbolic links to directories do
+ not affect the leaf-ness. This is arguably wrong, but
+ the only alternative I know of is to stat every entry
+ in the directory, and that is unacceptably slow. */
+
+ if (links == 0 || links > 2)
+ /* All criteria are met; find subdirectories. */
+ do_subdir (kpse, str_list_ptr, FN_STRING (name),
+ potential_len, post);
+ else if (*post == 0)
+ /* Nothing to match, no recursive subdirectories to
+ look for: we're done with this branch. Add it. */
+ dir_list_add (str_list_ptr, FN_STRING (name));
+ }
+ fn_shrink_to (&name, elt_length);
+ }
+ proceed = FindNextFileW (hnd, &find_file_data);
+ }
+ /* Update the leafness of name. */
+ kpathsea_dir_links(kpse, FN_STRING(name), nlinks);
+ fn_free (&name);
+ FindClose(hnd);
+
+#else /* not WIN32 */
+
+ /* If we can't open it, quit. */
+ dir = opendir (FN_STRING (name));
+ if (dir == NULL)
+ {
+ fn_free (&name);
+ return;
+ }
+
+ /* Include top level before subdirectories, if nothing to match. */
+ if (*post == 0)
+ dir_list_add (str_list_ptr, FN_STRING (name));
+ else
+ { /* If we do have something to match, see if it exists. For
+ example, POST might be `pk/ljfour', and they might have a
+ directory `$TEXMF/fonts/pk/ljfour' that we should find. */
+ fn_str_grow (&name, post);
+ expand_elt (kpse, str_list_ptr, FN_STRING (name), elt_length);
+ fn_shrink_to (&name, elt_length);
+ }
+
+ while ((e = readdir (dir)) != NULL)
+ { /* If it begins with a `.', never mind. (This allows ``hidden''
+ directories that the algorithm won't find.) */
+ if (e->d_name[0] != '.')
+ {
+ int links;
+
+ /* Construct the potential subdirectory name. */
+ fn_str_grow (&name, e->d_name);
+
+ /* If we can't stat it, or if it isn't a directory, continue. */
+ links = kpathsea_dir_links (kpse, FN_STRING (name), 0);
+
+ if (links >= 0)
+ {
+ unsigned potential_len = FN_LENGTH (name);
+
+ /* It's a directory, so append the separator. */
+ fn_str_grow (&name, DIR_SEP_STRING);
+
+ if (*post != 0)
+ {
+ fn_str_grow (&name, post);
+ /* Unfortunately we can't check if the new element is
+ a leaf directory, because we don't have a directory
+ name here, we just have a path spec. This means we
+ may descend into a leaf directory cm/pk, if the
+ spec is ...fonts//pk//. */
+ expand_elt (kpse, str_list_ptr, FN_STRING (name),
+ potential_len);
+ fn_shrink_to (&name, potential_len);
+ }
+
+ /* Should we recurse? To see if the subdirectory is a
+ leaf, check if it has two links (one for . and one for
+ ..). This means that symbolic links to directories do
+ not affect the leaf-ness. This is arguably wrong, but
+ the only alternative I know of is to stat every entry
+ in the directory, and that is unacceptably slow.
+
+ The #ifdef here makes all this configurable at
+ compile-time, so that if we're using VMS directories or
+ some such, we can still find subdirectories, even if it
+ is much slower. */
+#ifdef ST_NLINK_TRICK
+ /* With SAS/C++ 6.55 on the Amiga, stat sets the st_nlink
+ field to -1 for a file, or to 1 for a directory.
+ Cygwin 1.7 also leaves st_nlink as 1:
+ http://cygwin.com/ml/cygwin-developers/2008-04/msg00110.html
+ */
+ if (links != 2)
+#endif /* ST_NLINK_TRICK */
+ /* All criteria are met; find subdirectories. */
+ do_subdir (kpse, str_list_ptr, FN_STRING (name),
+ potential_len, post);
+#ifdef ST_NLINK_TRICK
+ else if (*post == 0)
+ /* Nothing to match, no recursive subdirectories to
+ look for: we're done with this branch. Add it. */
+ dir_list_add (str_list_ptr, FN_STRING (name));
+#endif
+ }
+
+ /* Remove the directory entry we just checked from `name'. */
+ fn_shrink_to (&name, elt_length);
+ }
+ }
+
+ fn_free (&name);
+ xclosedir (dir);
+#endif /* not WIN32 */
+}
+
+
+/* Assume ELT is non-empty and non-NULL. Return list of corresponding
+ directories (with no terminating NULL entry) in STR_LIST_PTR. Start
+ looking for magic constructs at START. */
+
+static void
+expand_elt (kpathsea kpse, str_llist_type * str_list_ptr, string elt,
+ unsigned start)
+{
+ string dir = elt + start, post;
+
+ while (*dir != 0)
+ {
+ if (IS_DIR_SEP_CH (*dir))
+ {
+ /* If two or more consecutive /'s, find subdirectories. */
+ if (IS_DIR_SEP_CH (dir[1]))
+ {
+ for (post = dir + 1; IS_DIR_SEP_CH (*post); post++) ;
+ do_subdir (kpse, str_list_ptr, elt, dir - elt + 1, post);
+ return;
+ }
+
+ /* No special stuff at this slash. Keep going. */
+ }
+
+ dir++;
+ }
+
+ /* When we reach the end of ELT, it will be a normal filename. */
+ checked_dir_list_add (kpse, str_list_ptr, elt);
+}
+
+/* On win32 we slashify ELT, i.e., change '\\' to '/', and then can use
+ IS_DIR_SEP_CH instead of IS_DIR_SEP and need not test for the presence
+ of 2-Byte Kanji (CP 932, SJIS) codes. */
+
+/* The first bits of a path element can be problematic because they
+ look like a request to expand a whole disk, rather than a subtree.
+ - It can contain a drive specification.
+ - It can be a UNC path (w32, but they are part of the single
+ Unix specification as well).
+ The argument is a string as the function can diddle into the argument
+ to canonicalize it, which tends to matter on windows platforms.
+ - Always lower-case drive letters a-z, even those filesystem that
+ preserve case in filenames do not care about the case of the drive
+ letters.
+ - Remove unneeded double slashes. The problem is Windows does not
+ handle well filenames like c://dir/foo. So canonicalize the names.
+ The resulting name will always be shorter than the one passed, so no
+ problem.
+ - Remove multiple leading slashes to prevent expanding from the root
+ of a UNIX filesystem tree. */
+
+unsigned
+kpathsea_normalize_path (kpathsea kpse, string elt)
+{
+ unsigned ret;
+ unsigned i;
+
+#if defined(WIN32)
+ for (i = 0; elt[i]; i++) {
+ if (elt[i] == '\\')
+ elt[i] = '/';
+ else if (kpathsea_IS_KANJI(kpse, elt + i))
+ i++;
+ }
+#endif
+
+ if (NAME_BEGINS_WITH_DEVICE(elt)) {
+ if (*elt >= 'A' && *elt <= 'Z')
+ *elt += 'a' - 'A';
+ ret = 2;
+
+ } else if (IS_UNC_NAME(elt)) {
+ for (ret = 2; elt[ret] && !IS_DIR_SEP_CH(elt[ret]); ret++)
+ ;
+
+ } else
+ ret = 0;
+
+ for (i = ret; IS_DIR_SEP_CH(elt[i]); ++i)
+ ;
+ if (i > ret + 1) {
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_STAT))
+ DEBUGF2 ("kpse_normalize_path (%s) => %u\n", elt, ret);
+#endif /* KPSE_DEBUG */
+
+ memmove (elt + ret + 1, elt + i, strlen (elt + i) + 1);
+ }
+
+ return ret;
+}
+
+/* Here is the entry point. Returns directory list for ELT. */
+
+str_llist_type *
+kpathsea_element_dirs (kpathsea kpse, string elt)
+{
+ str_llist_type *ret;
+ unsigned i;
+
+#ifdef _WIN32
+ char *tname = NULL;
+ wchar_t *wtname = NULL;
+#endif /* _WIN32 */
+
+ /* If given nothing, return nothing. */
+ if (!elt || !*elt)
+ return NULL;
+
+#ifdef _WIN32
+/*
+ Change encoding of a variable into kpse->File_system_codepage
+ to support non-ascii values for the variable.
+*/
+ if (kpse->File_system_codepage != kpse->Win32_codepage) {
+ wtname = get_wstring_from_mbstring (kpse->Win32_codepage,
+ elt, wtname = NULL);
+ tname = get_mbstring_from_wstring (kpse->File_system_codepage,
+ wtname, tname = NULL);
+ elt = tname;
+ free(wtname);
+ }
+#endif /* _WIN32 */
+
+ /* Normalize ELT before looking for a cached value. */
+ i = kpathsea_normalize_path (kpse, elt);
+
+ /* If we've already cached the answer for ELT, return it. */
+ ret = cached (kpse, elt);
+#ifdef _WIN32
+ if (ret) {
+ if (tname) free (tname);
+ return ret;
+ }
+#else
+ if (ret)
+ return ret;
+#endif /* _WIN32 */
+
+ /* We're going to have a real directory list to return. */
+ ret = XTALLOC1 (str_llist_type);
+ *ret = NULL;
+
+ /* We handle the hard case in a subroutine. */
+ expand_elt (kpse, ret, elt, i);
+
+ /* Remember the directory list we just found, in case future calls are
+ made with the same ELT. */
+ cache (kpse, elt, ret);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_EXPAND))
+ {
+ DEBUGF1 ("path element %s =>", elt);
+ if (ret)
+ {
+ str_llist_elt_type *e;
+ for (e = *ret; e; e = STR_LLIST_NEXT (*e))
+ fprintf (stderr, " %s", STR_LLIST (*e));
+ }
+ putc ('\n', stderr);
+ fflush (stderr);
+ }
+#endif /* KPSE_DEBUG */
+
+#ifdef _WIN32
+ if (tname) free (tname);
+#endif /* _WIN32 */
+
+ return ret;
+}
+
+#ifdef TEST
+
+void
+print_element_dirs (const_string elt)
+{
+ str_llist_type *dirs;
+
+ printf ("Directories of %s:\t", elt ? elt : "(nil)");
+ fflush (stdout);
+
+ dirs = kpathsea_element_dirs (kpse_def, elt);
+
+ if (!dirs)
+ printf ("(nil)");
+ else
+ {
+ str_llist_elt_type *dir;
+ for (dir = *dirs; dir; dir = STR_LLIST_NEXT (*dir))
+ {
+ string d = STR_LLIST (*dir);
+ printf ("%s ", *d ? d : "`'");
+ }
+ }
+
+ putchar ('\n');
+}
+
+int
+main ()
+{
+ /* DEBUG_SET (DEBUG_STAT); */
+ /* All lists end with NULL. */
+ print_element_dirs (NULL); /* */
+ print_element_dirs (""); /* ./ */
+ print_element_dirs ("/k"); /* */
+ print_element_dirs (".//"); /* ./ ./archive/ */
+ print_element_dirs (".//archive"); /* ./ ./archive/ */
+#ifdef AMIGA
+ print_element_dirs ("TeXMF:AmiWeb2c/texmf/fonts//"); /* lots */
+ print_element_dirs ("TeXMF:AmiWeb2c/share/texmf/fonts//bakoma"); /*just one*/
+ print_element_dirs ("TeXMF:AmiWeb2c/texmf/fonts//"); /* lots again [cache] */
+ print_element_dirs ("TeXMF:"); /* TeXMF: */
+ print_element_dirs ("TeXMF:/"); /* TeXMF: and all subdirs */
+#else /* not AMIGA */
+ print_element_dirs ("/tmp/fonts//"); /* no need to stat anything */
+ print_element_dirs ("/usr/local/lib/tex/fonts//"); /* lots */
+ print_element_dirs ("/usr/local/lib/tex/fonts//times"); /* just one */
+ print_element_dirs ("/usr/local/lib/tex/fonts//"); /* lots again [cache] */
+ print_element_dirs ("~karl"); /* tilde expansion */
+ print_element_dirs ("$karl"); /* variable expansion */
+ print_element_dirs ("~${LOGNAME}"); /* both */
+#endif /* not AMIGA */
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST elt-dirs.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/expand.c b/Build/source/texk/kpathsea/expand.c
new file mode 100644
index 00000000000..dc01d9edd41
--- /dev/null
+++ b/Build/source/texk/kpathsea/expand.c
@@ -0,0 +1,417 @@
+/* expand.c: general expansion.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 2005, 2008, 2009, 2011,
+ 2012, 2016, 2017 Karl Berry.
+ Copyright 1997-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/tilde.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/concatn.h>
+#include <kpathsea/absolute.h>
+#include <kpathsea/str-list.h>
+
+/* Do variable expansion first so ~${USER} works. (Besides, it's what the
+ shells do.) */
+
+string
+kpathsea_expand (kpathsea kpse, const_string s)
+{
+ string var_expansion = kpathsea_var_expand (kpse, s);
+ string tilde_expansion = kpathsea_tilde_expand (kpse, var_expansion);
+
+ /* `kpse_var_expand' always gives us new memory; `kpse_tilde_expand'
+ doesn't, necessarily. So be careful that we don't free what we are
+ about to return. */
+ if (tilde_expansion != var_expansion)
+ free (var_expansion);
+
+ return tilde_expansion;
+}
+
+/* Forward declarations of functions from the original expand.c */
+static str_list_type brace_expand (kpathsea, const_string*);
+
+/* If $KPSE_DOT is defined in the environment, prepend it to any relative
+ path components. */
+
+static string
+kpathsea_expand_kpse_dot (kpathsea kpse, string path)
+{
+ string ret, elt;
+ string kpse_dot = getenv("KPSE_DOT");
+#ifdef MSDOS
+ boolean malloced_kpse_dot = false;
+#endif
+
+ if (kpse_dot == NULL)
+ return path;
+ ret = (string)xmalloc(1);
+ *ret = 0;
+
+#ifdef MSDOS
+ /* Some setups of ported Bash force $KPSE_DOT to have the //d/foo/bar
+ form (when `pwd' is used), which is not understood by libc and the OS.
+ Convert them back to the usual d:/foo/bar form. */
+ if (kpse_dot[0] == '/' && kpse_dot[1] == '/'
+ && kpse_dot[2] >= 'A' && kpse_dot[2] <= 'z' && kpse_dot[3] == '/') {
+ kpse_dot++;
+ kpse_dot = xstrdup (kpse_dot);
+ kpse_dot[0] = kpse_dot[1]; /* drive letter */
+ kpse_dot[1] = ':';
+ malloced_kpse_dot = true;
+ }
+#endif
+
+ for (elt = kpathsea_path_element (kpse, path); elt;
+ elt = kpathsea_path_element (kpse, NULL)) {
+ string save_ret = ret;
+ boolean ret_copied = true;
+ /* We assume that the !! magic is only used on absolute components.
+ Single "." gets special treatment, as does "./" or its equivalent. */
+ if (kpathsea_absolute_p (kpse, elt, false)
+ || (elt[0] == '!' && elt[1] == '!')) {
+ ret = concat3(ret, elt, ENV_SEP_STRING);
+ } else if (elt[0] == '.' && elt[1] == 0) {
+ ret = concat3 (ret, kpse_dot, ENV_SEP_STRING);
+#ifndef VMS
+ } else if (elt[0] == '.' && IS_DIR_SEP(elt[1])) {
+ ret = concatn (ret, kpse_dot, elt + 1, ENV_SEP_STRING, NULL);
+ } else if (*elt) {
+ ret = concatn (ret, kpse_dot, DIR_SEP_STRING, elt, ENV_SEP_STRING, NULL);
+#endif
+ } else {
+ /* omit empty path elements from TEXMFCNF.
+ See http://bugs.debian.org/358330. */
+ ret_copied = false;
+ }
+ if (ret_copied)
+ free (save_ret);
+ }
+
+#ifdef MSDOS
+ if (malloced_kpse_dot) free (kpse_dot);
+#endif
+
+ ret[strlen (ret) - 1] = 0;
+ return ret;
+}
+
+/* Do brace expansion on ELT; then do variable and ~ expansion on each
+ element of the result; then do brace expansion again, in case a
+ variable definition contained braces (e.g., $TEXMF). Return a
+ string comprising all of the results separated by ENV_SEP_STRING. */
+
+static string
+kpathsea_brace_expand_element (kpathsea kpse, const_string elt)
+{
+ unsigned i;
+ str_list_type expansions = brace_expand (kpse, &elt);
+ string ret = (string)xmalloc (1);
+ *ret = 0;
+
+ for (i = 0; i != STR_LIST_LENGTH(expansions); i++) {
+ /* Do $ and ~ expansion on each element. */
+ string x = kpathsea_expand (kpse, STR_LIST_ELT(expansions,i));
+ string save_ret = ret;
+ if (!STREQ (x, STR_LIST_ELT(expansions,i))) {
+ /* If we did any expansions, do brace expansion again. Since
+ recursive variable definitions are not allowed, this recursion
+ must terminate. (In practice, it's unlikely there will ever be
+ more than one level of recursion.) */
+ string save_x = x;
+ x = kpathsea_brace_expand_element (kpse, x);
+ free (save_x);
+ }
+ ret = concat3 (ret, x, ENV_SEP_STRING);
+ free (save_ret);
+ free (x);
+ }
+ for (i = 0; i != STR_LIST_LENGTH(expansions); ++i) {
+ free(STR_LIST_ELT(expansions,i));
+ }
+ str_list_free(&expansions);
+ ret[strlen (ret) - 1] = 0; /* waste the trailing null */
+ return ret;
+}
+
+/* Be careful to not waste all the memory we allocate for each element. */
+
+string
+kpathsea_brace_expand (kpathsea kpse, const_string path)
+{
+ string kpse_dot_expansion;
+ string elt;
+ unsigned len;
+ /* Must do variable expansion first because if we have
+ foo = .:~
+ TEXINPUTS = $foo
+ we want to end up with TEXINPUTS = .:/home/karl.
+ Since kpse_path_element is not reentrant, we must get all
+ the path elements before we start the loop. */
+ string xpath = kpathsea_var_expand (kpse, path);
+ string ret = (string)xmalloc (1);
+ *ret = 0;
+
+ for (elt = kpathsea_path_element (kpse, xpath); elt;
+ elt = kpathsea_path_element (kpse, NULL)) {
+ string save_ret = ret;
+ /* Do brace expansion first, so tilde expansion happens in {~ka,~kb}. */
+ string expansion = kpathsea_brace_expand_element (kpse, elt);
+ ret = concat3 (ret, expansion, ENV_SEP_STRING);
+ free (expansion);
+ free (save_ret);
+ }
+
+ /* Waste the last byte by overwriting the trailing env_sep with a null. */
+ len = strlen (ret);
+ if (len != 0)
+ ret[len - 1] = 0;
+ free (xpath);
+
+ kpse_dot_expansion = kpathsea_expand_kpse_dot (kpse, ret);
+ if (kpse_dot_expansion != ret)
+ free (ret);
+
+ return kpse_dot_expansion;
+}
+
+#if defined(KPSE_COMPAT_API)
+string
+kpse_brace_expand (const_string path)
+{
+ return kpathsea_brace_expand (kpse_def, path);
+}
+#endif
+
+/* Expand all special constructs in a path, and include only the actually
+ existing directories in the result. */
+string
+kpathsea_path_expand (kpathsea kpse, const_string path)
+{
+ string ret;
+ string xpath;
+ string elt;
+ unsigned len;
+ const_string ypath;
+#if defined(WIN32)
+ string zpath, p;
+#endif
+
+ /* Initialise ret to the empty string. */
+ ret = (string)xmalloc (1);
+ *ret = 0;
+ len = 0;
+
+#if defined(WIN32)
+ zpath = xstrdup (path);
+
+ for (p = zpath; *p; p++)
+ if (*p == '\\')
+ *p = '/';
+ else if (kpathsea_IS_KANJI(kpse, p))
+ p++;
+
+ ypath = zpath;
+#else
+ ypath = path;
+#endif
+
+ /* Expand variables and braces first. */
+ xpath = kpathsea_brace_expand (kpse, ypath);
+
+#if defined(WIN32)
+ free (zpath);
+#endif
+
+ /* Now expand each of the path elements, printing the results */
+ for (elt = kpathsea_path_element (kpse, xpath); elt;
+ elt = kpathsea_path_element (kpse, NULL)) {
+ str_llist_type *dirs;
+
+ /* Skip and ignore magic leading chars. */
+ if (*elt == '!' && *(elt + 1) == '!')
+ elt += 2;
+
+ /* Search the disk for all dirs in the component specified.
+ Be faster to check the database, but this is more reliable. */
+ dirs = kpathsea_element_dirs (kpse, elt);
+ if (dirs && *dirs) {
+ str_llist_elt_type *dir;
+
+ for (dir = *dirs; dir; dir = STR_LLIST_NEXT (*dir)) {
+ string thedir = STR_LLIST (*dir);
+ unsigned dirlen = strlen (thedir);
+ string save_ret = ret;
+ /* We need to retain trailing slash if that's the root directory.
+ * On unix, "/" is root dir, "" often taken to be current dir.
+ * On windows, "C:/" is root dir of drive C, and "C:" is current
+ * on drive C. There's no need to look at other cases, like UNC
+ * names.
+ */
+ if (dirlen == 1 || (dirlen == 3 && NAME_BEGINS_WITH_DEVICE (thedir)
+ && IS_DIR_SEP (thedir[2]))) {
+ ret = concat3 (ret, thedir, ENV_SEP_STRING);
+ len += dirlen + 1;
+ ret[len - 1] = ENV_SEP;
+ } else {
+ ret = concat (ret, thedir);
+ len += dirlen;
+ ret [len - 1] = ENV_SEP;
+ }
+ free (save_ret);
+ }
+ }
+ }
+ /* Get rid of trailing ':', if any. */
+ if (len != 0)
+ ret[len - 1] = 0;
+ return ret;
+}
+
+#if defined(KPSE_COMPAT_API)
+string
+kpse_path_expand (const_string path)
+{
+ return kpathsea_path_expand (kpse_def, path);
+}
+#endif
+
+/* ... */
+static void expand_append (str_list_type* partial,
+ const_string text, const_string p)
+{
+ string new_string;
+ unsigned len;
+ str_list_type tmp;
+ tmp = str_list_init();
+ len = p - text;
+ new_string = (string)xmalloc(len+1);
+ strncpy(new_string, text, len);
+ new_string[len]=0;
+ str_list_add(&tmp, new_string);
+ str_list_concat_elements(partial, tmp);
+}
+
+
+static str_list_type
+brace_expand (kpathsea kpse, const_string *text)
+{
+ str_list_type result, partial, recurse;
+ const_string p;
+ result = str_list_init();
+ partial = str_list_init();
+ for (p = *text; *p && *p != '}'; ++p) {
+ /* FIXME: Should be IS_ENV_SEP(*p) */
+ if (*p == ENV_SEP || *p == ',') {
+ expand_append(&partial, *text, p);
+ str_list_concat(&result, partial);
+ str_list_free(&partial);
+ *text = p+1;
+ partial = str_list_init();
+ } else if (*p == '{') {
+ expand_append(&partial, *text, p);
+ ++p;
+ recurse = brace_expand(kpse, &p);
+ str_list_concat_elements(&partial, recurse);
+ str_list_free(&recurse);
+ /* Check for missing closing brace. */
+ if (*p != '}') {
+ WARNING1 ("kpathsea: %s: Unmatched {", *text);
+ --p; /* undo ++p above for the next iteration,
+ to avoid potential buffer overrun */
+ }
+ *text = p+1;
+ } else if (*p == '$') {
+ /* Skip ${VAR} */
+ if (*(p+1) == '{')
+ for (p+=2; *p!='}';++p);
+ }
+#if defined(WIN32)
+ else if (kpathsea_IS_KANJI(kpse, p))
+ p++;
+#endif
+ }
+ expand_append(&partial, *text, p);
+ str_list_concat(&result, partial);
+ str_list_free(&partial);
+ *text = p;
+ return result;
+}
+
+
+
+#if defined (TEST)
+#include <stdio.h>
+
+fatal_error (format, arg1, arg2)
+ char *format, *arg1, *arg2;
+{
+ report_error (format, arg1, arg2);
+ exit (1);
+}
+
+report_error (format, arg1, arg2)
+ char *format, *arg1, *arg2;
+{
+ fprintf (stderr, format, arg1, arg2);
+ fprintf (stderr, "\n");
+}
+
+int
+main (int argc, char **argv)
+{
+ char example[256];
+ char *result;
+
+ kpse_set_program_name(argv[0], NULL);
+ result = kpse_brace_expand ("a{\0exebad");
+ printf ("%s\n", result);
+
+#if 0 /* if you want an interactive loop */
+ for (;;)
+ {
+ int i;
+
+ fprintf (stderr, "brace_expand> ");
+
+ if ((!fgets (example, 256, stdin))
+ || strncmp (example, "quit", 4) == 0)
+ break;
+
+ if (strlen (example))
+ example[strlen (example) - 1] = 0;
+
+ result = kpse_brace_expand (example);
+ printf ("%s\n", result);
+ }
+#endif
+ return 0;
+
+}
+
+
+#endif /* TEST */
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -DMAKE_KPSE_DLL -I. -I.. -I$kp -I$kp/.. -DTEST $kp/expand.c .libs/libkpathsea.a"
+end:
+*/
diff --git a/Build/source/texk/kpathsea/expand.h b/Build/source/texk/kpathsea/expand.h
new file mode 100644
index 00000000000..7d38611be7b
--- /dev/null
+++ b/Build/source/texk/kpathsea/expand.h
@@ -0,0 +1,59 @@
+/* expand.h: general expansion.
+
+ Copyright 1993, 1994, 1996, 2008, 2011, 2018 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_EXPAND_H
+#define KPATHSEA_EXPAND_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Call kpse_var_expand and kpse_tilde_expand (in that order). Result
+ is always in fresh memory, even if no expansions were done. */
+extern string kpathsea_expand (kpathsea kpse, const_string s);
+
+#endif /* MAKE_KPSE_DLL */
+
+/* Do brace expansion and call `kpathsea_expand' on each element of the
+ result; return the final expansion (always in fresh memory, even if
+ no expansions were done). We don't call `kpse_expand_default'
+ because there is a whole sequence of defaults to run through; see
+ `kpse_init_format'. */
+extern KPSEDLL string kpathsea_brace_expand (kpathsea kpse, const_string path);
+
+/* Do brace expansion and call `kpse_expand' on each argument of the
+ result, then expand any `//' constructs. The final expansion (always
+ in fresh memory) is a path of all the existing directories that match
+ the pattern. */
+extern KPSEDLL string kpathsea_path_expand (kpathsea kpse, const_string path);
+
+#if defined(KPSE_COMPAT_API)
+extern KPSEDLL string kpse_brace_expand (const_string path);
+extern KPSEDLL string kpse_path_expand (const_string path);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_EXPAND_H */
diff --git a/Build/source/texk/kpathsea/extend-fname.c b/Build/source/texk/kpathsea/extend-fname.c
new file mode 100644
index 00000000000..b9938af1f27
--- /dev/null
+++ b/Build/source/texk/kpathsea/extend-fname.c
@@ -0,0 +1,30 @@
+/* extend-fname.c: give a filename a suffix, if necessary.
+
+ Copyright 1992, 1993, 2008, 2011 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+const_string
+extend_filename (const_string name, const_string default_suffix)
+{
+ const_string new_s;
+ const_string suffix = find_suffix (name);
+
+ new_s = suffix == NULL ? concat3 (name, ".", default_suffix)
+ : name;
+ return new_s;
+}
diff --git a/Build/source/texk/kpathsea/file-p.c b/Build/source/texk/kpathsea/file-p.c
new file mode 100644
index 00000000000..8e45a92097f
--- /dev/null
+++ b/Build/source/texk/kpathsea/file-p.c
@@ -0,0 +1,75 @@
+/* file-p.c: file predicates.
+
+ Copyright 1992, 1993, 1994, 2008, 2015, 2016 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/xstat.h>
+
+
+/* Test whether FILENAME1 and FILENAME2 are actually the same file. If
+ stat fails on either of the names, we return false, without error. */
+
+boolean
+same_file_p (const_string filename1, const_string filename2)
+{
+#ifdef _WIN32
+ intptr_t handle1, handle2;
+ FILE *f1, *f2;
+ BY_HANDLE_FILE_INFORMATION fileinfo1, fileinfo2;
+
+ f1 = fopen(filename1, "r");
+ if(!f1) return false;
+ f2 = fopen(filename2, "r");
+ if(!f2) {
+ fclose(f1);
+ return false;
+ }
+
+ handle1 = _get_osfhandle(fileno(f1));
+ handle2 = _get_osfhandle(fileno(f2));
+
+ if (!GetFileInformationByHandle((HANDLE)handle1, &fileinfo1)) {
+ fclose(f1);
+ fclose(f2);
+ return false;
+ }
+
+ if (!GetFileInformationByHandle((HANDLE)handle2, &fileinfo2)) {
+ fclose(f1);
+ fclose(f2);
+ return false;
+ }
+
+ fclose(f1);
+ fclose(f2);
+
+ if (fileinfo1.dwVolumeSerialNumber == fileinfo2.dwVolumeSerialNumber &&
+ fileinfo1.nFileIndexHigh == fileinfo2.nFileIndexHigh &&
+ fileinfo1.nFileIndexLow == fileinfo2.nFileIndexLow)
+ return true;
+ else
+ return false;
+#else
+ struct stat sb1, sb2;
+ /* These are put in variables only so the results can be inspected
+ under gdb. */
+ int r1 = stat (filename1, &sb1);
+ int r2 = stat (filename2, &sb2);
+
+ return r1 == 0 && r2 == 0 ? SAME_FILE_P (sb1, sb2) : false;
+#endif
+}
diff --git a/Build/source/texk/kpathsea/find-suffix.c b/Build/source/texk/kpathsea/find-suffix.c
new file mode 100644
index 00000000000..8d0d92d9107
--- /dev/null
+++ b/Build/source/texk/kpathsea/find-suffix.c
@@ -0,0 +1,53 @@
+/* find-suffix.c: return the stuff after a dot.
+
+ Copyright 1992, 1993, 1995, 2008, 2011, 2016 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+
+
+/* Return pointer to first character after `.' in last directory element
+ of NAME. If the name is `foo' or `/foo.bar/baz', we have no extension. */
+
+/* The the result of strrchr(NAME, '.'), when not NULL, is a non-const
+ pointer into the string NAME. However, this is cheating (motivated
+ by limitations of the C language) when the argument NAME is a
+ const string, because in that case the (technically non-const) result
+ from strrchr() is certainly not modifiable.
+
+ We do not want to repeat this kind of cheating for find_suffix() and
+ therefore declare find_suffix(NAME) as const. When find_suffix(NAME)
+ is non-NULL and the argument NAME is modifiable (i.e., non-const)
+ then NAME+(find_suffix(NAME)-NAME) is an equivalent modifiable string
+ and the pointer arithmetic is optimized away by modern compilers. */
+
+const_string
+find_suffix (const_string name)
+{
+ const_string dot_pos = strrchr (name, '.');
+ const_string p;
+
+ if (dot_pos == NULL)
+ return NULL;
+
+ for (p = dot_pos + 1; *p; p++) {
+ if (IS_DIR_SEP (*p))
+ return NULL;
+ }
+
+ return dot_pos + 1;
+}
diff --git a/Build/source/texk/kpathsea/fn.c b/Build/source/texk/kpathsea/fn.c
new file mode 100644
index 00000000000..3464ced7722
--- /dev/null
+++ b/Build/source/texk/kpathsea/fn.c
@@ -0,0 +1,119 @@
+/* fn.c: arbitrarily long filenames or strings.
+
+ Copyright 1993, 2008 Karl Berry.
+ Copyright 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/fn.h>
+
+
+/* /usr/local/lib/texmf/fonts/public/cm/pk/ljfour/cmr10.300pk is 58
+ chars, so ASCII `K' seems a good choice. */
+#define CHUNK_SIZE 75
+
+
+fn_type
+fn_init (void)
+{
+ fn_type ret;
+
+ FN_ALLOCATED (ret) = FN_LENGTH (ret) = 0;
+ FN_STRING (ret) = NULL;
+
+ return ret;
+}
+
+
+fn_type
+fn_copy0 (const_string s, unsigned len)
+{
+ fn_type ret;
+
+ FN_ALLOCATED (ret) = CHUNK_SIZE > len ? CHUNK_SIZE : len + 1;
+ FN_STRING (ret) = (string)xmalloc (FN_ALLOCATED (ret));
+
+ strncpy (FN_STRING (ret), s, len);
+ FN_STRING (ret)[len] = 0;
+ FN_LENGTH (ret) = len + 1;
+
+ return ret;
+}
+
+/* Don't think we ever try to free something that might usefully be
+ empty, so give fatal error if nothing allocated. */
+
+void
+fn_free (fn_type *f)
+{
+ assert (FN_STRING (*f) != NULL);
+ free (FN_STRING (*f));
+ FN_STRING (*f) = NULL;
+ FN_ALLOCATED (*f) = 0;
+ FN_LENGTH (*f) = 0;
+}
+
+/* An arithmetic increase seems more reasonable than geometric. We
+ don't increase the length member since it may be more convenient for
+ the caller to add than subtract when appending the stuff that will
+ presumably follow. */
+
+static void
+grow (fn_type *f, unsigned len)
+{
+ while (FN_LENGTH (*f) + len > FN_ALLOCATED (*f))
+ {
+ FN_ALLOCATED (*f) += CHUNK_SIZE;
+ XRETALLOC (FN_STRING (*f), FN_ALLOCATED (*f), char);
+ }
+}
+
+
+void
+fn_1grow (fn_type *f, char c)
+{
+ grow (f, 1);
+ FN_STRING (*f)[FN_LENGTH (*f)] = c;
+ FN_LENGTH (*f)++;
+}
+
+
+void
+fn_grow (fn_type *f, const_string source, unsigned len)
+{
+ grow (f, len);
+ strncpy (FN_STRING (*f) + FN_LENGTH (*f), source, len);
+ FN_LENGTH (*f) += len;
+}
+
+
+void
+fn_str_grow (fn_type *f, const_string s)
+{
+ unsigned more_len = strlen (s);
+ grow (f, more_len);
+ strcat (FN_STRING (*f), s);
+ FN_LENGTH (*f) += more_len;
+}
+
+
+void
+fn_shrink_to (fn_type *f, unsigned loc)
+{
+ assert (FN_LENGTH (*f) > loc);
+ FN_STRING (*f)[loc] = 0;
+ FN_LENGTH (*f) = loc + 1;
+}
diff --git a/Build/source/texk/kpathsea/fn.h b/Build/source/texk/kpathsea/fn.h
new file mode 100644
index 00000000000..e1bab8e6f62
--- /dev/null
+++ b/Build/source/texk/kpathsea/fn.h
@@ -0,0 +1,71 @@
+/* fn.h: arbitrarily long filenames (or just strings).
+
+ Copyright 2001, 2005 Olaf Weber.
+ Copyright 1993, 2008, 2011 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_FN_H
+#define KPATHSEA_FN_H
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+/* Arbitrarily long filenames; it's inconvenient to use obstacks here,
+ because we want to maintain a null terminator. Also used for
+ dynamically growing strings even when the null byte isn't necessary,
+ e.g., in `variable.c', since I don't want to pass obstacks around
+ everywhere, and one can't free parts of an obstack arbitrarily. */
+
+typedef struct
+{
+ string str;
+ unsigned allocated;
+ unsigned length; /* includes the terminating null byte, if any */
+} fn_type;
+
+#define FN_STRING(fn) ((fn).str)
+#define FN_ALLOCATED(fn) ((fn).allocated)
+#define FN_LENGTH(fn) ((fn).length)
+
+
+/* Create a new empty fn. */
+extern fn_type fn_init (void);
+
+/* Create a new fn from the first LEN characters from S and a null. */
+extern fn_type fn_copy0 (const_string s, unsigned len);
+
+/* Free what's been allocated. Can also just free the string if it's
+ been extracted out. Fatal error if nothing allocated in F. */
+extern void fn_free (fn_type *f);
+
+/* Append the character C to the fn F. Don't append trailing null. */
+extern void fn_1grow (fn_type *f, char c);
+
+/* Append LENGTH bytes from SOURCE to F. */
+extern void fn_grow (fn_type *f, const_string source, unsigned length);
+
+/* Concatenate the component S to the fn F. Assumes string currently in
+ F is null terminated. */
+extern void fn_str_grow (fn_type *f, const_string s);
+
+/* Add a null to F's string at position LOC, and update its length.
+ Fatal error if LOC is past the end of the string. */
+extern void fn_shrink_to (fn_type *f, unsigned loc);
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not KPATHSEA_FN_H */
diff --git a/Build/source/texk/kpathsea/fontmap.c b/Build/source/texk/kpathsea/fontmap.c
new file mode 100644
index 00000000000..019f3307b33
--- /dev/null
+++ b/Build/source/texk/kpathsea/fontmap.c
@@ -0,0 +1,201 @@
+/* fontmap.c: read files for additional font names.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 2008, 2011-2013 Karl Berry.
+ Copyright 2001, 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-ctype.h>
+#include <kpathsea/c-fopen.h>
+#include <kpathsea/fontmap.h>
+#include <kpathsea/hash.h>
+#include <kpathsea/line.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/str-list.h>
+#include <kpathsea/tex-file.h>
+
+/* We have one and only one fontmap, so may as well make it static
+ instead of passing it around. */
+
+#ifndef MAP_NAME
+#define MAP_NAME "texfonts.map"
+#endif
+#ifndef MAP_HASH_SIZE
+#define MAP_HASH_SIZE 4001
+#endif
+
+
+/* Return next whitespace-delimited token in STR or NULL if none. */
+
+static string
+token (const_string str)
+{
+ unsigned len;
+ const_string start;
+ string ret;
+
+ while (*str && ISSPACE (*str))
+ str++;
+
+ start = str;
+ while (*str && !ISSPACE (*str))
+ str++;
+
+ len = str - start;
+ ret = (string)xmalloc (len + 1);
+ strncpy (ret, start, len);
+ ret[len] = 0;
+
+ return ret;
+}
+
+/* Open and read the mapping file MAP_FILENAME, putting its entries into
+ MAP. Comments begin with % and continue to the end of the line. Each
+ line of the file defines an entry: the first word is the real
+ filename (e.g., `ptmr'), the second word is the alias (e.g.,
+ `Times-Roman'), and any subsequent words are ignored. .tfm is added
+ if either the filename or the alias have no extension. This is the
+ same order as in Dvips' psfonts.map. Perhaps someday the programs
+ will both read the same file. */
+
+static void
+map_file_parse (kpathsea kpse, const_string map_filename)
+{
+ char *orig_l;
+ unsigned map_lineno = 0;
+ FILE *f = xfopen (map_filename, FOPEN_R_MODE);
+
+ if (kpse->record_input)
+ kpse->record_input (map_filename);
+
+ while ((orig_l = read_line (f)) != NULL) {
+ string filename;
+ string l = orig_l; /* save for free() */
+ string comment_loc = strrchr (l, '%');
+ if (!comment_loc) {
+ comment_loc = strstr (l, "@c");
+ }
+
+ /* Ignore anything after a % or @c. */
+ if (comment_loc)
+ *comment_loc = 0;
+
+ map_lineno++;
+
+ /* Skip leading whitespace so we can use strlen below. Can't use
+ strtok since this routine is recursive. */
+ while (*l && ISSPACE (*l))
+ l++;
+
+ /* If we don't have any filename, that's ok, the line is blank. */
+ filename = token (l);
+ if (filename) {
+ string alias = token (l + strlen (filename));
+
+ if (STREQ (filename, "include")) {
+ if (alias == NULL) {
+ WARNING2 ("kpathsea: %s:%u: Filename argument for include directive missing",
+ map_filename, map_lineno);
+ } else {
+ string include_fname = kpathsea_path_search (kpse,
+ kpse->map_path, alias, false);
+ if (include_fname) {
+ map_file_parse (kpse, include_fname);
+ if (include_fname != alias)
+ free (include_fname);
+ } else {
+ WARNING3 ("kpathsea: %s:%u: Can't find fontname include file `%s'",
+ map_filename, map_lineno, alias);
+ }
+ free (alias);
+ free (filename);
+ }
+
+ /* But if we have a filename and no alias, something's wrong. */
+ } else if (alias == NULL) {
+ WARNING3 ("kpathsea: %s:%u: Fontname alias missing for filename `%s'",
+ map_filename, map_lineno, filename);
+ free (filename);
+
+ } else {
+ /* We've got everything. Insert the new entry. They were
+ already dynamically allocated by token(), so don't bother
+ with xstrdup. */
+ hash_insert_normalized (&(kpse->map), alias, filename);
+ }
+ }
+
+ free (orig_l);
+ }
+
+ xfclose (f, map_filename);
+}
+
+/* Parse the file MAP_NAME in each of the directories in PATH and
+ return the resulting structure. Entries in earlier files override
+ later files. */
+
+static void
+read_all_maps (kpathsea kpse)
+{
+ string *filenames;
+
+ kpse->map_path = kpathsea_init_format (kpse, kpse_fontmap_format);
+ filenames = kpathsea_all_path_search (kpse, kpse->map_path, MAP_NAME);
+
+ kpse->map = hash_create (MAP_HASH_SIZE);
+
+ while (*filenames) {
+ map_file_parse (kpse, *filenames);
+ filenames++;
+ }
+}
+
+/* Look up KEY in texfonts.map's; if it's not found, remove any suffix
+ from KEY and try again. Create the map if necessary. */
+
+const_string *
+kpathsea_fontmap_lookup (kpathsea kpse, const_string key)
+{
+ const_string *ret;
+ const_string suffix = find_suffix (key);
+
+ if (kpse->map.size == 0) {
+ read_all_maps (kpse);
+ }
+
+ ret = hash_lookup (kpse->map, key);
+ if (!ret) {
+ /* OK, the original KEY didn't work. Let's check for the KEY without
+ an extension -- perhaps they gave foobar.tfm, but the mapping only
+ defines `foobar'. */
+ if (suffix) {
+ string base_key = remove_suffix (key);
+ ret = hash_lookup (kpse->map, base_key);
+ free (base_key);
+ }
+ }
+
+ /* Append any original suffix. */
+ if (ret && suffix) {
+ const_string *elt;
+ for (elt = ret; *elt; elt++) {
+ *elt = extend_filename (*elt, suffix);
+ }
+ }
+
+ return ret;
+}
diff --git a/Build/source/texk/kpathsea/fontmap.h b/Build/source/texk/kpathsea/fontmap.h
new file mode 100644
index 00000000000..6ac220c4309
--- /dev/null
+++ b/Build/source/texk/kpathsea/fontmap.h
@@ -0,0 +1,33 @@
+/* fontmap.h: declarations for reading a file to define additional font names.
+
+ Copyright 1993, 1994, 1995, 2008, 2010, 2011 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef FONTMAP_H
+#define FONTMAP_H
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/hash.h>
+#include <kpathsea/types.h>
+
+/* Look up KEY in all texfonts.map's in the glyph_format path, and
+ return a null-terminated list of all matching entries, or NULL. */
+extern const_string *kpathsea_fontmap_lookup (kpathsea kpse, const_string key);
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not FONTMAP_H */
diff --git a/Build/source/texk/kpathsea/getopt.c b/Build/source/texk/kpathsea/getopt.c
new file mode 100644
index 00000000000..04c1e21cb26
--- /dev/null
+++ b/Build/source/texk/kpathsea/getopt.c
@@ -0,0 +1,962 @@
+/* Getopt for GNU.
+
+ Copyright 2008-2012 Karl Berry.
+ Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 2000, 2010
+ Free Software Foundation, Inc.
+
+ The original version of this file was part of the GNU C Library.
+ Its master source is NOT part of the C library, however.
+ The master source lives in libc.
+ This version has been modified for use with libkpathsea.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+ Ditto for AIX 3.2 and <stdlib.h>. */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. 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. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+ contain conflicting prototypes for getopt. */
+#include <stdlib.h>
+#include <unistd.h>
+#endif /* GNU C library. */
+
+#ifdef VMS
+#include <unixlib.h>
+#if HAVE_STRING_H - 0
+#include <string.h>
+#endif
+#endif
+
+#if defined (WIN32) && !defined (__CYGWIN__)
+/* It's not Unix, really. See? Capital letters. */
+#include <stdlib.h>
+#include <windows.h>
+#undef getpid
+#define getpid() GetCurrentProcessId()
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+ When compiling libc, the _ macro is predefined. */
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid) gettext (msgid)
+#else
+# define _(msgid) (msgid)
+#endif
+#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' 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.
+
+ 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.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 = NULL;
+
+/* 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;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+ causes problems with re-calling getopt as programs generally don't
+ know that. */
+
+int __getopt_initialized = 0;
+
+/* 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. */
+
+static char *nextchar;
+
+/* 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 = '?';
+
+/* 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.
+
+ 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. */
+
+static enum
+{
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable. */
+static char *posixly_correct;
+
+#if defined(__GNU_LIBRARY__) || defined(WIN32)
+/* We want to avoid inclusion of string.h with non-GNU libraries
+ because there are many ways it can cause trouble.
+ On some systems, it contains special magic macros that don't work
+ in GCC. */
+#include <string.h>
+#define my_index strchr
+#else
+
+/* Avoid depending on library functions or files
+ whose names are inconsistent. */
+
+char *getenv ();
+
+static char *my_index(const char *str, int chr)
+{
+ while (*str)
+ {
+ if (*str == chr)
+ return (char *) str;
+ str++;
+ }
+ return 0;
+}
+
+#endif /* not __GNU_LIBRARY__ */
+
+/* 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. */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#ifdef _LIBC
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+static const char *nonoption_flags;
+static int nonoption_flags_len;
+
+static int original_argc;
+static char *const *original_argv;
+
+/* Make sure the environment variable bash 2.0 puts in the environment
+ is valid for the getopt call we must make sure that the ARGV passed
+ to getopt is that one passed to the process. */
+static void store_args (int argc, char *const *argv) __attribute__ ((unused));
+static void
+store_args (int argc, char *const *argv)
+{
+ /* 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). */
+ original_argc = argc;
+ original_argv = argv;
+}
+text_set_element (__libc_subinit, store_args);
+#endif
+
+/* 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)
+{
+ int bottom = first_nonopt;
+ int middle = last_nonopt;
+ int top = 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. */
+
+ 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;
+ }
+ /* 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;
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ first_nonopt += (optind - last_nonopt);
+ last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+static const char *_getopt_initialize(int argc, char *const *argv, const char *optstring)
+{
+ /* 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. */
+
+ first_nonopt = last_nonopt = optind = 1;
+
+ nextchar = NULL;
+
+ posixly_correct = getenv ("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (posixly_correct != NULL)
+ ordering = REQUIRE_ORDER;
+ else
+ ordering = PERMUTE;
+
+#ifdef _LIBC
+ if (posixly_correct == NULL
+ && argc == original_argc && argv == original_argv)
+ {
+ /* Bash 2.0 puts a special variable in the environment for each
+ command it runs, specifying which ARGV elements are the results of
+ file name wildcard expansion and therefore should not be
+ considered as options. */
+ char var[100];
+ sprintf (var, "_%d_GNU_nonoption_argv_flags_", getpid ());
+ nonoption_flags = getenv (var);
+ if (nonoption_flags == NULL)
+ nonoption_flags_len = 0;
+ else
+ nonoption_flags_len = strlen (nonoption_flags);
+ }
+ else
+ 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(
+ int argc,
+ char *const *argv,
+ const char *optstring,
+ const struct option *longopts,
+ int *longind,
+ int long_only
+){
+ optarg = NULL;
+
+ if (!__getopt_initialized || optind == 0)
+ {
+ optstring = _getopt_initialize (argc, argv, optstring);
+ optind = 1; /* Don't scan ARGV[0], the program name. */
+ __getopt_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. */
+#ifdef _LIBC
+#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
+ || (optind < nonoption_flags_len \
+ && nonoption_flags[optind] == '1'))
+#else
+#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
+
+ if (nextchar == NULL || *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 (last_nonopt > optind)
+ last_nonopt = optind;
+ if (first_nonopt > optind)
+ first_nonopt = optind;
+
+ if (ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (last_nonopt != optind)
+ first_nonopt = optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (optind < argc && NONOPTION_P)
+ optind++;
+ last_nonopt = 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 (optind != argc && !strcmp (argv[optind], "--"))
+ {
+ optind++;
+
+ if (first_nonopt != last_nonopt && last_nonopt != optind)
+ exchange ((char **) argv);
+ else if (first_nonopt == last_nonopt)
+ first_nonopt = optind;
+ last_nonopt = argc;
+
+ 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 (optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (first_nonopt != last_nonopt)
+ optind = 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 (ordering == REQUIRE_ORDER)
+ return -1;
+ optarg = argv[optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ nextchar = (argv[optind] + 1
+ + (longopts != NULL && argv[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[optind][1] == '-'
+ || (long_only && (argv[optind][2] || !my_index (optstring, argv[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 = 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, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - 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
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (opterr)
+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ 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)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ {
+ if (argv[optind - 1][1] == '-')
+ /* --option */
+ fprintf (stderr,
+ _("%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+ else
+ /* +option or -option */
+ fprintf (stderr,
+ _("%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[optind - 1][0], pfound->name);
+ }
+
+ nextchar += strlen (nextchar);
+
+ optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (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[optind][1] == '-'
+ || my_index (optstring, *nextchar) == NULL)
+ {
+ if (opterr)
+ {
+ if (argv[optind][1] == '-')
+ /* --option */
+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+ argv[0], nextchar);
+ else
+ /* +option or -option */
+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[optind][0], nextchar);
+ }
+ nextchar = (char *) "";
+ optind++;
+ optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *nextchar++;
+ char *temp = my_index (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*nextchar == '\0')
+ ++optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (opterr)
+ {
+ if (posixly_correct)
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: illegal option -- %c\n"),
+ argv[0], c);
+ else
+ fprintf (stderr, _("%s: invalid option -- %c\n"),
+ argv[0], c);
+ }
+ 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 (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (nextchar = nameend = 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, nextchar, nameend - nextchar))
+ {
+ if ((unsigned int) (nameend - 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 (opterr)
+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[optind]);
+ nextchar += strlen (nextchar);
+ 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)
+ optarg = nameend + 1;
+ else
+ {
+ if (opterr)
+ fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+
+ nextchar += strlen (nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (optind < argc)
+ optarg = argv[optind++];
+ else
+ {
+ if (opterr)
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[optind - 1]);
+ nextchar += strlen (nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ nextchar += strlen (nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ 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 (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ optind++;
+ }
+ else
+ optarg = NULL;
+ nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*nextchar != '\0')
+ {
+ optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ optind++;
+ }
+ else if (optind == argc)
+ {
+ if (opterr)
+ {
+ /* 1003.2 specifies the format of this message. */
+ fprintf (stderr,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+ }
+ optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ optarg = argv[optind++];
+ nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int getopt(int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0);
+}
+
+#endif /* Not ELIDE_CODE. */
+
+#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/Build/source/texk/kpathsea/getopt.h b/Build/source/texk/kpathsea/getopt.h
new file mode 100644
index 00000000000..8acf05fb4fb
--- /dev/null
+++ b/Build/source/texk/kpathsea/getopt.h
@@ -0,0 +1,161 @@
+/* Declarations for getopt.
+
+ Copyright 2008, 2010-2012 Karl Berry.
+ Copyright 1989,90,91,92,93,94,96,97,2000,05 Free Software Foundation, Inc.
+
+ The original version of this file was part of the GNU C Library.
+ Its master source is NOT part of the C library, however.
+ The master source lives in libc.
+ This version has been modified for use with libkpathsea.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_H
+
+#ifndef __need_getopt
+#define _GETOPT_H 1
+#endif
+
+#if defined (WIN32) && !defined (__MINGW32__) && !defined (NO_KPSE_DLL)
+#define KPSE_DLL 1
+#endif /* WIN32 && !__MINGW32__ && !NO_KPSE_DLL */
+
+#if !defined (KPSEDLL)
+#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
+#ifdef MAKE_KPSE_DLL
+#define KPSEDLL __declspec(dllexport)
+#else /* ! MAKE_KPSE_DLL */
+#define KPSEDLL __declspec(dllimport)
+#endif
+#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
+#define KPSEDLL
+#endif /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
+#endif /* ! KPSEDLL */
+
+#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 KPSEDLL 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 KPSEDLL int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern KPSEDLL int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern KPSEDLL 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 */
+
+#if defined(__GNU_LIBRARY__) || defined (WIN32) || defined (__CYGWIN__)
+/* Many other libraries have conflicting prototypes for getopt, with
+ differences in the consts, in stdlib.h. To avoid compilation
+ errors, only prototype getopt for the GNU C library. And not when
+ compiling with C++; g++ 4.7.0 chokes on conflicting exception
+ specifications. */
+#if !defined (__cplusplus)
+extern KPSEDLL int getopt (int argc, char *const *argv, const char *shortopts);
+#endif
+#if defined (__MINGW32__) || defined (__CYGWIN__)
+#define __GETOPT_H__ /* Avoid that <unistd.h> redeclares the getopt API. */
+#endif
+#elif !defined (__cplusplus)
+extern KPSEDLL int getopt ();
+#endif
+
+#ifndef __need_getopt
+extern KPSEDLL int getopt_long (int argc, char *const *argv, const char *shortopts,
+ const struct option *longopts, int *longind);
+extern KPSEDLL int getopt_long_only (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind);
+
+#if defined (MAKE_KPSE_DLL) || defined (NO_KPSE_DLL) /* libkpathsea internal only */
+
+/* Internal only. Users should not call this directly. */
+extern int _getopt_internal (int argc, char *const *argv,
+ const char *shortopts,
+ const struct option *longopts, int *longind,
+ int long_only);
+
+#endif /* MAKE_KPSE_DLL || NO_KPSE_DLL */
+#endif /* need getopt */
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* _GETOPT_H */
diff --git a/Build/source/texk/kpathsea/getopt1.c b/Build/source/texk/kpathsea/getopt1.c
new file mode 100644
index 00000000000..f064984cdaa
--- /dev/null
+++ b/Build/source/texk/kpathsea/getopt1.c
@@ -0,0 +1,177 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+
+ Copyright 2008, 2010 Karl Berry.
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+
+ The original version of this file was part of the GNU C Library.
+ It has been modified for use with libkpathsea.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "getopt.h"
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself. 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. */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* 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 *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index
+){
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 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 *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index
+){
+ return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+}
+
+
+#endif /* Not ELIDE_CODE. */
+
+#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 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/Build/source/texk/kpathsea/hash.c b/Build/source/texk/kpathsea/hash.c
new file mode 100644
index 00000000000..bfae7eb2ee9
--- /dev/null
+++ b/Build/source/texk/kpathsea/hash.c
@@ -0,0 +1,269 @@
+/* hash.c: hash table operations.
+
+ Copyright 1994-2000, 2002, 2005, 2008, 2012, 2016, 2017-2019
+ Karl Berry & Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-ctype.h>
+
+#include <kpathsea/hash.h>
+#include <kpathsea/str-list.h>
+
+
+/* The hash function. We go for simplicity here. */
+
+/* All our hash tables are related to filenames. */
+
+static unsigned
+hash (hash_table_type table, const_string key)
+{
+ unsigned n = 0;
+
+ /* Our keys aren't often anagrams of each other, so no point in
+ weighting the characters. */
+ while (*key != 0)
+#if defined (WIN32) && defined (KPSE_COMPAT_API)
+ if (IS_KANJI(key)) {
+ n = (n + n + (unsigned)(*key++)) % table.size;
+ n = (n + n + (unsigned)(*key++)) % table.size;
+ } else
+#endif
+ n = (n + n + TRANSFORM (*key++)) % table.size;
+
+ return n;
+}
+
+/* Identical hash function as above, but does not normalize keys. */
+static unsigned
+hash_normalized (hash_table_type table, const_string key)
+{
+ unsigned n = 0;
+
+ /* Our keys aren't often anagrams of each other, so no point in
+ weighting the characters. */
+ while (*key != 0)
+ n = (n + n + (*key++)) % table.size;
+
+ return n;
+}
+
+hash_table_type
+hash_create (unsigned size)
+{
+ /* There was "static ..." since Oct3, 1997 to work around a gcc
+ optimizer bug for Alpha. That particular optimization bug
+ should be gone by now (Mar4, 2009).
+ */
+ hash_table_type ret;
+ unsigned b;
+ ret.buckets = XTALLOC (size, hash_element_type *);
+ ret.size = size;
+
+ /* calloc's zeroes aren't necessarily NULL, so be safe. */
+ for (b = 0; b <ret.size; b++)
+ ret.buckets[b] = NULL;
+
+ return ret;
+}
+
+/* Whether or not KEY is already in TABLE, insert it and VALUE. Do not
+ duplicate the strings, in case they're being purposefully shared. */
+
+void
+hash_insert (hash_table_type *table,
+ const_string key,
+ const_string value)
+{
+ unsigned n = hash (*table, key);
+ hash_element_type *new_elt = XTALLOC1 (hash_element_type);
+
+ new_elt->key = key;
+ new_elt->value = value;
+ new_elt->next = NULL;
+
+ /* Insert the new element at the end of the list. */
+ if (!table->buckets[n])
+ /* first element in bucket is a special case. */
+ table->buckets[n] = new_elt;
+ else
+ {
+ hash_element_type *loc = table->buckets[n];
+ while (loc->next) /* Find the last element. */
+ loc = loc->next;
+ loc->next = new_elt; /* Insert the new one after. */
+ }
+}
+
+/* Same as above, for normalized keys. */
+void
+hash_insert_normalized (hash_table_type *table,
+ const_string key,
+ const_string value)
+{
+ unsigned n = hash_normalized (*table, key);
+ hash_element_type *new_elt = XTALLOC1 (hash_element_type);
+
+ new_elt->key = key;
+ new_elt->value = value;
+ new_elt->next = NULL;
+
+ /* Insert the new element at the end of the list. */
+ if (!table->buckets[n])
+ /* first element in bucket is a special case. */
+ table->buckets[n] = new_elt;
+ else
+ {
+ hash_element_type *loc = table->buckets[n];
+ while (loc->next) /* Find the last element. */
+ loc = loc->next;
+ loc->next = new_elt; /* Insert the new one after. */
+ }
+}
+
+/* Remove a (KEY, VALUE) pair. */
+
+void
+hash_remove (hash_table_type *table, const_string key,
+ const_string value)
+{
+ hash_element_type *p;
+ hash_element_type *q;
+ unsigned n = hash (*table, key);
+
+ /* Find pair. */
+ for (q = NULL, p = table->buckets[n]; p != NULL; q = p, p = p->next)
+ if (FILESTRCASEEQ (key, p->key) && STREQ (value, p->value))
+ break;
+ if (p) {
+ /* We found something, remove it from the chain. */
+ if (q) q->next = p->next; else table->buckets[n] = p->next;
+ /* We cannot dispose of the contents. */
+ free (p);
+ }
+}
+
+/* Look up KEY in TABLE, and return NULL-terminated list of all matching
+ values (not copies), in insertion order. If none, return NULL. */
+
+const_string *
+hash_lookup (hash_table_type table, const_string key)
+{
+ hash_element_type *p;
+ cstr_list_type ret;
+ unsigned n = hash (table, key);
+ ret = cstr_list_init ();
+
+ /* Look at everything in this bucket. */
+ for (p = table.buckets[n]; p != NULL; p = p->next)
+ if (FILESTRCASEEQ (key, p->key))
+ cstr_list_add (&ret, p->value);
+
+ /* If we found anything, mark end of list with null. */
+ if (STR_LIST (ret))
+ cstr_list_add (&ret, NULL);
+
+#ifdef KPSE_DEBUG
+#if defined (KPSE_COMPAT_API)
+ {
+ kpathsea kpse = kpse_def;
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_HASH))
+ {
+ DEBUGF1 ("hash_lookup(%s) =>", key);
+ if (!STR_LIST (ret))
+ fputs (" (nil)\n", stderr);
+ else
+ {
+ const_string *r;
+ for (r = STR_LIST (ret); *r; r++)
+ {
+ putc (' ', stderr);
+ if (kpse->debug_hash_lookup_int)
+#if defined(_WIN64)
+ fprintf (stderr, "%I64d", (__int64) *r);
+#else
+ fprintf (stderr, "%ld", (long) *r);
+#endif
+ else
+ fputs (*r, stderr);
+ }
+ putc ('\n', stderr);
+ }
+ fflush (stderr);
+ }
+ }
+#endif
+#endif
+
+ return STR_LIST (ret);
+}
+
+#ifdef KPSE_DEBUG
+/* We only print nonempty buckets, to decrease output volume. */
+
+void
+hash_print (hash_table_type table, boolean summary_only)
+{
+ unsigned b;
+ unsigned total_elements = 0, total_buckets = 0;
+
+ for (b = 0; b < table.size; b++) {
+ hash_element_type *bucket = table.buckets[b];
+
+ if (bucket) {
+ unsigned len = 1;
+ hash_element_type *tb;
+
+ total_buckets++;
+ if (!summary_only) fprintf (stderr, "%4d ", b);
+
+ for (tb = bucket->next; tb != NULL; tb = tb->next)
+ len++;
+ if (!summary_only) fprintf (stderr, ":%-5d", len);
+ total_elements += len;
+
+ if (!summary_only) {
+ for (tb = bucket; tb != NULL; tb = tb->next)
+ fprintf (stderr, " %s=>%s", tb->key, tb->value);
+ putc ('\n', stderr);
+ }
+ }
+ }
+
+ fprintf (stderr,
+ "%u buckets, %u nonempty (%u%%); %u entries, average chain %.1f.\n",
+ table.size,
+ total_buckets,
+ 100 * total_buckets / table.size,
+ total_elements,
+ total_buckets ? total_elements / (double) total_buckets : 0.0);
+}
+#endif
+
+#if KPATHSEA_CAN_FREE
+void
+hash_free (hash_table_type table)
+{
+ struct hash_element_struct *p, *q;
+ p = (struct hash_element_struct *)table.buckets;
+ while (p != NULL) {
+ q = p->next;
+ free ((char *)p->key);
+ free ((char *)p->value);
+ free (p);
+ p = q;
+ }
+}
+#endif
diff --git a/Build/source/texk/kpathsea/hash.h b/Build/source/texk/kpathsea/hash.h
new file mode 100644
index 00000000000..f54cd0fd646
--- /dev/null
+++ b/Build/source/texk/kpathsea/hash.h
@@ -0,0 +1,96 @@
+/* hash.h: declarations for a hash table.
+
+ Copyright 1994, 1995, 2008, 2010-2012 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef HASH_H
+#define HASH_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+/*
+ * The code freeing strings and hash tables is enabled/disabled
+ * by KPATHSEA_CAN_FREE.
+ */
+/* At the moment can not free */
+#define KPATHSEA_CAN_FREE 0
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A single (key,value) pair. */
+typedef struct hash_element_struct
+{
+ const_string key;
+ const_string value;
+ struct hash_element_struct *next;
+} hash_element_type;
+
+/* The usual arrangement of buckets initialized to null. */
+typedef struct
+{
+ hash_element_type **buckets;
+ unsigned size;
+} hash_table_type;
+
+
+/* Create a hash table of size SIZE. */
+extern KPSEDLL hash_table_type hash_create (unsigned size);
+
+/* Insert the (KEY,VALUE) association into TABLE. KEY may have more
+ than one VALUE. Neither KEY nor VALUE is copied. */
+extern KPSEDLL void hash_insert (hash_table_type *table,
+ const_string key,
+ const_string value);
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Insert the (KEY, VALUE) association into TABLE. KEY may have more
+ than one VALUE. Neither KEY nor VALUE is copied. Assume that KEY
+ is already normalized (all lowercase) on platforms where this matters. */
+extern void hash_insert_normalized (hash_table_type *table,
+ const_string key,
+ const_string value);
+
+#endif /* MAKE_KPSE_DLL */
+
+/* Remove the (KEY,VALUE) association from TABLE. */
+extern KPSEDLL void hash_remove (hash_table_type *table, const_string key,
+ const_string value);
+
+/* Look up KEY in TABLE, and return NULL-terminated list of all matching
+ values (not copies), in insertion order. If none, return NULL. */
+extern KPSEDLL const_string *hash_lookup (hash_table_type table, const_string key);
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Print TABLE to stderr. */
+extern void hash_print (hash_table_type table, boolean summary_only);
+
+#if KPATHSEA_CAN_FREE
+/* Drop the TABLE */
+extern void hash_free (hash_table_type table);
+#endif
+
+#endif /* MAKE_KPSE_DLL */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not HASH_H */
diff --git a/Build/source/texk/kpathsea/kdefault.c b/Build/source/texk/kpathsea/kdefault.c
new file mode 100644
index 00000000000..a0fc268eec3
--- /dev/null
+++ b/Build/source/texk/kpathsea/kdefault.c
@@ -0,0 +1,125 @@
+/* kdefault.c: expand extra colons.
+ (This is not named default.c because then the OSF/1 make tries to
+ make a program `default' from it, since we have a target `default';
+ and OSF/1 make doesn't understand .PHONY.)
+
+ Copyright 1993, 1994, 1996, 2008, 2009, 2011, 2017 Karl Berry.
+ Copyright 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/default.h>
+
+
+/* Check for leading colon first, then trailing, then doubled, since
+ that is fastest. Usually it will be leading or trailing. */
+
+string
+kpathsea_expand_default (kpathsea kpse, const_string path,
+ const_string fallback)
+{
+ unsigned path_length;
+ string expansion;
+
+ (void) kpse; /* unused */
+
+ /* The default path better not be null. */
+ assert (fallback);
+
+ if (path == NULL || *path == 0)
+ expansion = xstrdup (fallback);
+
+ /* Solitary or leading :? */
+ else if (IS_ENV_SEP (*path))
+ {
+ expansion = path[1] == 0 ? xstrdup (fallback) : concat (fallback, path);
+ }
+
+ /* Sorry about the assignment in the middle of the expression, but
+ conventions were made to be flouted and all that. I don't see the
+ point of calling strlen twice or complicating the logic just to
+ avoid the assignment (especially now that I've pointed it out at
+ such great length). */
+ else if (path[(path_length = strlen (path)) - 1] == ENV_SEP)
+ expansion = concat (path, fallback);
+
+ /* OK, not leading or trailing. Check for doubled. */
+ else
+ {
+ const_string loc;
+
+ for (loc = path; *loc; loc++)
+ if (IS_ENV_SEP (loc[0]) && IS_ENV_SEP (loc[1]))
+ break;
+ if (*loc)
+ { /* We have a doubled colon. */
+ expansion = (string)xmalloc (path_length + strlen(fallback) + 1);
+
+ /* Copy stuff up to and including the first colon. */
+ strncpy (expansion, path, loc - path + 1);
+ expansion[loc - path + 1] = 0;
+
+ /* Copy in FALLBACK, and then the rest of PATH. */
+ strcat (expansion, fallback);
+ strcat (expansion, loc + 1);
+ }
+ else
+ { /* No doubled colon. */
+ expansion = xstrdup(path);
+ }
+ }
+
+ return expansion;
+}
+
+#ifdef TEST
+
+void
+test_expand_default (const_string path, const_string def)
+{
+ string answer;
+
+ printf ("Expansion of `%s':\t", path ? path : "(nil)");
+ answer = kpathsea_expand_default (kpse_def, path, def);
+ puts (answer);
+}
+
+int
+main ()
+{
+ string default_path = "default";
+
+ test_expand_default (NULL, default_path);
+ test_expand_default ("", default_path);
+ test_expand_default ("none", default_path);
+ test_expand_default (ENV_SEP_STRING, default_path);
+ test_expand_default (ENV_SEP_STRING "first", default_path);
+ test_expand_default ("last" ENV_SEP_STRING, default_path);
+ test_expand_default ("middle" ENV_SEP_STRING ENV_SEP_STRING "elddim",
+ default_path);
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST kdefault.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/knj.c b/Build/source/texk/kpathsea/knj.c
new file mode 100644
index 00000000000..6aed564ed9f
--- /dev/null
+++ b/Build/source/texk/kpathsea/knj.c
@@ -0,0 +1,794 @@
+/* knj.c: check for 2-Byte Kanji (CP 932, SJIS) codes.
+
+ Copyright 2010, 2016, 2018 Akira Kakuto.
+ Copyright 2013, 2016, 2020 TANAKA Takuji.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/debug.h>
+#include <wchar.h>
+
+static int
+is_include_space(const char *s)
+{
+ char *p;
+ p = strchr(s, ' ');
+ if(p) return 1;
+ p = strchr(s, '\t');
+ if(p) return 1;
+ return 0;
+}
+
+/*
+ Get wide string from multibyte string.
+*/
+wchar_t *
+get_wstring_from_mbstring(int cp, const char *mbstr, wchar_t *wstr)
+{
+ int len;
+
+ len = MultiByteToWideChar(cp, 0, mbstr, -1, wstr, 0);
+ if (len==0) {
+ FATAL("cannot convert string to wide string");
+ }
+ if (wstr==NULL) {
+ wstr = xmalloc(sizeof(wchar_t)*(len+1));
+ }
+ len = MultiByteToWideChar(cp, 0, mbstr, -1, wstr, len+1);
+ if (len==0) {
+ FATAL("cannot convert multibyte string to wide string");
+ }
+ return wstr;
+}
+
+/*
+ Get multibyte string from wide string.
+*/
+char *
+get_mbstring_from_wstring(int cp, const wchar_t *wstr, char *mbstr)
+{
+ int len;
+
+ len = WideCharToMultiByte(cp, 0, wstr, -1, mbstr, 0, NULL, NULL);
+ if (len==0) {
+ FATAL("cannot convert string to multibyte string");
+ }
+ if (mbstr==NULL) {
+ mbstr = xmalloc(len+1);
+ }
+ len = WideCharToMultiByte(cp, 0, wstr, -1, mbstr, len+1, NULL, NULL);
+ if (len==0) {
+ FATAL("cannot convert wide string to multibyte string");
+ }
+ return mbstr;
+}
+
+int
+kpathsea_isknj(kpathsea kpse, int c)
+{
+ c &= 0xff;
+ switch (kpse->Is_cp932_system) {
+ case 932:
+ return((c>=0x81 && c<=0x9f) || (c>=0xe0 && c<=0xfc));
+ case 936:
+ return(c>=0x81 && c<=0xfe);
+ case 950:
+ return((c>=0xa1 && c<=0xc6) || (c>=0xc9 && c<=0xf9));
+ default:
+ return(0);
+ }
+}
+
+int
+kpathsea_isknj2(kpathsea kpse, int c)
+{
+ c &= 0xff;
+ switch (kpse->Is_cp932_system) {
+ case 932:
+ return(c>=0x40 && c<=0xfc && c!=0x7f);
+ case 936:
+ return(c>=0x40 && c<=0xfe && c!=0x7f);
+ case 950:
+ return((c>=0x40 && c<=0x7e) || (c>=0xa1 && c<=0xfe));
+ default:
+ return(0);
+ }
+}
+
+/*
+ xfopen by file system codepage
+*/
+FILE *
+kpathsea_fsyscp_xfopen (kpathsea kpse, const char *filename, const char *mode)
+{
+ FILE *f;
+ wchar_t *fnamew, modew[4];
+ int i;
+ unsigned char *fnn;
+ unsigned char *p;
+ size_t len;
+
+ assert(filename && mode);
+ len = strlen(filename);
+/*
+ Support very long input path name, longer than _MAX_PATH for
+ Windows, if it really exists and input name is given in
+ full-absolute path in a command line.
+ /./ , /../, \.\, \..\ should be excluded. (2020/06/06)
+ More than one adjacent directory separators should be
+ excluded. (2020/10/24)
+*/
+ fnn = xmalloc(len + 10);
+ p = strstr(filename, ".\\");
+ if (!p) {
+ p = strstr(filename, "./");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "//");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "\\\\");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "\\/");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "/\\");
+ }
+ if (!p && len > 2 && ((filename[0] == '/' && filename[1] == '/') ||
+ (filename[0] == '\\' && filename[1] == '\\' &&
+ filename[2] != '?'))) {
+ filename += 2;
+ strcpy (fnn, "\\\\?\\UNC\\");
+ strcat (fnn, filename);
+ } else if (!p && len > 2 && filename[1] == ':') {
+ strcpy (fnn, "\\\\?\\");
+ strcat (fnn, filename);
+ } else {
+ strcpy (fnn, filename);
+ }
+ for (p = fnn; *p; p++) {
+ if (*p == '/')
+ *p = '\\';
+ }
+
+ fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnamew=NULL);
+ for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
+ f = _wfopen(fnamew, modew);
+ free (fnn);
+ if (f == NULL)
+ FATAL_PERROR(filename);
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
+ DEBUGF_START ();
+ fprintf (stderr, "fsyscp_xfopen(%s [", filename);
+ WriteConsoleW( GetStdHandle( STD_ERROR_HANDLE ), fnamew, wcslen( fnamew ), NULL, NULL );
+#if defined(_WIN64)
+ fprintf (stderr, "], %s) => 0x%I64x\n", mode, (unsigned __int64) f);
+#else
+ fprintf (stderr, "], %s) => 0x%lx\n", mode, (unsigned long) f);
+#endif
+ DEBUGF_END ();
+ }
+ free(fnamew);
+
+ return f;
+}
+
+/*
+ fopen by file system codepage
+*/
+FILE *
+kpathsea_fsyscp_fopen (kpathsea kpse, const char *filename, const char *mode)
+{
+ FILE *f;
+ wchar_t *fnamew, modew[4];
+ int i;
+ unsigned char *fnn;
+ unsigned char *p;
+ size_t len;
+
+ assert(filename && mode);
+ len = strlen(filename);
+/*
+ Support very long input path name, longer than _MAX_PATH for
+ Windows, if it really exists and input name is given in
+ full-absolute path in a command line.
+ /./ , /../, \.\, \..\ should be excluded. (2020/06/06)
+ More than one adjacent directory separators should be
+ excluded. (2020/10/24)
+*/
+ fnn = xmalloc(len + 10);
+ p = strstr(filename, ".\\");
+ if (!p) {
+ p = strstr(filename, "./");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "//");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "\\\\");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "\\/");
+ }
+ if (!p && len > 2) {
+ p = strstr(filename + 2, "/\\");
+ }
+ if (!p && len > 2 && ((filename[0] == '/' && filename[1] == '/') ||
+ (filename[0] == '\\' && filename[1] == '\\' &&
+ filename[2] != '?'))) {
+ filename += 2;
+ strcpy (fnn, "\\\\?\\UNC\\");
+ strcat (fnn, filename);
+ } else if (!p && len > 2 && filename[1] == ':') {
+ strcpy (fnn, "\\\\?\\");
+ strcat (fnn, filename);
+ } else {
+ strcpy (fnn, filename);
+ }
+ for (p = fnn; *p; p++) {
+ if (*p == '/')
+ *p = '\\';
+ }
+
+ fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnamew=NULL);
+ for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
+ f = _wfopen(fnamew, modew);
+ free (fnn);
+ if (f != NULL) {
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
+ DEBUGF_START ();
+ fprintf (stderr, "fsyscp_fopen(%s [", filename);
+ WriteConsoleW( GetStdHandle( STD_ERROR_HANDLE ), fnamew, wcslen( fnamew ), NULL, NULL );
+#if defined(_WIN64)
+ fprintf (stderr, "], %s) => 0x%I64x\n", mode, (unsigned __int64) f);
+#else
+ fprintf (stderr, "], %s) => 0x%lx\n", mode, (unsigned long) f);
+#endif
+ DEBUGF_END ();
+ }
+ }
+ free(fnamew);
+
+ return f;
+}
+
+
+FILE *
+kpathsea_fsyscp_popen (kpathsea kpse, const char *command, const char *mode)
+{
+ FILE *f;
+ wchar_t *commandw, modew[4];
+ int i;
+
+ assert(command && mode);
+
+ if (is_include_space (command)) {
+ const char *p;
+ char *command2, *q;
+ command2 = xmalloc (strlen (command) + 3);
+ p = command;
+ q = command2;
+ *q++ = '\"';
+ while (*p)
+ *q++ = *p++;
+ *q++ = '\"';
+ *q = '\0';
+ commandw = get_wstring_from_mbstring(kpse->File_system_codepage,command2, commandw=NULL);
+ free (command2);
+ } else {
+ commandw = get_wstring_from_mbstring(kpse->File_system_codepage,command, commandw=NULL);
+ }
+ for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
+ f = _wpopen(commandw, modew);
+
+ if (f != NULL) {
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
+ DEBUGF_START ();
+ fprintf (stderr, "fsyscp_popen(%s [", command);
+ WriteConsoleW( GetStdHandle( STD_ERROR_HANDLE ), commandw, wcslen( commandw ), NULL, NULL );
+#if defined(_WIN64)
+ fprintf (stderr, "], %s) => 0x%I64x\n", mode, (unsigned __int64) f);
+#else
+ fprintf (stderr, "], %s) => 0x%lx\n", mode, (unsigned long) f);
+#endif
+ DEBUGF_END ();
+ }
+ }
+
+ free (commandw);
+/* We use always binary mode on Windows */
+ if(f) _setmode (fileno (f), _O_BINARY);
+
+ return f;
+}
+
+int
+kpathsea_get_command_line_args_utf8 (kpathsea kpse, const_string enc, int *p_ac, char ***p_av)
+{
+ int argc;
+ string *argv;
+
+ if (!enc || !strncmp(enc,"",1)) return 0;
+
+#ifdef DEBUG
+ fprintf(stderr, "command_line_encoding (%s)\n", enc);
+#endif /* DEBUG */
+ if (!(strncmp(enc,"utf8",5) && strncmp(enc,"utf-8",6))) {
+ LPWSTR *argvw;
+ INT argcw, i;
+ string s;
+#ifdef DEBUG
+ DWORD ret;
+ HANDLE hStderr;
+ hStderr = GetStdHandle( STD_ERROR_HANDLE );
+#endif /* DEBUG */
+ kpse->File_system_codepage = CP_UTF8;
+/*
+ IS_KANJI() in the CP932-like system seems to be necessary to
+ support non-ascii values for variables in the case of
+ command_line_encoding = utf-8.
+ kpse->Is_cp932_system = 0;
+*/
+ argvw = CommandLineToArgvW(GetCommandLineW(), &argcw);
+ argc = argcw;
+ argv = xmalloc(sizeof(char *)*(argcw+1));
+ for (i=0; i<argcw; i++) {
+ s = get_utf8_from_wstring(argvw[i], s=NULL);
+ argv[i] = s;
+#ifdef DEBUG
+ fprintf(stderr, "Commandline arguments %d:(%s) [", i, argv[i]);
+ WriteConsoleW( hStderr, argvw[i], wcslen(argvw[i]), &ret, NULL);
+ fprintf(stderr, "]\n");
+#endif /* DEBUG */
+ }
+ argv[argcw] = NULL;
+ *p_ac = argc;
+ *p_av = argv;
+ return kpse->File_system_codepage;
+ } else {
+ return 0;
+ }
+}
+
+/*
+ spawnvp by file system codepage
+*/
+int
+kpathsea_fsyscp_spawnvp (kpathsea kpse, int mode, const char *command, const char* const *argv)
+{
+ int ret;
+ wchar_t *commandw, **argvw, **pw;
+ int i;
+ const char* const *p;
+
+ assert(command && argv);
+ for (i = 0, p = argv; *p; p++)
+ i++;
+ argvw = xcalloc (i + 3, sizeof (wchar_t *));
+ commandw = get_wstring_from_mbstring(kpse->File_system_codepage, command, commandw=NULL);
+ p = argv;
+ pw = argvw;
+ while (*p) {
+ *pw = get_wstring_from_mbstring(kpse->File_system_codepage, *p, *pw=NULL);
+ p++;
+ pw++;
+ }
+ *pw = NULL;
+ ret = _wspawnvp (mode, (const wchar_t *)commandw, (const wchar_t* const*) argvw);
+ if(commandw) free(commandw);
+ if (argvw) {
+ pw = argvw;
+ while (*pw) {
+ free (*pw);
+ pw++;
+ }
+ free (argvw);
+ }
+
+ return ret;
+}
+
+/*
+ system by file system codepage
+*/
+int
+kpathsea_fsyscp_system (kpathsea kpse, const char *cmd)
+{
+ const char *p;
+ char *q;
+ char *av[4];
+ int len, ret;
+ int spacep = 0;
+
+ if (cmd == NULL)
+ return 1;
+
+ av[0] = xstrdup ("cmd.exe");
+ av[1] = xstrdup ("/c");
+
+ len = strlen (cmd) + 3;
+ spacep = is_include_space (cmd);
+ av[2] = xmalloc (len);
+ q = av[2];
+ if (spacep)
+ *q++ = '"';
+ for (p = cmd; *p; p++, q++) {
+ if (*p == '\'')
+ *q = '"';
+ else
+ *q = *p;
+ }
+ if (spacep)
+ *q++ = '"';
+ *q = '\0';
+ av[3] = NULL;
+ ret = kpathsea_fsyscp_spawnvp (kpse, _P_WAIT, av[0], (const char* const*) av);
+ free (av[0]);
+ free (av[1]);
+ free (av[2]);
+ return ret;
+}
+
+int
+kpathsea_win32_getc(kpathsea kpse, FILE *fp)
+{
+ const int fd = fileno(fp);
+ HANDLE hStdin;
+ DWORD ret;
+ wchar_t wc[3];
+ char mbc[5];
+ int j;
+
+ if (!(fd == fileno(stdin) && _isatty(fd) && kpse->File_system_codepage == CP_UTF8))
+ return getc(fp);
+
+ if (kpse->getc_len == 0)
+ {
+ hStdin = GetStdHandle(STD_INPUT_HANDLE);
+ if (kpse->wcbuf) {
+ wc[0] = kpse->wcbuf;
+ kpse->wcbuf = L'\0';
+ }
+ else if (ReadConsoleW(hStdin, wc, 1, &ret, NULL) == 0)
+ return EOF;
+ if (0xd800<=wc[0] && wc[0]<0xdc00) {
+ if (ReadConsoleW(hStdin, wc+1, 1, &ret, NULL) == 0)
+ return EOF;
+ if (0xdc00<=wc[1] && wc[1]<0xe000) {
+ wc[2]=L'\0';
+ } else {
+ kpse->wcbuf=wc[1];
+ wc[0]=0xfffd; /* illegal surrogate pair */
+ wc[1]=L'\0';
+ }
+ } else if (0xdc00<=wc[0] && wc[0]<0xe000) {
+ wc[0]=0xfffd; /* illegal surrogate pair */
+ wc[1]=L'\0';
+ } else {
+ wc[1]=L'\0';
+ }
+ get_utf8_from_wstring(wc,mbc);
+ j=strlen(mbc)-1;
+ while(j>=0) {
+ kpse->getc_buff[kpse->getc_len++]=(int)mbc[j--];
+ }
+ }
+ return kpse->getc_buff[--kpse->getc_len];
+}
+
+int
+kpathsea_win32_ungetc(kpathsea kpse, int c, FILE *fp)
+{
+ const int fd = fileno(fp);
+
+ if (!(fd == fileno(stdin) && _isatty(fd) && kpse->File_system_codepage == CP_UTF8))
+ return ungetc(c, fp);
+
+ assert(kpse->getc_len < 4);
+ return kpse->getc_buff[kpse->getc_len++] = c;
+}
+
+static int __win32_fputs(const char *str, HANDLE hStdout)
+{
+ DWORD ret;
+ wchar_t *wstr;
+
+ wstr = get_wstring_from_utf8(str, wstr=NULL);
+
+ if (WriteConsoleW(hStdout, wstr, wcslen(wstr), &ret, NULL) == 0) {
+ free(wstr);
+ return EOF;
+ }
+
+ free(wstr);
+ return ret;
+}
+
+int
+kpathsea_win32_fputs(kpathsea kpse, const char *str, FILE *fp)
+{
+ const int fd = fileno(fp);
+ HANDLE hStdout;
+
+ if (!((fd == fileno(stdout) || fd == fileno(stderr)) && _isatty(fd)
+ && kpse->File_system_codepage == CP_UTF8))
+ return fputs(str, fp);
+
+ hStdout = (fd == fileno(stdout)) ?
+ GetStdHandle(STD_OUTPUT_HANDLE) : GetStdHandle(STD_ERROR_HANDLE);
+
+ return __win32_fputs(str, hStdout);
+}
+
+#define MAX_PROMPT_STR_SIZE 8192
+
+int
+kpathsea_win32_vfprintf(kpathsea kpse, FILE *fp, const char *format, va_list argp)
+{
+ const int fd = fileno(fp);
+ HANDLE hStdout;
+ char buff[MAX_PROMPT_STR_SIZE];
+ int ret;
+
+ if (!((fd == fileno(stdout) || fd == fileno(stderr)) && _isatty(fd)
+ && kpse->File_system_codepage == CP_UTF8))
+ return vfprintf(fp, format, argp);
+
+ hStdout = (fd == fileno(stdout)) ?
+ GetStdHandle(STD_OUTPUT_HANDLE) : GetStdHandle(STD_ERROR_HANDLE);
+
+ ret = _vsnprintf(buff, sizeof(buff), format, argp);
+ if (__win32_fputs(buff, hStdout)==EOF) {
+ return EOF;
+ }
+ return ret;
+}
+
+int
+kpathsea_win32_fprintf(kpathsea kpse, FILE *fp, const char *format, ...)
+{
+ int ret, count;
+ va_list argp;
+
+ count = 0;
+ va_start(argp, format);
+ ret = kpathsea_win32_vfprintf(kpse, fp, format, argp);
+ if (ret==EOF) {
+ return EOF;
+ }
+ count += ret;
+ va_end(argp);
+ return count;
+}
+
+int
+kpathsea_win32_puts(kpathsea kpse, const char *str)
+{
+ if (kpathsea_win32_fputs(kpse, str, stdout)==EOF) {
+ return EOF;
+ }
+ return puts("");
+}
+
+int
+kpathsea_win32_putc(kpathsea kpse, int c, FILE *fp)
+{
+ const int fd = fileno(fp);
+ HANDLE hStdout;
+ DWORD ret;
+ wchar_t wstr[3];
+
+ if (!((fd == fileno(stdout) || fd == fileno(stderr)) && _isatty(fd)
+ && kpse->File_system_codepage == CP_UTF8))
+ return putc(c, fp);
+
+ hStdout = (fd == fileno(stdout)) ?
+ GetStdHandle(STD_OUTPUT_HANDLE) : GetStdHandle(STD_ERROR_HANDLE);
+
+ c &= 0xff;
+
+ if (c < 0x80) {
+ kpse->st_str = kpse->st_buff;
+ kpse->st_len = 1;
+ }
+ if (c < 0xc0) { /* ASCII or trailer */
+ *(kpse->st_str)++ = c;
+ kpse->st_len--;
+ if (kpse->st_len == 0) {
+ *(kpse->st_str) = '\0';
+ get_wstring_from_utf8(kpse->st_buff, wstr);
+ if (WriteConsoleW(hStdout, wstr, wcslen(wstr), &ret, NULL) == 0) {
+ kpse->st_len = 0;
+ return EOF;
+ }
+ }
+ else if (kpse->st_len < 0) return EOF;
+ return c;
+ }
+ else if (c < 0xc2) { kpse->st_len = 0; return EOF; } /* illegal */
+ else if (c < 0xe0) kpse->st_len = 2;
+ else if (c < 0xf0) kpse->st_len = 3;
+ else if (c < 0xf5) kpse->st_len = 4;
+ else { kpse->st_len = 0; return EOF; }
+
+ kpse->st_str = kpse->st_buff;
+ *(kpse->st_str)++ = c;
+ kpse->st_len--;
+ return c;
+}
+
+void
+kpathsea_win32_perror(kpathsea kpse, const char *str)
+{
+ wchar_t *wstr;
+
+ if (kpse->File_system_codepage != CP_UTF8)
+ return perror(str);
+
+ wstr = get_wstring_from_utf8(str, wstr=NULL);
+ _wperror(wstr);
+ free(wstr);
+}
+
+int
+kpathsea_IS_KANJI(kpathsea kpse, const char *p)
+{
+ int ret;
+
+ ret = kpse->Is_cp932_system && kpathsea_isknj(kpse, *(p)) &&
+ kpathsea_isknj2(kpse, *(p+1));
+ return ret;
+}
+
+char *
+kpathsea_get_fsyscp_from_wstring(kpathsea kpse, const wchar_t *w,char *mb)
+{
+ return get_mbstring_from_wstring(kpse->File_system_codepage, w, mb);
+}
+
+wchar_t *
+kpathsea_get_wstring_from_fsyscp(kpathsea kpse, const char *mb,wchar_t *w)
+{
+ return get_wstring_from_mbstring(kpse->File_system_codepage, mb, w);
+}
+
+#if defined (KPSE_COMPAT_API)
+
+int
+isknj(int c)
+{
+ return kpathsea_isknj(kpse_def, c);
+}
+
+int
+isknj2(int c)
+{
+ return kpathsea_isknj2(kpse_def, c);
+}
+
+FILE *
+fsyscp_xfopen (const char *filename, const char *mode)
+{
+ return kpathsea_fsyscp_xfopen (kpse_def, filename, mode);
+}
+
+FILE *
+fsyscp_fopen (const char *filename, const char *mode)
+{
+ return kpathsea_fsyscp_fopen (kpse_def, filename, mode);
+}
+
+FILE *
+fsyscp_popen (const char *command, const char *mode)
+{
+ return kpathsea_fsyscp_popen (kpse_def, command, mode);
+}
+
+int
+get_command_line_args_utf8 (const_string enc, int *p_ac, char ***p_av)
+{
+ return kpathsea_get_command_line_args_utf8 (kpse_def, enc, p_ac, p_av);
+}
+
+int
+fsyscp_spawnvp (int mode, const char *command, const char* const *argv)
+{
+ return kpathsea_fsyscp_spawnvp (kpse_def, mode, command, argv);
+}
+
+int
+fsyscp_system (const char *cmd)
+{
+ return kpathsea_fsyscp_system (kpse_def, cmd);
+}
+
+int
+win32_getc(FILE *fp)
+{
+ return kpathsea_win32_getc(kpse_def, fp);
+}
+
+int
+win32_ungetc(int c, FILE *fp)
+{
+ return kpathsea_win32_ungetc(kpse_def, c, fp);
+}
+
+int
+win32_fputs(const char *str, FILE *fp)
+{
+ return kpathsea_win32_fputs(kpse_def, str, fp);
+}
+
+int
+win32_vfprintf(FILE *fp, const char *format, va_list argp)
+{
+ return kpathsea_win32_vfprintf(kpse_def, fp, format, argp);
+}
+
+int
+win32_fprintf(FILE *fp, const char *format, ...)
+{
+ int ret, count;
+ va_list argp;
+
+ count = 0;
+ va_start(argp, format);
+ ret = kpathsea_win32_vfprintf(kpse_def, fp, format, argp);
+ if (ret==EOF) {
+ return EOF;
+ }
+ count += ret;
+ va_end(argp);
+ return count;
+}
+
+int
+win32_puts(const char *str)
+{
+ return kpathsea_win32_puts(kpse_def, str);
+}
+
+int
+win32_putc(int c, FILE *fp)
+{
+ return kpathsea_win32_putc(kpse_def, c, fp);
+}
+
+void
+win32_perror(const char *str)
+{
+ kpathsea_win32_perror(kpse_def, str);
+}
+
+int
+IS_KANJI(const char *p)
+{
+ return kpathsea_IS_KANJI(kpse_def, p);
+}
+
+char *
+get_fsyscp_from_wstring(const wchar_t *w,char *mb)
+{
+ return kpathsea_get_fsyscp_from_wstring(kpse_def, w, mb);
+}
+
+wchar_t *
+get_wstring_from_fsyscp(const char *mb,wchar_t *w)
+{
+ return kpathsea_get_wstring_from_fsyscp(kpse_def, mb, w);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/knj.h b/Build/source/texk/kpathsea/knj.h
new file mode 100644
index 00000000000..81e7944feb1
--- /dev/null
+++ b/Build/source/texk/kpathsea/knj.h
@@ -0,0 +1,82 @@
+/* knj.h: check for 2-Byte Kanji (CP 932, SJIS) codes.
+
+ Copyright 2010, 2014, 2016 Akira Kakuto.
+ Copyright 2013, 2014, 2020 TANAKA Takuji.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_KNJ_H
+#define KPATHSEA_KNJ_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern KPSEDLL wchar_t* get_wstring_from_mbstring(int cp, const char *mbstr, wchar_t *wstr);
+extern KPSEDLL char* get_mbstring_from_wstring(int cp, const wchar_t *wstr, char *mbstr);
+extern KPSEDLL int kpathsea_isknj(kpathsea kpse, int c);
+extern KPSEDLL int kpathsea_isknj2(kpathsea kpse, int c);
+extern KPSEDLL FILE* kpathsea_fsyscp_xfopen(kpathsea kpse, const char *filename, const char *mode);
+extern KPSEDLL FILE* kpathsea_fsyscp_fopen(kpathsea kpse, const char *filename, const char *mode);
+extern KPSEDLL FILE* kpathsea_fsyscp_popen(kpathsea kpse, const char *command, const char *mode);
+extern KPSEDLL int kpathsea_fsyscp_spawnvp(kpathsea kpse, int mode, const char *command, const char* const *argv);
+extern KPSEDLL int kpathsea_fsyscp_system(kpathsea kpse, const char *cmd);
+extern KPSEDLL int kpathsea_get_command_line_args_utf8(kpathsea kpse, const char *enc, int *p_ac, char ***p_av);
+extern KPSEDLL int kpathsea_win32_getc(kpathsea kpse, FILE *fp);
+extern KPSEDLL int kpathsea_win32_ungetc(kpathsea kpse, int c, FILE *fp);
+extern KPSEDLL int kpathsea_win32_fputs(kpathsea kpse, const char *str, FILE *fp);
+extern KPSEDLL int kpathsea_win32_puts(kpathsea kpse, const char *str);
+extern KPSEDLL int kpathsea_win32_vfprintf(kpathsea kpse, FILE *fp, const char *format, va_list argp);
+extern KPSEDLL int kpathsea_win32_fprintf(kpathsea kpse, FILE *fp, const char *format, ...);
+extern KPSEDLL int kpathsea_win32_putc(kpathsea kpse, int c, FILE *fp);
+extern KPSEDLL void kpathsea_win32_perror(kpathsea kpse, const char *str);
+extern KPSEDLL int kpathsea_IS_KANJI(kpathsea kpse, const char *p);
+extern KPSEDLL char *kpathsea_get_fsyscp_from_wstring(kpathsea kpse, const wchar_t *w,char *mb);
+extern KPSEDLL wchar_t *kpathsea_get_wstring_from_fsyscp(kpathsea kpse, const char *mb,wchar_t *w);
+
+#if defined (KPSE_COMPAT_API)
+#define is_cp932_system kpse_def->Is_cp932_system
+#define file_system_codepage kpse_def->File_system_codepage
+#define win32_codepage kpse_def->Win32_codepage
+
+extern KPSEDLL int isknj(int c);
+extern KPSEDLL int isknj2(int c);
+extern KPSEDLL FILE* fsyscp_xfopen(const char *filename, const char *mode);
+extern KPSEDLL FILE* fsyscp_fopen(const char *filename, const char *mode);
+extern KPSEDLL FILE* fsyscp_popen(const char *command, const char *mode);
+extern KPSEDLL int fsyscp_spawnvp(int mode, const char *command, const char* const *argv);
+extern KPSEDLL int fsyscp_system(const char *cmd);
+extern KPSEDLL int get_command_line_args_utf8(const char *enc, int *p_ac, char ***p_av);
+extern KPSEDLL int win32_getc(FILE *fp);
+extern KPSEDLL int win32_ungetc(int c, FILE *fp);
+extern KPSEDLL int win32_fputs(const char *str, FILE *fp);
+extern KPSEDLL int win32_puts(const char *str);
+extern KPSEDLL int win32_vfprintf(FILE *fp, const char *format, va_list argp);
+extern KPSEDLL int win32_fprintf(FILE *fp, const char *format, ...);
+extern KPSEDLL int win32_putc(int c, FILE *fp);
+extern KPSEDLL void win32_perror(const char *str);
+extern KPSEDLL int IS_KANJI(const char *p);
+extern KPSEDLL char *get_fsyscp_from_wstring(const wchar_t *w,char *mb);
+extern KPSEDLL wchar_t *get_wstring_from_fsyscp(const char *mb,wchar_t *w);
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+/* Get wide string from multibyte string in UTF-8 */
+#define get_wstring_from_utf8(mb,w) get_wstring_from_mbstring(CP_UTF8,mb,w)
+/* Get multibyte string in UTF-8 from wide string */
+#define get_utf8_from_wstring(w,mb) get_mbstring_from_wstring(CP_UTF8,w,mb)
+
+#endif /* not KPATHSEA_KNJ_H */
diff --git a/Build/source/texk/kpathsea/kpathsea.c b/Build/source/texk/kpathsea/kpathsea.c
new file mode 100644
index 00000000000..b7bf6964ac2
--- /dev/null
+++ b/Build/source/texk/kpathsea/kpathsea.c
@@ -0,0 +1,138 @@
+/* kpathsea.c: creating and freeing library instances
+
+ Copyright 2009, 2012 Taco Hoekwater.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+/* One big global struct, and a variable that points to it */
+
+/*
+ * The code freeing the strings used in this struct is enabled/disabled
+ * by KPATHSEA_CAN_FREE.
+ */
+
+#include <kpathsea/config.h>
+
+kpathsea
+kpathsea_new (void)
+{
+ kpathsea ret;
+ ret = xcalloc(1, sizeof(kpathsea_instance));
+ return ret;
+}
+
+#if KPATHSEA_CAN_FREE
+
+#define string_free(a) if ((a) != NULL) free((char *)(a))
+
+static void
+str_llist_free (str_llist_type p)
+{
+ str_llist_type q;
+ while (p != NULL) {
+ q = p->next;
+ free (p->str);
+ free (p);
+ p = q;
+ }
+}
+
+static void
+cache_free (cache_entry *the_cache, int cache_size)
+{
+ int f ;
+ for (f = 0; f < cache_size; f++) {
+ string_free (the_cache[f].key);
+ str_llist_free (the_cache[f].value[0]);
+ }
+ free (the_cache);
+}
+#endif /* KPATHSEA_CAN_FREE */
+
+/* Sadly, quite a lot of the freeing is not safe:
+ it seems there are literals used all over. */
+void
+kpathsea_finish (kpathsea kpse)
+{
+#if KPATHSEA_CAN_FREE
+ int i;
+ kpse_format_info_type f;
+#endif /* KPATHSEA_CAN_FREE */
+ if (kpse==NULL)
+ return;
+#if KPATHSEA_CAN_FREE
+ /* free internal stuff */
+ hash_free (kpse->cnf_hash);
+ hash_free (kpse->db);
+ hash_free (kpse->alias_db);
+ str_list_free (&kpse->db_dir_list);
+ hash_free (kpse->link_table);
+ cache_free (kpse->the_cache, kpse->cache_length);
+ hash_free (kpse->map);
+ string_free (kpse->map_path);
+ string_free (kpse->elt);
+ /*string_free (kpse->path);*/
+ if (kpse->log_file != (FILE *)NULL)
+ fclose(kpse->log_file);
+ string_free (kpse->invocation_name);
+ string_free (kpse->invocation_short_name);
+ string_free (kpse->program_name);
+ string_free (kpse->fallback_font);
+ string_free (kpse->fallback_resolutions_string);
+ if(kpse->fallback_resolutions != NULL)
+ free(kpse->fallback_resolutions);
+ for (i = 0; i != kpse_last_format; ++i) {
+ f = kpse->format_info[i];
+ string_free (f.path);
+ string_free (f.override_path);
+ string_free (f.client_path);
+ /*string_free (f.cnf_path);*/
+ }
+
+ if (kpse->missfont != (FILE *)NULL)
+ fclose (kpse->missfont);
+
+ for (i = 0; i < (int)kpse->expansion_len; i++) {
+ string_free (kpse->expansions[i].var);
+ }
+ free (kpse->expansions);
+ if (kpse->saved_env != NULL) {
+ for (i = 0; i != kpse->saved_count; ++i)
+ string_free (kpse->saved_env[i]);
+ free (kpse->saved_env);
+ }
+#endif /* KPATHSEA_CAN_FREE */
+#if defined(WIN32) || defined(__CYGWIN__)
+ if (kpse->suffixlist != NULL) {
+ char **p;
+ for (p = kpse->suffixlist; *p; p++)
+ free (*p);
+ free (kpse->suffixlist);
+ kpse->suffixlist = NULL;
+ }
+#endif /* WIN32 || __CYGWIN__ */
+#if defined (KPSE_COMPAT_API)
+ if (kpse == kpse_def)
+ return;
+#endif
+ free (kpse);
+}
+
+
+#if defined (KPSE_COMPAT_API)
+
+kpathsea_instance kpse_def_inst;
+kpathsea kpse_def = &kpse_def_inst;
+
+#endif /* KPSE_COMPAT_API */
diff --git a/Build/source/texk/kpathsea/kpathsea.pc.in b/Build/source/texk/kpathsea/kpathsea.pc.in
new file mode 100644
index 00000000000..865f5408ab5
--- /dev/null
+++ b/Build/source/texk/kpathsea/kpathsea.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: kpathsea
+Description: Kpathsea filename lookup library
+Version: @KPSEVERSION@
+Libs: -L${libdir} -lkpathsea
+Cflags: -I${includedir}
+
diff --git a/Build/source/texk/kpathsea/kpsestat.c b/Build/source/texk/kpathsea/kpsestat.c
new file mode 100644
index 00000000000..1c457dc06c7
--- /dev/null
+++ b/Build/source/texk/kpathsea/kpsestat.c
@@ -0,0 +1,126 @@
+/* kpsestat -- show file permissions of a file in octal form.
+
+ Copyright 2008, 2016 Karl Berry.
+ Copyright 1997, 2000, 2001, 2005 Olaf Weber.
+
+ This program is free software; you can 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this software; if not, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+/*
+ * kpsestat mode x
+ * Print stat bits of file x on stdout, as modified by mode.
+ */
+
+int
+main (int argc, char **argv)
+{
+ char * mode_string;
+ int to_set, to_keep, to_clear;
+ int result;
+ struct stat f;
+
+ if (argc > 1 && strcmp (argv[1], "--help") == 0) {
+ printf ("Usage: %s MODE FILE\n\
+ Print octal permissions of FILE as modified by MODE on standard output.\n\
+ MODE is a subset of the symbolic permissions accepted by chmod.\n\
+ Use MODE = to obtain the unchanged permissions.\n\
+\n\
+--help display this help and exit\n\
+--version output version information and exit\n\n", argv[0]);
+ fputs ("Email bug reports to tex-k@tug.org.\n", stdout);
+ exit(0);
+ } else if (argc > 1 && strcmp (argv[1], "--version") == 0) {
+ printf ("%s (%s)\n\
+Copyright (C) 1997 Olaf Weber.\n\
+There is NO warranty. You may redistribute this software\n\
+under the terms of the GNU General Public License.\n\
+For more information about these matters, see the file named GPL.\n\
+Primary author of %s: Olaf Weber.\n",
+argv[0], KPSEVERSION, argv[0]);
+ exit (0);
+ }
+
+ /* insist on exactly two args */
+ if (argc != 3) {
+ fprintf (stderr, "%s: Need exactly two arguments.\n\
+Try `%s --help' for more information.\n", argv[0], argv[0]);
+ exit(1);
+ }
+
+ mode_string = argv[1];
+ to_set = to_keep = to_clear = 0;
+ for (;;++mode_string) {
+ int affected = 0;
+ int action = 0;
+ int value = 0;
+
+ for (;;++mode_string)
+ switch (*mode_string) {
+ case 'u': affected |= 04700; break;
+ case 'g': affected |= 02070; break;
+ case 'o': affected |= 01007; break;
+ case 'a': affected |= 07777; break;
+ default: goto no_more_affected;
+ }
+ no_more_affected:
+ if (affected == 0)
+ affected = 07777;
+ action = *mode_string;
+ ++mode_string;
+ for (;;++mode_string)
+ switch (*mode_string) {
+ case 'r': value |= 00444 & affected; break;
+ case 'w': value |= 00222 & affected; break;
+ case 'x': value |= 00111 & affected; break;
+ case 's': value |= 06000 & affected; break;
+ case 't': value |= 01000 & affected; break;
+ default: goto no_more_values;
+ }
+ no_more_values:
+ switch (action) {
+ case '-': to_clear |= value; break;
+ case '=': to_keep |= value; break;
+ case '+': to_set |= value; break;
+ default:
+ fprintf(stderr, "%s: Invalid mode\n", argv[0]);
+ exit(1);
+ }
+ if (*mode_string != ',')
+ break;
+ }
+ if (*mode_string != 0) {
+ fprintf(stderr, "%s: Invalid mode.\n", argv[0]);
+ exit(1);
+ }
+
+ /* does the file exist? */
+ if (stat (argv[2], &f) < 0) {
+ fprintf(stderr, "%s: ", argv[0]);
+ perror(argv[2]);
+ return 1;
+ }
+
+ result = f.st_mode & 07777;
+ result |= to_set;
+ result |= to_keep & result;
+ result &= ~to_clear;
+
+ printf("%o\n", result);
+
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c
new file mode 100644
index 00000000000..76f956a2480
--- /dev/null
+++ b/Build/source/texk/kpathsea/kpsewhich.c
@@ -0,0 +1,941 @@
+/* kpsewhich -- standalone path lookup and variable expansion for Kpathsea.
+ Ideas from Thomas Esser, Pierre MacKay, and many others.
+
+ Copyright 1995-2021 Karl Berry & Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-ctype.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/cnf.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/getopt.h>
+#include <kpathsea/line.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/proginit.h>
+#include <kpathsea/str-list.h>
+#include <kpathsea/tex-file.h>
+#include <kpathsea/tex-glyph.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/version.h>
+
+/* For variable and path expansion. (-expand-var, -expand-path,
+ -show-path, etc.) */
+string var_to_expand = NULL;
+string braces_to_expand = NULL;
+string path_to_expand = NULL;
+string path_to_show = NULL;
+string var_to_value = NULL;
+string var_to_brace_value = NULL;
+
+/* Array/count of cnf lines from the command line. (--cnf-line) */
+static string *user_cnf_lines = NULL;
+static unsigned user_cnf_nlines = 0;
+
+/* Base resolution. (-D, -dpi) */
+unsigned dpi = 600;
+
+/* The engine name, for `$engine' construct in texmf.cnf. (-engine) */
+string engine = NULL;
+
+/* Interactively ask for names to look up? (-interactive) */
+boolean interactive = false;
+
+/* The device name, for $MAKETEX_MODE. (-mode) */
+string mode = NULL;
+
+/* Search the disk as well as ls-R? (-must-exist, -mktex) */
+boolean must_exist = false;
+
+/* The program name, for `.PROG' construct in texmf.cnf. (-program) */
+string progname = NULL;
+
+/* Safe input and output names to check. (-safe-in-name and -safe-out-name) */
+string safe_in_name = NULL;
+string safe_out_name = NULL;
+
+/* Return all matches, not just the first one? (-all) */
+boolean show_all = false;
+
+/* Only match files in given subdirs. (-subdir) */
+str_list_type subdir_paths;
+
+/* The file type and path for lookups. (-format, -path) */
+kpse_file_format_type user_format = kpse_last_format;
+string user_format_string;
+string user_path;
+
+
+
+/* Define one-word abbreviations for those format types which
+ can otherwise only be specified by strings containing spaces. */
+
+typedef struct
+{
+ const_string abbr;
+ kpse_file_format_type format;
+} format_abbr_type;
+
+static format_abbr_type format_abbrs[]
+ = { { "bitmapfont", kpse_any_glyph_format },
+ { "mpsupport", kpse_mpsupport_format },
+ { "doc", kpse_texdoc_format },
+ { "source", kpse_texsource_format },
+ { "trofffont", kpse_troff_font_format },
+ { "dvipsconfig", kpse_dvips_config_format },
+ { "web2c", kpse_web2c_format },
+ { "othertext", kpse_program_text_format },
+ { "otherbin", kpse_program_binary_format },
+ { "miscfont", kpse_miscfonts_format },
+ { "cmap", kpse_cmap_format },
+ { "pdftexconfig", kpse_pdftex_config_format },
+ { NULL, kpse_last_format } };
+
+/* The function to look up STR in the abbr table above.
+ This is called only on a user-specified format string.
+ Return `kpse_last_format' if no match. */
+
+static kpse_file_format_type
+format_abbr (const_string str)
+{
+ kpse_file_format_type ret = kpse_last_format;
+ unsigned a = 0;
+
+ while (format_abbrs[a].abbr != NULL) {
+ if (STREQ (str, format_abbrs[a].abbr)) {
+ ret = format_abbrs[a].format;
+ break;
+ }
+ a++;
+ }
+
+ return ret;
+}
+
+
+
+/* Return the <number> substring in `<name>.<number><stuff>', if S has
+ that form. If it doesn't, return 0. */
+
+static unsigned
+find_dpi (string s)
+{
+ unsigned dpi_number = 0;
+ const_string extension = find_suffix (s);
+
+ if (extension != NULL)
+ sscanf (extension, "%u", &dpi_number);
+
+ return dpi_number;
+}
+
+
+
+/* Return true if FTRY (the candidate suffix) matches NAME. If
+ IS_FILENAME is true, the check is simply that FTRY is a suffix of
+ NAME. If false (that is, NAME is a format), then FTRY and NAME must
+ be entirely equal. */
+
+static boolean
+try_suffix (boolean is_filename, string name, unsigned name_len,
+ const_string ftry)
+{
+ unsigned try_len;
+
+ if (!ftry || ! *ftry) {
+ return false;
+ }
+
+ try_len = strlen (ftry);
+ if (try_len > name_len) {
+ /* Candidate is longer than what we're looking for. */
+ return false;
+ }
+ if (!is_filename && try_len < name_len) {
+ /* We're doing format names, not file names, and candidate is
+ shorter than what we're looking for. E.g., do not find `lua'
+ when looking for `clua'. */
+ return false;
+ }
+
+ if (FILESTRCASEEQ (name + name_len - try_len, ftry)) {
+ return true;
+ }
+
+ return false;
+}
+
+
+
+/* Use the file type from -format if that was previously determined
+ (i.e., the user_format global variable), else guess dynamically from
+ NAME. Return kpse_last_format if undeterminable. This function is
+ also used to parse the -format string, a case we distinguish via
+ is_filename being false.
+
+ A few filenames have been hard-coded for format types that
+ differ from what would be inferred from their extensions. */
+
+static kpse_file_format_type
+find_format (kpathsea kpse, string name, boolean is_filename)
+{
+ kpse_file_format_type ret = kpse_last_format;
+
+ if (is_filename && user_format != kpse_last_format) {
+ ret = user_format; /* just return what we already computed */
+
+ } else if (FILESTRCASEEQ (name, "config.ps")) {
+ ret = kpse_dvips_config_format;
+ } else if (FILESTRCASEEQ (name, "fmtutil.cnf")) {
+ ret = kpse_web2c_format;
+ } else if (FILESTRCASEEQ (name, "glyphlist.txt")) {
+ ret = kpse_fontmap_format;
+ } else if (FILESTRCASEEQ (name, "mktex.cnf")) {
+ ret = kpse_web2c_format;
+ } else if (FILESTRCASEEQ (name, "pdfglyphlist.txt")) {
+ ret = kpse_fontmap_format;
+ } else if (FILESTRCASEEQ (name, "pdftex.cfg")) {
+ ret = kpse_pdftex_config_format;
+ } else if (FILESTRCASEEQ (name, "texglyphlist.txt")) {
+ ret = kpse_fontmap_format;
+ } else if (FILESTRCASEEQ (name, "texmf.cnf")) {
+ ret = kpse_cnf_format;
+ } else if (FILESTRCASEEQ (name, "updmap.cfg")) {
+ ret = kpse_web2c_format;
+ } else if (FILESTRCASEEQ (name, "XDvi")) {
+ ret = kpse_program_text_format;
+ } else {
+ if (!is_filename) {
+ /* Look for kpsewhich-specific format abbreviations. */
+ ret = format_abbr (name);
+ }
+
+ if (ret == kpse_last_format) {
+ int f = 0; /* kpse_file_format_type */
+ unsigned name_len = strlen (name);
+
+ while (f != kpse_last_format) {
+ const_string *ext;
+ const_string ftry;
+ boolean found = false;
+
+ if (!kpse->format_info[f].type)
+ kpathsea_init_format (kpse, (kpse_file_format_type) f);
+
+/* Just to abbreviate this lengthy call. */
+#define TRY_SUFFIX(ftry) try_suffix (is_filename, name, name_len, (ftry))
+
+ if (!is_filename) {
+ /* Allow the long name, but only in the format options. We don't
+ want a filename confused with a format name. */
+ ftry = kpse->format_info[f].type;
+ found = TRY_SUFFIX (ftry);
+ }
+ for (ext = kpse->format_info[f].suffix; !found && ext && *ext; ext++) {
+ found = TRY_SUFFIX (*ext);
+ }
+ for (ext=kpse->format_info[f].alt_suffix; !found && ext && *ext;ext++){
+ found = TRY_SUFFIX (*ext);
+ }
+
+ if (found)
+ break;
+ f++;
+ }
+ ret = f;
+ }
+ }
+ return ret;
+}
+
+
+
+/* Return newly-allocated NULL-terminated list of strings from MATCHES
+ that are prefixed with any of the subdirectories in SUBDIRS. That
+ is, for a string S in MATCHES, its dirname must end with one of the
+ elements in SUBDIRS. For instance, if subdir=foo/bar, that will
+ match a string foo/bar/baz or /some/texmf/foo/bar/baz.
+
+ We don't reallocate the actual strings, just the list elements.
+ Perhaps later we will implement wildcards or // or something. */
+
+#if defined(WIN32)
+static string *
+kpathsea_subdir_match (kpathsea kpse, str_list_type subdirs, string *matches)
+{
+ string *ret = XTALLOC1 (string);
+ unsigned len = 1;
+ unsigned e;
+ unsigned m;
+ string p;
+
+ for (e = 0; e < STR_LIST_LENGTH (subdirs); e++) {
+ for (p = STR_LIST_ELT (subdirs, e); *p; p++) {
+ if (*p == '\\')
+ *p = '/';
+ else if (kpathsea_IS_KANJI(kpse, p))
+ p++;
+ }
+ }
+
+ for (m = 0; matches[m]; m++) {
+ unsigned loc;
+ string s = xstrdup (matches[m]);
+ for (loc = strlen (s); loc > 0 && !IS_DIR_SEP_CH (s[loc-1]); loc--)
+ ;
+ while (loc > 0 && IS_DIR_SEP_CH (s[loc-1])) {
+ loc--;
+ }
+ s[loc] = 0; /* wipe out basename */
+
+ for (e = 0; e < STR_LIST_LENGTH (subdirs); e++) {
+ string subdir = STR_LIST_ELT (subdirs, e);
+ unsigned subdir_len = strlen (subdir);
+ while (subdir_len > 0 && IS_DIR_SEP_CH (subdir[subdir_len-1])) {
+ subdir_len--;
+ subdir[subdir_len] = 0; /* remove trailing slashes from subdir spec */
+ }
+ if (FILESTRCASEEQ (subdir, s + loc - subdir_len)) {
+ /* matched, save this one. */
+ XRETALLOC (ret, len + 1, string);
+ ret[len-1] = matches[m];
+ len++;
+ }
+ }
+ free (s);
+ }
+ ret[len-1] = NULL;
+ return ret;
+}
+
+#else /* WIN32 */
+static string *
+subdir_match (str_list_type subdirs, string *matches)
+{
+ string *ret = XTALLOC1 (string);
+ unsigned len = 1;
+ unsigned e;
+ unsigned m;
+
+ for (m = 0; matches[m]; m++) {
+ unsigned loc;
+ string s = xstrdup (matches[m]);
+ for (loc = strlen (s); loc > 0 && !IS_DIR_SEP_CH (s[loc-1]); loc--)
+ ;
+ while (loc > 0 && IS_DIR_SEP_CH (s[loc-1])) {
+ loc--;
+ }
+ s[loc] = 0; /* wipe out basename */
+
+ for (e = 0; e < STR_LIST_LENGTH (subdirs); e++) {
+ string subdir = STR_LIST_ELT (subdirs, e);
+ unsigned subdir_len = strlen (subdir);
+ while (subdir_len > 0 && IS_DIR_SEP_CH (subdir[subdir_len-1])) {
+ subdir_len--;
+ subdir[subdir_len] = 0; /* remove trailing slashes from subdir spec */
+ }
+ if (FILESTRCASEEQ (subdir, s + loc - subdir_len)) {
+ /* matched, save this one. */
+ XRETALLOC (ret, len + 1, string);
+ ret[len-1] = matches[m];
+ len++;
+ }
+ }
+ free (s);
+ }
+ ret[len-1] = NULL;
+ return ret;
+}
+#endif /* WIN32 */
+
+
+/* Look up a single filename NAME, filtering by given subdirectories if
+ -subdir was specified. Print all matches if global `show_all' is
+ true, else just the first match. Return 0 if success, 1 if failure. */
+
+static unsigned
+lookup (kpathsea kpse, string name)
+{
+ int i;
+ string ret = NULL;
+ string *ret_list = NULL;
+
+ if (user_path) {
+ /* Translate ; to : if that's our ENV_SEP. See cnf.c. */
+ if (IS_ENV_SEP (':')) {
+ string loc;
+ for (loc = user_path; *loc; loc++) {
+ if (*loc == ';')
+ *loc = ':';
+ }
+ }
+ user_path = kpathsea_path_expand (kpse, user_path);
+ if (show_all) {
+ ret_list = kpathsea_all_path_search (kpse, user_path, name);
+ } else {
+ ret = kpathsea_path_search (kpse, user_path, name, must_exist);
+ }
+
+ } else {
+ /* No user-specified search path, check user format or guess from NAME. */
+ kpse_file_format_type fmt = find_format (kpse, name, true);
+
+ switch (fmt) {
+ case kpse_pk_format:
+ case kpse_gf_format:
+ case kpse_any_glyph_format:
+ {
+ kpse_glyph_file_type glyph_ret;
+ string temp = remove_suffix (name);
+ /* Try to extract the resolution from the name. */
+ unsigned local_dpi = find_dpi (name);
+ if (!local_dpi)
+ local_dpi = dpi;
+ if (show_all) {
+ /* Because the whole glyph lookup thing is too complicated
+ to try all the alternatives (cmr10.600pk vs.
+ dpi600/cmr10.pk, just for starters). Patches welcome :). */
+ WARNING1 ("kpsewhich: Ignoring --all for bitmap font, sorry: %s",
+ name);
+ }
+ ret = kpathsea_find_glyph (kpse, temp,
+ local_dpi, fmt, &glyph_ret);
+ if (temp != name)
+ free (temp);
+ }
+ break;
+
+ case kpse_last_format:
+ /* If the suffix isn't recognized, assume it's a tex file. */
+ fmt = kpse_tex_format;
+ /* fall through */
+
+ default:
+ if (show_all) {
+ ret_list = kpathsea_find_file_generic (kpse, name, fmt,
+ must_exist, true);
+ } else {
+ ret = kpathsea_find_file (kpse, name, fmt, must_exist);
+ }
+ }
+ }
+
+ /* Turn single return into a null-terminated list for uniform treatment. */
+ if (ret) {
+ ret_list = XTALLOC (2, string);
+ ret_list[0] = ret;
+ ret_list[1] = NULL;
+ }
+
+ /* Filter by subdirectories, if specified. */
+ if (!STR_LIST_EMPTY (subdir_paths)) {
+#if defined(WIN32)
+ string *new_list = kpathsea_subdir_match (kpse, subdir_paths, ret_list);
+#else
+ string *new_list = subdir_match (subdir_paths, ret_list);
+#endif /* WIN32 */
+ free (ret_list);
+ ret_list = new_list;
+ }
+
+ /* Print output. */
+ if (ret_list) {
+ for (i = 0; ret_list[i]; i++)
+#ifdef WIN32
+ kpathsea_win32_puts (kpse, ret_list[i]);
+#else
+ puts (ret_list[i]);
+#endif
+ /* Save whether we found anything */
+ ret = ret_list[0];
+ free (ret_list);
+ }
+
+ return ret == NULL;
+}
+
+/* Help message. */
+
+#define USAGE "\n\
+Standalone path lookup and expansion for the Kpathsea library.\n\
+The default is to look up each FILENAME in turn and report its\n\
+first match (if any) to standard output.\n\
+\n\
+When looking up format (.fmt/.base/.mem) files, it is usually necessary\n\
+to also use -engine, or nothing will be returned; in particular,\n\
+-engine=/ will return matching format files for any engine.\n\
+\n\
+-all output all matches, one per line (no effect with pk/gf).\n\
+[-no]-casefold-search fall back to case-insensitive search if no exact match.\n\
+-cnf-line=STRING parse STRING as a configuration file line.\n\
+-debug=NUM set debugging flags.\n\
+-D, -dpi=NUM use a base resolution of NUM; default 600.\n\
+-engine=STRING set engine name to STRING.\n\
+-expand-braces=STRING output variable and brace expansion of STRING.\n\
+-expand-path=STRING output complete path expansion of STRING.\n\
+-expand-var=STRING output variable expansion of STRING.\n\
+-format=NAME use file type NAME (list shown by -help-formats).\n\
+-help display this message and exit.\n\
+-help-formats display information about all supported file formats.\n\
+-interactive ask for additional filenames to look up.\n\
+[-no]-mktex=FMT disable/enable mktexFMT generation (FMT=pk/mf/tex/tfm).\n\
+-mode=STRING set device name for $MAKETEX_MODE to STRING; no default.\n\
+-must-exist search the disk as well as ls-R if necessary.\n\
+-path=STRING search in the path STRING.\n\
+-progname=STRING set program name to STRING.\n\
+-safe-in-name=STRING check if STRING is ok to open for input.\n\
+-safe-out-name=STRING check if STRING is ok to open for output.\n\
+-show-path=TYPE output search path for file type TYPE\n\
+ (list shown by -help-formats).\n\
+-subdir=STRING only output matches whose directory ends with STRING.\n\
+-var-brace-value=STRING output brace-expanded value of variable $STRING.\n\
+-var-value=STRING output variable-expanded value of variable $STRING.\n\
+-version display version information number and exit.\n \
+"
+
+static void
+help_message (kpathsea kpse, string *argv)
+{
+ printf ("Usage: %s [OPTION]... [FILENAME]...\n", argv[0]);
+ fputs (USAGE, stdout);
+ putchar ('\n');
+ fputs (kpathsea_bug_address, stdout);
+ fputs ("Kpathsea home page: https://tug.org/kpathsea/\n", stdout);
+ exit (0);
+}
+
+static void
+help_formats (kpathsea kpse, string *argv)
+{
+ int f; /* kpse_file_format_type */
+
+ /* Have to set this for init_format to work. */
+ kpathsea_set_program_name (kpse, argv[0], progname);
+
+ puts (kpathsea_version_string);
+ puts ("\nRecognized Kpathsea format names and their (abbreviations) and suffixes:");
+ for (f = 0; f < kpse_last_format; f++) {
+ const_string *ext;
+
+ const_string envvar_list =
+ kpathsea_init_format_return_varlist (kpse, (kpse_file_format_type) f);
+ printf ("%s", kpse->format_info[f].type);
+
+ /* Show abbreviation if we accept one. We repeatedly go through the
+ abbr list here, but it's so short, it doesn't matter. */
+ {
+ unsigned a = 0;
+ while (format_abbrs[a].abbr != NULL) {
+ if (f == format_abbrs[a].format) {
+ printf (" (%s)", format_abbrs[a].abbr);
+ break;
+ }
+ a++;
+ }
+ }
+
+ /* Regular suffixes. */
+ putchar (':');
+ for (ext = kpse->format_info[f].suffix; ext && *ext; ext++) {
+ putchar (' ');
+#ifdef WIN32
+ kpathsea_win32_fputs (kpse, *ext, stdout);
+#else
+ fputs (*ext, stdout);
+#endif
+ }
+
+ if (kpse->format_info[f].alt_suffix) {
+ /* leave extra space between default and alt suffixes */
+ putchar (' ');
+ }
+ for (ext = kpse->format_info[f].alt_suffix; ext && *ext; ext++) {
+ putchar (' ');
+#ifdef WIN32
+ kpathsea_win32_fputs (kpse, *ext, stdout);
+#else
+ fputs (*ext, stdout);
+#endif
+ }
+
+ printf (" [variables: %s]\n", envvar_list);
+
+ printf (" [original path (from %s) = %s]\n",
+ kpse->format_info[f].path_source, kpse->format_info[f].raw_path);
+ }
+
+ fputs ("\nTo see paths after expansion, use --show-path=FMT.\n\n", stdout);
+ fputs (kpathsea_bug_address, stdout);
+ exit (0);
+}
+
+
+/* Reading the options. */
+
+/* This macro tests whether getopt found an option ``A''.
+ Assumes the option index is in the variable `option_index', and the
+ option table in a variable `long_options'. */
+#define ARGUMENT_IS(a) STREQ (long_options[option_index].name, a)
+
+/* If S is NULL or the empty string, abort. */
+#define ENSURE_NONEMPTY_STRING(s) do { \
+ if (!(s) || ! *(s)) { \
+ fprintf (stderr, "kpsewhich: empty argument for %s\n", \
+ long_options[option_index].name); \
+ fputs ("Try `kpsewhich --help' for more information.\n", stderr); \
+ exit (EXIT_FAILURE); } } while (0)
+
+/* SunOS cc can't initialize automatic structs. */
+static struct option long_options[]
+ = { { "D", 1, 0, 0 },
+ { "all", 0, (int *) &show_all, 1 },
+ { "casefold-search", 0, 0, 0 },
+ { "cnf-line", 1, 0, 0 },
+ { "debug", 1, 0, 0 },
+ { "dpi", 1, 0, 0 },
+ { "engine", 1, 0, 0 },
+ { "expand-braces", 1, 0, 0 },
+ { "expand-path", 1, 0, 0 },
+ { "expand-var", 1, 0, 0 },
+ { "format", 1, 0, 0 },
+ { "help", 0, 0, 0 },
+ { "help-formats", 0, 0, 0 },
+ { "interactive", 0, (int *) &interactive, 1 },
+ { "mktex", 1, 0, 0 },
+ { "mode", 1, 0, 0 },
+ { "must-exist", 0, (int *) &must_exist, 1 },
+ { "path", 1, 0, 0 },
+ { "no-casefold-search", 0, 0, 0 },
+ { "no-mktex", 1, 0, 0 },
+ { "progname", 1, 0, 0 },
+ { "safe-in-name", 1, 0, 0 },
+ { "safe-out-name", 1, 0, 0 },
+ { "subdir", 1, 0, 0 },
+ { "show-path", 1, 0, 0 },
+ { "var-brace-value", 1, 0, 0 },
+ { "var-value", 1, 0, 0 },
+ { "version", 0, 0, 0 },
+ { 0, 0, 0, 0 } };
+
+static void
+read_command_line (kpathsea kpse, int argc, string *argv)
+{
+ int g; /* `getopt' return code. */
+ int option_index;
+
+ for (;;) {
+ g = getopt_long_only (argc, argv, "", long_options, &option_index);
+
+ if (g == -1)
+ break;
+
+ if (g == '?')
+ exit (EXIT_FAILURE); /* Unknown option. */
+
+ assert (g == 0); /* We have no short option names. */
+
+ if (ARGUMENT_IS ("casefold-search")) {
+ /* We can't use a boolean for casefold-search because we want to
+ distinguish it being set with an option vs. leaving the default
+ (by default). */
+ xputenv ("texmf_casefold_search", "1");
+
+ } else if (ARGUMENT_IS ("cnf-line")) {
+ if (user_cnf_lines == NULL) {
+ user_cnf_nlines = 1;
+ user_cnf_lines = xmalloc (sizeof (const_string));
+ } else {
+ user_cnf_nlines++;
+ user_cnf_lines = xrealloc (user_cnf_lines,
+ user_cnf_nlines * sizeof (const_string));
+ }
+ user_cnf_lines[user_cnf_nlines-1] = xstrdup (optarg);
+
+ } else if (ARGUMENT_IS ("debug")) {
+ kpse->debug |= atoi (optarg);
+
+ } else if (ARGUMENT_IS ("dpi") || ARGUMENT_IS ("D")) {
+ dpi = atoi (optarg);
+
+ } else if (ARGUMENT_IS ("engine")) {
+ engine = optarg;
+
+ } else if (ARGUMENT_IS ("expand-braces")) {
+ braces_to_expand = optarg;
+
+ } else if (ARGUMENT_IS ("expand-path")) {
+ path_to_expand = optarg;
+
+ } else if (ARGUMENT_IS ("expand-var")) {
+ var_to_expand = optarg;
+
+ } else if (ARGUMENT_IS ("format")) {
+ ENSURE_NONEMPTY_STRING (optarg);
+ user_format_string = optarg;
+
+ } else if (ARGUMENT_IS ("help")) {
+ help_message (kpse, argv);
+
+ } else if (ARGUMENT_IS ("help-formats")) {
+ help_formats (kpse, argv);
+
+ } else if (ARGUMENT_IS ("mktex")) {
+ kpathsea_maketex_option (kpse, optarg, true);
+ must_exist = 1; /* otherwise it never gets called */
+
+ } else if (ARGUMENT_IS ("mode")) {
+ mode = optarg;
+
+ } else if (ARGUMENT_IS ("no-casefold-search")) {
+ xputenv ("texmf_casefold_search", "0");
+
+ } else if (ARGUMENT_IS ("no-mktex")) {
+ kpathsea_maketex_option (kpse, optarg, false);
+ must_exist = 0;
+
+ } else if (ARGUMENT_IS ("path")) {
+ user_path = optarg;
+
+ } else if (ARGUMENT_IS ("progname")) {
+ progname = optarg;
+
+ } else if (ARGUMENT_IS ("safe-in-name")) {
+ ENSURE_NONEMPTY_STRING (optarg);
+ safe_in_name = optarg;
+
+ } else if (ARGUMENT_IS ("safe-out-name")) {
+ ENSURE_NONEMPTY_STRING (optarg);
+ safe_out_name = optarg;
+
+ } else if (ARGUMENT_IS ("show-path")) {
+ path_to_show = optarg;
+ user_format_string = optarg;
+
+ } else if (ARGUMENT_IS ("subdir")) {
+ str_list_add (&subdir_paths, optarg);
+
+ } else if (ARGUMENT_IS ("var-brace-value")) {
+ ENSURE_NONEMPTY_STRING (optarg);
+ var_to_brace_value = optarg;
+
+ } else if (ARGUMENT_IS ("var-value")) {
+ ENSURE_NONEMPTY_STRING (optarg);
+ var_to_value = optarg;
+
+ } else if (ARGUMENT_IS ("version")) {
+ puts (kpathsea_version_string);
+ puts ("Copyright 2021 Karl Berry & Olaf Weber.\n\
+License LGPLv2.1+: GNU Lesser GPL version 2.1 or later <https://gnu.org/licenses/lgpl.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");
+ exit (0);
+ }
+
+ /* Else it was just a flag; getopt has already done the assignment. */
+ }
+
+ if (user_path && user_format_string) {
+ fprintf (stderr,
+ "kpsewhich: -path (%s) and -format (%s) are mutually exclusive.\n",
+ user_path, user_format_string);
+ fputs ("Try `kpsewhich --help' for more information.\n", stderr);
+ exit (EXIT_FAILURE);
+ }
+
+ if (optind == argc
+ && !var_to_expand && !braces_to_expand && !path_to_expand
+ && !path_to_show && !var_to_value && !var_to_brace_value
+ && !safe_in_name && !safe_out_name) {
+ fputs ("Missing argument. Try `kpsewhich --help' for more information.\n",
+ stderr);
+ exit (EXIT_FAILURE);
+ }
+}
+
+
+
+/* Initializations that may depend on the options. */
+
+static void
+init_more (kpathsea kpse)
+{
+ if (engine)
+ kpathsea_xputenv (kpse, "engine", engine);
+
+ /* We want config lines from the command line to override config files. */
+ if (user_cnf_lines) {
+ unsigned i;
+ for (i = 0; i < user_cnf_nlines; i++) {
+ kpathsea_cnf_line_env_progname (kpse, user_cnf_lines[i]);
+ free (user_cnf_lines[i]);
+ }
+ }
+
+ /* Disable all mktex programs unless they were explicitly enabled on our
+ command line. */
+#define DISABLE_MKTEX(fmt) \
+kpathsea_set_program_enabled (kpse, fmt, false, kpse_src_cmdline - 1)
+ DISABLE_MKTEX (kpse_pk_format);
+ DISABLE_MKTEX (kpse_mf_format);
+ DISABLE_MKTEX (kpse_tex_format);
+ DISABLE_MKTEX (kpse_tfm_format);
+ DISABLE_MKTEX (kpse_fmt_format);
+ DISABLE_MKTEX (kpse_ofm_format);
+ DISABLE_MKTEX (kpse_ocp_format);
+
+ /* NULL for no fallback font. */
+ kpathsea_init_prog (kpse, uppercasify (kpse->program_name), dpi, mode, NULL);
+
+ /* Have to do this after setting the program name. */
+ if (user_format_string) {
+ user_format = find_format (kpse, user_format_string, false);
+ if (user_format == kpse_last_format) {
+ WARNING1 ("kpsewhich: Ignoring unknown file type `%s'",
+ user_format_string);
+ }
+ }
+}
+
+
+
+int
+main (int argc, string *argv)
+{
+#ifdef WIN32
+#define puts(s) kpathsea_win32_puts(kpse, (s))
+ string *av, enc;
+ int ac;
+#endif /* WIN32 */
+ unsigned unfound = 0;
+ kpathsea kpse = kpathsea_new ();
+
+ /* Read options, then dependent initializations. */
+ read_command_line (kpse, argc, argv);
+
+ kpathsea_set_program_name (kpse, argv[0], progname);
+#ifdef WIN32
+ if(strstr(kpse->program_name,"xetex") || strstr(kpse->program_name,"xelatex")
+ || strstr(kpse->program_name,"uptex") || strstr(kpse->program_name,"uplatex")
+ || strstr(kpse->program_name,"pdftex") || strstr(kpse->program_name,"pdflatex")
+ || strstr(kpse->program_name,"dvipdfm") || strstr(kpse->program_name,"extractbb")
+ || strstr(kpse->program_name,"xbb") || strstr(kpse->program_name,"ebb")
+ || strstr(kpse->program_name,"dvips") || strstr(kpse->program_name,"upmendex"))
+ {
+ if (strstr(kpse->program_name,"upmendex"))
+ enc = "utf-8";
+ else
+ enc = kpathsea_var_value (kpse, "command_line_encoding");
+ if (kpathsea_get_command_line_args_utf8(kpse, enc, &ac, &av)) {
+ optind = 0;
+ read_command_line (kpse, ac, av);
+ argv = av;
+ argc = ac;
+ }
+ }
+#endif /* WIN32 */
+ init_more (kpse);
+
+
+ /* Perform actions. */
+
+ /* Variable expansion. */
+ if (var_to_expand)
+ puts (kpathsea_var_expand (kpse, var_to_expand));
+
+ /* Brace expansion. */
+ if (braces_to_expand)
+ puts (kpathsea_brace_expand (kpse, braces_to_expand));
+
+ /* Path expansion. */
+ if (path_to_expand)
+ puts (kpathsea_path_expand (kpse, path_to_expand));
+
+ /* Show a search path. */
+ if (path_to_show) {
+ if (user_format != kpse_last_format) {
+ if (!kpse->format_info[user_format].type) {
+ /* needed if arg was numeric */
+ kpathsea_init_format (kpse, user_format);
+ }
+ puts (kpse->format_info[user_format].path);
+ } else {
+ WARNING1 ("kpsewhich: Unknown file type, cannot show path: %s",
+ path_to_show);
+ }
+ }
+
+ /* Var to value. */
+ if (var_to_value) {
+ const_string value = kpathsea_var_value (kpse, var_to_value);
+ if (!value) {
+ unfound++;
+ value = "";
+ }
+ puts (value);
+ }
+
+ /* Var to brace-expanded value. This is separate from --var-value for
+ compatibility; people use --var-value for non-path values, where
+ changing commas to colons, which brace expansion does, is not right. */
+ if (var_to_brace_value) {
+ const_string value = kpathsea_var_value (kpse, var_to_brace_value);
+ if (!value) {
+ unfound++;
+ value = "";
+ } else {
+ /* Sometimes users want the fully-expanded (as a string, no
+ filesystem checks) value. We can't call brace_expand as part of
+ kpathsea_var_value, though, because unfortunately it is not
+ reentrant. We use var_value in lots of places in the source,
+ and it clobbers the static buffer in the kpse structure. */
+ value = kpathsea_brace_expand (kpse, value);
+ }
+ puts (value);
+ }
+
+ if (safe_in_name) {
+ if (!kpathsea_in_name_ok_silent (kpse, safe_in_name))
+ unfound++;
+ }
+
+ if (safe_out_name) {
+ if (!kpathsea_out_name_ok_silent (kpse, safe_out_name))
+ unfound++;
+ }
+
+ /* --subdir must imply --all, since we filter here after doing the
+ search, rather than inside the search itself. */
+ if (!STR_LIST_EMPTY (subdir_paths)) {
+ show_all = 1;
+ }
+
+ /* Usual case: look up each given filename. */
+ for (; optind < argc; optind++) {
+ unfound += lookup (kpse, argv[optind]);
+ }
+
+ if (interactive) {
+ for (;;) {
+ string name = read_line (stdin);
+ if (!name || STREQ (name, "q") || STREQ (name, "quit"))
+ break;
+ unfound += lookup (kpse, name);
+ free (name);
+ }
+ }
+
+ kpathsea_finish (kpse);
+ return unfound > 255 ? 1 : unfound;
+}
diff --git a/Build/source/texk/kpathsea/lib.h b/Build/source/texk/kpathsea/lib.h
new file mode 100644
index 00000000000..9255834ce29
--- /dev/null
+++ b/Build/source/texk/kpathsea/lib.h
@@ -0,0 +1,235 @@
+/* lib.h: declarations for common, low-level routines in kpathsea.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 2008, 2009, 2010, 2011,
+ 2012, 2015 Karl Berry.
+ Copyright 1999, 2000, 2003, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_LIB_H
+#define KPATHSEA_LIB_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/systypes.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define common sorts of messages. */
+
+/* This should be called only after a system call fails. Don't exit
+ with status `errno', because that might be 256, which would mean
+ success (exit statuses are truncated to eight bits). */
+
+#if defined (KPSE_COMPAT_API)
+/* This branch works as expected also in programs that use the new interface,
+ because kpathsea_set_program_name() sets up the kpse_def->invocation_name
+ whenever it is available.
+*/
+#define FATAL_PERROR(str) do { \
+ fprintf (stderr, "%s: ", kpse_def->invocation_name); \
+ perror (str); exit (EXIT_FAILURE); } while (0)
+#else
+/* If there is no global variable available, just output the error */
+#define FATAL_PERROR(str) do { \
+ perror (str); exit (EXIT_FAILURE); } while (0)
+#endif
+
+#if defined (KPSE_COMPAT_API)
+#define START_FATAL() do { \
+ fprintf (stderr, "%s: fatal: ", kpse_def->invocation_name);
+#else
+#define START_FATAL() do { \
+ fprintf (stderr, "fatal: ");
+#endif
+
+#define END_FATAL() fputs (".\n", stderr); exit (1); } while (0)
+
+#define FATAL(str) \
+ START_FATAL (); fputs (str, stderr); END_FATAL ()
+#define FATAL1(str, e1) \
+ START_FATAL (); fprintf (stderr, str, e1); END_FATAL ()
+#define FATAL2(str, e1, e2) \
+ START_FATAL (); fprintf (stderr, str, e1, e2); END_FATAL ()
+#define FATAL3(str, e1, e2, e3) \
+ START_FATAL (); fprintf (stderr, str, e1, e2, e3); END_FATAL ()
+#define FATAL4(str, e1, e2, e3, e4) \
+ START_FATAL (); fprintf (stderr, str, e1, e2, e3, e4); END_FATAL ()
+#define FATAL5(str, e1, e2, e3, e4, e5) \
+ START_FATAL (); fprintf (stderr, str, e1, e2, e3, e4, e5); END_FATAL ()
+#define FATAL6(str, e1, e2, e3, e4, e5, e6) \
+ START_FATAL (); fprintf (stderr, str, e1, e2, e3, e4, e5, e6); END_FATAL ()
+
+#define START_WARNING() do { fputs ("warning: ", stderr)
+#define END_WARNING() fputs (".\n", stderr); fflush (stderr); } while (0)
+
+#define WARNING(str) \
+ START_WARNING (); fputs (str, stderr); END_WARNING ()
+#define WARNING1(str, e1) \
+ START_WARNING (); fprintf (stderr, str, e1); END_WARNING ()
+#define WARNING2(str, e1, e2) \
+ START_WARNING (); fprintf (stderr, str, e1, e2); END_WARNING ()
+#define WARNING3(str, e1, e2, e3) \
+ START_WARNING (); fprintf (stderr, str, e1, e2, e3); END_WARNING ()
+#define WARNING4(str, e1, e2, e3, e4) \
+ START_WARNING (); fprintf (stderr, str, e1, e2, e3, e4); END_WARNING ()
+
+/* This requires an identifier `kpse' to be set up correctly. Sorry. */
+#define LIB_START_FATAL() do { \
+ fprintf (stderr, "%s: fatal: ", kpse->invocation_name);
+
+#define LIB_FATAL(str) \
+ LIB_START_FATAL (); fputs (str, stderr); END_FATAL ()
+#define LIB_FATAL1(str, e1) \
+ LIB_START_FATAL (); fprintf (stderr, str, e1); END_FATAL ()
+#define LIB_FATAL2(str, e1, e2) \
+ LIB_START_FATAL (); fprintf (stderr, str, e1, e2); END_FATAL ()
+
+
+/* I find this easier to read. */
+#define STREQ(s1, s2) (((s1) != NULL) && ((s2) != NULL) && (strcmp (s1, s2) == 0))
+#define STRNEQ(s1, s2, n) ((s1) && (s2) && (strncmp (s1, s2, n) == 0))
+
+/* Support for FAT/ISO-9660 filesystems. Theoretically this should be
+ done at runtime, per filesystem, but that's painful to program. */
+#ifdef MONOCASE_FILENAMES
+#define FILESTRCASEEQ(s1,s2) ((s1) && (s2) && (strcasecmp (s1, s2) == 0))
+#define FILESTRNCASEEQ(s1,s2,l) ((s1) && (s2) && (strncasecmp (s1,s2,l) == 0))
+#define FILECHARCASEEQ(c1,c2) (toupper (c1) == toupper (c2))
+#else
+#define FILESTRCASEEQ STREQ
+#define FILESTRNCASEEQ STRNEQ
+#define FILECHARCASEEQ(c1,c2) ((c1) == (c2))
+#endif
+
+/* This is the maximum number of numerals that result when a 64-bit
+ integer is converted to a string, plus one for a trailing null byte,
+ plus one for a sign. */
+#define MAX_INT_LENGTH 21
+
+/* If the environment variable TEST is set, return it; otherwise,
+ DEFAULT. This is useful for paths that use more than one envvar. */
+#define ENVVAR(test, default) (getenv (test) ? (test) : (default))
+
+/* Return whether a kpse configuration is (some sort of) true. Check
+ for negation values, so a value like "2" will be true, just in case. */
+#define KPSE_CNF_P(val) \
+ ((val) && *(val) && *(val) != 'f' && *(val) != '0')
+
+
+/* Return a fresh copy of S1 followed by S2, et al. */
+extern KPSEDLL string concat (const_string s1, const_string s2);
+extern KPSEDLL string concat3 (const_string, const_string, const_string);
+/* `concatn' is declared in its own include file, to avoid pulling in
+ all the varargs stuff. */
+
+/* A fresh copy of just S. */
+extern KPSEDLL string xstrdup (const_string s);
+
+/* Convert all lowercase characters in S to uppercase. */
+extern KPSEDLL string uppercasify (const_string s);
+
+/* Like `atoi', but disallow negative numbers. */
+extern KPSEDLL unsigned atou (const_string);
+
+/* True if FILENAME1 and FILENAME2 are the same file. If stat fails on
+ either name, return false, no error message.
+ Cf. `SAME_FILE_P' in xstat.h. */
+extern KPSEDLL boolean same_file_p (const_string filename1,
+ const_string filename2);
+
+/* Return NAME with any leading path stripped off. This returns a
+ pointer into NAME. */
+extern KPSEDLL const_string xbasename (const_string name);
+
+/* Return directory part of NAME. This returns a new string. */
+extern KPSEDLL string xdirname (const_string name);
+
+/* If NAME has a suffix, return a pointer to its first character (i.e.,
+ the one after the `.'); otherwise, return NULL. */
+extern KPSEDLL const_string find_suffix (const_string name);
+
+/* Return NAME with any suffix removed. */
+extern KPSEDLL string remove_suffix (const_string name);
+
+/* Return S with the suffix SUFFIX, removing any suffix already present.
+ For example, `make_suffix ("/foo/bar.baz", "quux")' returns
+ `/foo/bar.quux'. Returns a string allocated with malloc. */
+extern KPSEDLL string make_suffix (const_string s, const_string suffix);
+
+/* Return NAME with STEM_PREFIX prepended to the stem. For example,
+ `make_prefix ("/foo/bar.baz", "x")' returns `/foo/xbar.baz'.
+ Returns a string allocated with malloc. */
+extern KPSEDLL string make_prefix (string stem_prefix, string name);
+
+/* If NAME has a suffix, simply return it; otherwise, return
+ `NAME.SUFFIX'. */
+extern KPSEDLL const_string extend_filename (const_string name,
+ const_string suffix);
+
+/* Call putenv with the string `VAR=VALUE' and abort on error. */
+extern KPSEDLL void kpathsea_xputenv (kpathsea kpse, const_string var,
+ const_string value);
+extern KPSEDLL void kpathsea_xputenv_int (kpathsea kpse, const_string var,
+ int value);
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL void xputenv (const_string var, const_string value);
+extern KPSEDLL void xputenv_int (const_string var, int value);
+#endif
+
+/* Return the current working directory. */
+extern KPSEDLL string xgetcwd (void);
+
+/* Returns true if FN is a directory or a symlink to a directory. */
+extern KPSEDLL boolean kpathsea_dir_p (kpathsea kpse, string fn);
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL boolean dir_p (string fn);
+#endif
+
+/* If FN is a readable directory, return the number of links it has.
+ Otherwise, return -1. The nlinks parameter is a dummy on UNIX. */
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL int dir_links (const_string fn, long nlinks);
+#endif
+extern KPSEDLL int kpathsea_dir_links (kpathsea kpse, const_string fn,
+ long nlinks);
+
+/* Like their stdio counterparts, but abort on error, after calling
+ perror(3) with FILENAME as its argument. */
+extern KPSEDLL FILE *xfopen (const_string filename, const_string mode);
+extern KPSEDLL void xfclose (FILE *fp, const_string filename);
+extern KPSEDLL void xfseek (FILE *fp, long offset, int wherefrom, const_string filename);
+extern KPSEDLL void xfseeko (FILE *fp, off_t offset, int wherefrom, const_string filename);
+extern KPSEDLL long xftell (FILE *fp, const_string filename);
+extern KPSEDLL off_t xftello (FILE *fp, const_string filename);
+
+/* These call the corresponding function in the standard library, and
+ abort if those routines fail. Also, `xrealloc' calls `xmalloc' if
+ OLD_ADDRESS is null. */
+extern KPSEDLL address xmalloc (size_t size);
+extern KPSEDLL address xrealloc (address old_address, size_t new_size);
+extern KPSEDLL address xcalloc (size_t nelem, size_t elsize);
+
+/* (Re)Allocate N items of type T using xmalloc/xrealloc. */
+#define XTALLOC(n, t) ((t *) xmalloc ((n) * sizeof (t)))
+#define XTALLOC1(t) XTALLOC (1, t)
+#define XRETALLOC(addr, n, t) ((addr) = (t *) xrealloc (addr, (n) * sizeof(t)))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_LIB_H */
diff --git a/Build/source/texk/kpathsea/line.c b/Build/source/texk/kpathsea/line.c
new file mode 100644
index 00000000000..7d677a5599a
--- /dev/null
+++ b/Build/source/texk/kpathsea/line.c
@@ -0,0 +1,97 @@
+/* line.c: return the next line from a file, or NULL.
+
+ Copyright 1992, 1993, 1995, 1996, 2008, 2013, 2014, 2020 Karl Berry.
+ Copyright 1998, 1999, 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/line.h>
+
+#ifdef WIN32
+#undef getc
+#undef ungetc
+#define getc win32_getc
+#define ungetc win32_ungetc
+#define FLOCKFILE(x)
+#define FUNLOCKFILE(x)
+
+#else /* not WIN32 */
+/* By POSIX, getc() has to be thread-safe, which means (un)locking on
+ every character read. It is much faster to lock the stream (once),
+ use getc_unlocked to read, and then unlock the stream. We need to be
+ thread-safe especially for the sake of MPlib.
+
+ Perhaps we will be lucky enough to be able to do this
+ unconditionally, without checking in configure. We'll see. */
+#undef getc
+#define getc getc_unlocked
+#define FLOCKFILE(x) flockfile(x)
+#define FUNLOCKFILE(x) funlockfile(x)
+#endif /* not WIN32 */
+
+/* Allocate in increments of this size. */
+#define BLOCK_SIZE 75
+
+char *
+read_line (FILE *f)
+{
+ int c;
+ unsigned limit = BLOCK_SIZE;
+ unsigned loc = 0;
+ char *line = xmalloc (limit);
+
+ FLOCKFILE (f);
+
+ while ((c = getc (f)) != EOF && c != '\n' && c != '\r') {
+ /* Silently drop null bytes. */
+ if (c == 0) {
+ continue;
+ }
+
+ line[loc] = c;
+ loc++;
+
+ /* By testing after the assignment, we guarantee that we'll always
+ have space for the null we append below. We know we always
+ have room for the first char, since we start with BLOCK_SIZE. */
+ if (loc == limit) {
+ limit += BLOCK_SIZE;
+ line = xrealloc (line, limit);
+ }
+ }
+
+ /* If we read anything, return it, even a partial last-line-if-file
+ which is not properly terminated. */
+ if (loc == 0 && c == EOF) {
+ /* At end of file. */
+ free (line);
+ line = NULL;
+ } else {
+ /* Terminate the string. We can't represent nulls in the file,
+ but this doesn't matter. */
+ line[loc] = 0;
+ /* Absorb LF of a CRLF pair. */
+ if (c == '\r') {
+ c = getc (f);
+ if (c != '\n') {
+ ungetc (c, f);
+ }
+ }
+ }
+
+ FUNLOCKFILE (f);
+
+ return line;
+}
diff --git a/Build/source/texk/kpathsea/line.h b/Build/source/texk/kpathsea/line.h
new file mode 100644
index 00000000000..9c98ce95753
--- /dev/null
+++ b/Build/source/texk/kpathsea/line.h
@@ -0,0 +1,39 @@
+/* line.h: read an arbitrary-length input line.
+
+ Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef LINE_H
+#define LINE_H
+
+#include <stdio.h>
+#include <kpathsea/types.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return NULL if we are at EOF, else the next line of F. The newline
+ character at the end of string is removed. The string is allocated
+ with malloc. */
+extern KPSEDLL string read_line (FILE *f);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not LINE_H */
diff --git a/Build/source/texk/kpathsea/magstep.c b/Build/source/texk/kpathsea/magstep.c
new file mode 100644
index 00000000000..95a16ba5d7c
--- /dev/null
+++ b/Build/source/texk/kpathsea/magstep.c
@@ -0,0 +1,112 @@
+/* magstep.c: fix up fixed-point vs. floating-point.
+
+ Copyright 1994, 1995, 2008 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/magstep.h>
+
+/* Return true magstep N, where the lsb of N means ``half'' (see
+ magstep.h) for resolution BDPI. From Tom Rokicki's dvips. */
+
+static int
+magstep (int n, int bdpi)
+{
+ double t;
+ int step;
+ int neg = 0;
+
+ if (n < 0)
+ {
+ neg = 1;
+ n = -n;
+ }
+
+ if (n & 1)
+ {
+ n &= ~1;
+ t = 1.095445115;
+ }
+ else
+ t = 1.0;
+
+ while (n > 8)
+ {
+ n -= 8;
+ t = t * 2.0736;
+ }
+
+ while (n > 0)
+ {
+ n -= 2;
+ t = t * 1.2;
+ }
+
+ /* Unnecessary casts to shut up stupid compilers. */
+ step = (int)(0.5 + (neg ? bdpi / t : bdpi * t));
+ return step;
+}
+
+/* This is adapted from code written by Tom Rokicki for dvips. It's
+ part of Kpathsea now so all the drivers can use it. The idea is to
+ return the true dpi corresponding to DPI with a base resolution of
+ BDPI. If M_RET is non-null, we also set that to the mag value. */
+
+
+/* Don't bother trying to use fabs or some other ``standard'' routine
+ which can only cause trouble; just roll our own simple-minded
+ absolute-value function that is all we need. */
+#undef ABS /* be safe */
+#define ABS(expr) ((expr) < 0 ? -(expr) : (expr))
+
+#define MAGSTEP_MAX 40
+
+unsigned
+kpathsea_magstep_fix (kpathsea kpse, unsigned dpi, unsigned bdpi, int *m_ret)
+{
+ int m;
+ int mdpi = -1;
+ unsigned real_dpi = 0;
+ int sign = dpi < bdpi ? -1 : 1; /* negative or positive magsteps? */
+ (void)kpse; /* currenty not used */
+
+ for (m = 0; !real_dpi && m < MAGSTEP_MAX; m++) /* don't go forever */
+ {
+ mdpi = magstep (m * sign, bdpi);
+ if (ABS (mdpi - (int) dpi) <= 1) /* if this magstep matches, quit */
+ real_dpi = mdpi;
+ else if ((mdpi - (int) dpi) * sign > 0) /* if gone too far, quit */
+ real_dpi = dpi;
+ }
+
+ /* If requested, return the encoded magstep (the loop went one too far). */
+ /* More unnecessary casts. */
+ if (m_ret)
+ *m_ret = real_dpi == (unsigned)(mdpi ? (m - 1) * sign : 0);
+
+ /* Always return the true dpi found. */
+ return real_dpi ? real_dpi : dpi;
+}
+
+#if defined (KPSE_COMPAT_API)
+unsigned
+kpse_magstep_fix (unsigned dpi, unsigned bdpi, int *m_ret)
+{
+ return kpathsea_magstep_fix(kpse_def, dpi, bdpi, m_ret);
+}
+#endif
+
diff --git a/Build/source/texk/kpathsea/magstep.h b/Build/source/texk/kpathsea/magstep.h
new file mode 100644
index 00000000000..eae08f6a35d
--- /dev/null
+++ b/Build/source/texk/kpathsea/magstep.h
@@ -0,0 +1,59 @@
+/* magstep.h: declaration for magstep fixing.
+
+ Copyright 1994, 2008, 2009 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_MAGSTEP_H
+#define KPATHSEA_MAGSTEP_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* If DPI is close enough to some magstep of BDPI, return the true dpi
+ value, and the magstep found (or zero) in M_RET (if
+ non-null). ``Close enough'' means within one pixel.
+
+ M_RET is slightly encoded: the least significant bit is on for a
+ half-magstep, off otherwise. Thus, a returned M_RET of 1 means
+ \magstephalf, i.e., sqrt(1.2), i.e., 1.09544. Put another way,
+ return twice the number of magsteps.
+
+ In practice, this matters for magstephalf. Floating-point computation
+ with the fixed-point DVI representation leads to 328 (for BDPI ==
+ 300); specifying `at 11pt' yields 330; the true \magstephalf is 329
+ (that's what you get if you run Metafont with mag:=magstep(.5)).
+
+ The time to call this is after you read the font spec from the DVI
+ file, but before you look up any files -- do the usual floating-point
+ computations, and then fix up the result. */
+
+extern KPSEDLL unsigned kpathsea_magstep_fix (kpathsea kpse, unsigned dpi,
+ unsigned bdpi, int *m_ret);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL unsigned kpse_magstep_fix (unsigned dpi, unsigned bdpi,
+ int *m_ret);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_MAGSTEP_H */
diff --git a/Build/source/texk/kpathsea/make-suffix.c b/Build/source/texk/kpathsea/make-suffix.c
new file mode 100644
index 00000000000..16231bb1ad5
--- /dev/null
+++ b/Build/source/texk/kpathsea/make-suffix.c
@@ -0,0 +1,70 @@
+/* make-suffix.c: unconditionally add a filename suffix.
+
+ Copyright 1992, 1993, 1995, 2008, 2011, 2016 Karl Berry.
+ Copyright 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-pathch.h>
+
+/* Return a new string: S suffixed with SUFFIX, regardless of what it
+ was before. This returns a newly allocated string. */
+
+string
+make_suffix (const_string s, const_string suffix)
+{
+ string new_s;
+ const_string dot_pos = strrchr (s, '.');
+ const_string p;
+#if defined(WIN32)
+ string q;
+#endif
+
+ if (dot_pos)
+ for (p = dot_pos + 1; *p; p++) {
+ if (IS_DIR_SEP (*p)) {
+ dot_pos = NULL;
+ break;
+ }
+#if defined(WIN32) && defined(KPSE_COMPAT_API)
+ else if (IS_KANJI(p))
+ p++;
+#endif
+ }
+
+ if (dot_pos == NULL)
+ new_s = concat3 (s, ".", suffix);
+ else
+ {
+ unsigned past_dot_index = dot_pos + 1 - s;
+
+ new_s = (string)xmalloc (past_dot_index + strlen (suffix) + 1);
+ strncpy (new_s, s, past_dot_index);
+ strcpy (new_s + past_dot_index, suffix);
+ }
+
+#if defined(WIN32)
+ for (q = new_s; *q; q++) {
+ if (*q == '\\')
+ *q = '/';
+#if defined(KPSE_COMPAT_API)
+ else if (IS_KANJI(q))
+ q++;
+#endif
+ }
+#endif
+
+ return new_s;
+}
diff --git a/Build/source/texk/kpathsea/man/Makefile.am b/Build/source/texk/kpathsea/man/Makefile.am
new file mode 100644
index 00000000000..7e542730067
--- /dev/null
+++ b/Build/source/texk/kpathsea/man/Makefile.am
@@ -0,0 +1,18 @@
+## $Id$
+## Makefile.am for the TeX Live subdirectory texk/kpathsea/man/
+##
+## Copyright 2015-2019 Karl Berry <tex-live@tug.org>
+## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+man_sources = \
+ kpseaccess.man \
+ kpsereadlink.man \
+ kpsestat.man \
+ kpsewhich.man
+
+EXTRA_DIST = $(man_sources)
+
+KPATHSEA_PATHS_H = ${top_builddir}/..
+
+include $(top_srcdir)/../../am/man.am
diff --git a/Build/source/texk/kpathsea/man/Makefile.in b/Build/source/texk/kpathsea/man/Makefile.in
new file mode 100644
index 00000000000..b957e9fc32f
--- /dev/null
+++ b/Build/source/texk/kpathsea/man/Makefile.in
@@ -0,0 +1,580 @@
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2020 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@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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 = man
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \
+ $(top_srcdir)/../../m4/kpse-lib-version.m4 \
+ $(top_srcdir)/../../m4/kpse-mktex.m4 \
+ $(top_srcdir)/../../m4/kpse-warnings.m4 \
+ $(top_srcdir)/../../m4/kpse-win32.m4 \
+ $(top_srcdir)/../../m4/libtool.m4 \
+ $(top_srcdir)/../../m4/ltoptions.m4 \
+ $(top_srcdir)/../../m4/ltsugar.m4 \
+ $(top_srcdir)/../../m4/ltversion.m4 \
+ $(top_srcdir)/../../m4/lt~obsolete.m4 $(top_srcdir)/version.ac \
+ $(top_srcdir)/../../version.ac $(top_srcdir)/ac/mktex.ac \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/c-auto.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+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__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(nodist_man1_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/../../am/man.am
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KPSEVERSION = @KPSEVERSION@
+KPSE_LT_VERSINFO = @KPSE_LT_VERSINFO@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_OBJDIR = @LT_OBJDIR@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+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@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WEB2CVERSION = @WEB2CVERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+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@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+man_sources = \
+ kpseaccess.man \
+ kpsereadlink.man \
+ kpsestat.man \
+ kpsewhich.man
+
+EXTRA_DIST = $(man_sources)
+KPATHSEA_PATHS_H = ${top_builddir}/..
+SUFFIXES = .1 .man .ps .dvi
+man_files = $(man_sources:.man=.1)
+nodist_man1_MANS = $(man_files)
+DITROFF = groff
+DVIS = $(man_files:.1=.dvi)
+PSS = $(man_files:.1=.ps)
+DISTCLEANFILES = sedscript $(man_files) $(DVIS) $(PSS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .1 .man .ps .dvi
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/../../am/man.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 man/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign man/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+$(top_srcdir)/../../am/man.am $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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
+install-man1: $(nodist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ @list1='$(nodist_man1_MANS)'; \
+ list2=''; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | 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='$(nodist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
+installdirs:
+ for dir in "$(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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+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)
+ -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."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool 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-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags-am uninstall uninstall-am uninstall-man \
+ uninstall-man1
+
+.PRECIOUS: Makefile
+
+
+.man.1:
+ $(AM_V_GEN)sed -f sedscript $< >$@
+$(man_files): sedscript
+
+# At present, all but VERSION should be unused.
+sedscript: $(KPATHSEA_PATHS_H)/kpathsea/paths.h
+ $(AM_V_GEN)( \
+ sed -n -e '/^#define/s/#define[ ][ ]*\([A-Z_a-z][A-Z_a-z]*\)[ ][ ]*\(.*\)/s%@\1@%\2%/p' \
+ $(KPATHSEA_PATHS_H)/kpathsea/paths.h \
+ | sed -e 's/"//g' -e 's/[ ]*\/\*[^*]*\*\///g'; \
+ echo 's%@VER''SION@%$(VERSION)%'; \
+ echo 's%@BINDIR@%$(bindir)%'; \
+ echo 's%@INFODIR@%$(infodir)%'; \
+ echo 's%@TEXINPUTDIR@%$(texinputdir)%'; \
+ echo 's%@MFINPUTDIR@%$(mfinputdir)%'; \
+ echo 's%@MPINPUTDIR@%$(mpinputdir)%'; \
+ echo 's%@FONTDIR@%$(fontdir)%'; \
+ echo 's%@FMTDIR@%$(fmtdir)%'; \
+ echo 's%@BASEDIR@%$(basedir)%'; \
+ echo 's%@MEMDIR@%$(memdir)%'; \
+ echo 's%@TEXPOOLDIR@%$(texpooldir)%'; \
+ echo 's%@MFPOOLDIR@%$(mfpooldir)%'; \
+ echo 's%@MPPOOLDIR@%$(mppooldir)%'; \
+ echo 's%@FONTMAPDIR@%$(dvipsdir)%'; \
+ echo 's%@LOCALMODES@%$(localmodes)%') >sedscript
+
+.1.dvi:
+ $(DITROFF) -Tdvi -man $< >$@
+
+.1.ps:
+ $(DITROFF) -Tps -man $< >$@
+
+# 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/Build/source/texk/kpathsea/man/kpseaccess.man b/Build/source/texk/kpathsea/man/kpseaccess.man
new file mode 100644
index 00000000000..e9b3035a5df
--- /dev/null
+++ b/Build/source/texk/kpathsea/man/kpseaccess.man
@@ -0,0 +1,66 @@
+.TH KPSEACCESS 1 "1 March 2011" "Kpathsea @VERSION@"
+.\"=====================================================================
+.if n .ds MP MetaPost
+.if t .ds MP MetaPost
+.if n .ds MF Metafont
+.if t .ds MF M\s-2ETAFONT\s0
+.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
+.if n .ds TX TeX
+.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff
+.el .ds OX TeX for nroff
+.\" the same but obliqued
+.\" BX definition must follow TX so BX can use TX
+.if t .ds BX \fRB\s-2IB\s0\fP\*(TX
+.if n .ds BX BibTeX
+.\" LX definition must follow TX so LX can use TX
+.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX
+.if n .ds LX LaTeX
+.\"=====================================================================
+.SH NAME
+kpseaccess \- determine whether a file can be accessed
+.SH SYNOPSIS
+.B kpseaccess
+.I mode
+.I file
+.\"=====================================================================
+.SH DESCRIPTION
+Exit successfully if
+.I file
+can be accessed with the specified
+.IR mode .
+The
+.I mode
+is an optional dash
+.RB (` \- ')
+followed by zero or more letters of
+.BR rwx ,
+where
+.B r
+is for readable,
+.B w
+is for writable, and
+.B x
+is for executable.
+.PP
+The difference between
+.B kpseaccess
+and
+.B test
+is that the latter looks at the permission bits, while the former
+checks using the
+.BR access (2)
+system call. This makes a difference when file systems have been
+mounted read-only.
+.\"=====================================================================
+.SH OPTIONS
+.B kpseaccess
+accepts the following options:
+.TP
+.B --help
+Print help message and exit.
+.TP
+.B --version
+Print version information and exit.
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR access (2)
diff --git a/Build/source/texk/kpathsea/man/kpsereadlink.man b/Build/source/texk/kpathsea/man/kpsereadlink.man
new file mode 100644
index 00000000000..343451aa534
--- /dev/null
+++ b/Build/source/texk/kpathsea/man/kpsereadlink.man
@@ -0,0 +1,30 @@
+.TH KPSEREADLINK 1 "1 March 2011" "Kpathsea @VERSION@"
+.\"=====================================================================
+.SH NAME
+kpsereadlink \- print contents of symbolic link
+.SH SYNOPSIS
+.B kpsereadlink
+.I file
+.\"=====================================================================
+.SH DESCRIPTION
+If
+.I file
+is a symbolic link, print its contents (what it links to), and exit
+successfully. Exit with a failure otherwise.
+.PP
+On systems that do not support symbolic links,
+.B kpsereadlink
+will always fail.
+.\"=====================================================================
+.SH OPTIONS
+.B kpsereadlink
+accepts the following options:
+.TP
+.B --help
+Print help message and exit.
+.TP
+.B --version
+Print version information and exit.
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR readlink (2)
diff --git a/Build/source/texk/kpathsea/man/kpsestat.man b/Build/source/texk/kpathsea/man/kpsestat.man
new file mode 100644
index 00000000000..f5a92b7f256
--- /dev/null
+++ b/Build/source/texk/kpathsea/man/kpsestat.man
@@ -0,0 +1,51 @@
+.TH KPSESTAT 1 "1 March 2011" "Kpathsea @VERSION@"
+.\"=====================================================================
+.if n .ds MP MetaPost
+.if t .ds MP MetaPost
+.if n .ds MF Metafont
+.if t .ds MF M\s-2ETAFONT\s0
+.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
+.if n .ds TX TeX
+.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff
+.el .ds OX TeX for nroff
+.\" the same but obliqued
+.\" BX definition must follow TX so BX can use TX
+.if t .ds BX \fRB\s-2IB\s0\fP\*(TX
+.if n .ds BX BibTeX
+.\" LX definition must follow TX so LX can use TX
+.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX
+.if n .ds LX LaTeX
+.\"=====================================================================
+.SH NAME
+kpsestat \- compute octal mode from mode of existing file
+.SH SYNOPSIS
+.B kpsestat
+.I mode
+.I file
+.\"=====================================================================
+.SH DESCRIPTION
+.B kpsestat
+prints the octal permission of
+.I file
+modified according to
+.I mode
+on standard output. The
+.I mode
+parameter accepts a subset of the symbolic permissions accepted by
+.BR chmod (1).
+Use
+.B =
+as the mode to obtain the unchanged permissions.
+.\"=====================================================================
+.SH OPTIONS
+.B kpsestat
+accepts the following options:
+.TP
+.B --help
+Print help message and exit.
+.TP
+.B --version
+Print version information and exit.
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR chmod (1).
diff --git a/Build/source/texk/kpathsea/man/kpsewhich.man b/Build/source/texk/kpathsea/man/kpsewhich.man
new file mode 100644
index 00000000000..7703986a329
--- /dev/null
+++ b/Build/source/texk/kpathsea/man/kpsewhich.man
@@ -0,0 +1,144 @@
+.TH KPSEWHICH 1 "1 March 2011" "Kpathsea @VERSION@"
+.\"=====================================================================
+.if n .ds MP MetaPost
+.if t .ds MP MetaPost
+.if n .ds MF Metafont
+.if t .ds MF M\s-2ETAFONT\s0
+.if t .ds TX \fRT\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X\fP
+.if n .ds TX TeX
+.ie t .ds OX \fIT\v'+0.25m'E\v'-0.25m'X\fP for troff
+.el .ds OX TeX for nroff
+.\" the same but obliqued
+.\" BX definition must follow TX so BX can use TX
+.if t .ds BX \fRB\s-2IB\s0\fP\*(TX
+.if n .ds BX BibTeX
+.\" LX definition must follow TX so LX can use TX
+.if t .ds LX \fRL\\h'-0.36m'\\v'-0.15v'\s-2A\s0\\h'-0.15m'\\v'0.15v'\fP\*(TX
+.if n .ds LX LaTeX
+.\"=====================================================================
+.SH NAME
+kpsewhich \- standalone path lookup and and expansion for kpathsea
+.SH SYNOPSIS
+.B kpsewhich
+.RI [ options ]
+.RI [ filenames ]
+.\"=====================================================================
+.SH DESCRIPTION
+This manual page is not meant to be exhaustive. The complete
+documentation for this version of \*(TX can be found in the info file
+or manual
+.IR "Kpathsea: A library for path searching" .
+.PP
+.B kpsewhich
+is used as a standalone front-end of the kpathsea library that can be
+used to examine variables and find files. When the
+.B -format
+option is not given, the search path used when looking for a file is
+inferred from the name given, by looking for a known extension. If
+no known extension is found, the search path for \*(TX source files is
+used.
+.\"=====================================================================
+.SH OPTIONS
+.B kpsewhich
+accepts the following options:
+.TP
+.BI -debug \ num
+Set debugging flags.
+.TP
+.BI -D \ num
+Use a base resolution of
+.IR num ;
+the default, set by the installer, is typically 600.
+.TP
+.BI -dpi \ num
+As
+.BR -D.
+.TP
+.BI -engine \ string
+Set
+.I $engine
+in the environment, which is used in some search paths.
+.TP
+.BI -expand-braces \ string
+Print variable and brace expansion of
+.IR string .
+.TP
+.BI -expand-path \ string
+Print complete path expansion of
+.IR string .
+.TP
+.BI -expand-var \ string
+Print variable expansion of
+.IR string .
+.TP
+.BI -format \ name
+Use file type
+.IR name .
+See the info manual for a list of valid names, or use the
+.B -help
+option to print the list.
+.TP
+.B -help
+Print help message and exit.
+.TP
+.B -interactive
+Ask for additional filenames to look up.
+.TP
+.BI -mktex \ fmt
+enable
+.RI mktex fmt
+generation.
+.RI ( fmt =pk/mf/tex/tfm)
+.TP
+.BI -mode \ string
+Set device name for
+.I $MAKETEX_MODE
+to
+.IR string ;
+no default.
+.TP
+.B -must-exist
+Search the disk as well as ls-R if necessary.
+.TP
+.BI -no-mktex \ fmt
+disable
+.RI mktex fmt
+generation.
+.RI ( fmt =pk/mf/tex/tfm)
+.TP
+.BI -path \ string
+Search in the path
+.IR string .
+.TP
+.BI -progname \ string
+Set program name to
+.IR string .
+.\" .TP
+.\" .BI -separator \ string
+.\" .rb
+.\" .I string
+.\" separates components in
+.\" .B -path
+.\" output; default is
+.\" .I :
+.\" on UNIX systems.
+.TP
+.BI -show-path \ name
+Output search path for file type
+.IR name .
+See the info manual for a list of valid names, or use the
+.B -help
+option to print the list.
+.TP
+.BI -var-value \ variable
+Print the expansion of
+.IR variable .
+.TP
+.B -version
+Print version information and exit.
+.\"=====================================================================
+.SH "SEE ALSO"
+.BR mktexlsr (1),
+.BR mktexmf (1),
+.BR mktexpk (1),
+.BR mktextfm (1).
diff --git a/Build/source/texk/kpathsea/mingw32.c b/Build/source/texk/kpathsea/mingw32.c
new file mode 100644
index 00000000000..a795a3a27a2
--- /dev/null
+++ b/Build/source/texk/kpathsea/mingw32.c
@@ -0,0 +1,458 @@
+/* mingw32.c: bits and pieces for mingw32
+
+ Copyright 2009-2017 Taco Hoekwater <taco@luatex.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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Original sources lifted from the distribution of XEmacs for Windows NT,
+ Copyright 1994-1996 Free Software Foundation, later adapted to
+ fpTeX 0.4 (2000) by Fabrice Popineau <Fabrice.Popineau@supelec.fr>,
+ then simplified and re-adapted to TeXLive (2009) by Taco Hoekwater
+ <taco@luatex.org>.
+*/
+
+#ifdef __MINGW32__
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/c-proto.h>
+#include <kpathsea/mingw32.h>
+#include <kpathsea/lib.h>
+#include <kpathsea/concatn.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/c-stat.h>
+#include <shlobj.h>
+#include <errno.h>
+
+/* Emulate getpwuid, getpwnam and others. */
+
+typedef HWND (WINAPI *pGetDesktopWindow)(void);
+
+typedef HRESULT (WINAPI * pSHGetSpecialFolderPathA)(HWND, LPSTR, int, BOOL);
+
+extern int __cdecl _set_osfhnd (int fd, long h);
+extern int __cdecl _free_osfhnd (int fd);
+
+static char *get_home_directory (void);
+static int _parse_root (char * name, char ** pPath);
+
+double
+win32_floor (double x)
+{
+ return floor (x);
+}
+
+void
+init_user_info (void)
+{
+ /* Ensure HOME and SHELL are defined. */
+ char *home = get_home_directory();
+ if (home) {
+ putenv(concat("HOME=", home));
+ }
+ else {
+ putenv ("HOME=c:/");
+ }
+ if (getenv ("SHELL") == NULL)
+ putenv ((GetVersion () & 0x80000000) ? "SHELL=command" : "SHELL=cmd");
+
+ {
+ /* Win2K problem : we need a specific TEMP directory with
+ full access rights so that any user building a format file
+ or a font file will build it with full access rights. The installer
+ takes care of defining TEXMFTEMP=$SELFAUTOPARENT/tmp in the environment.
+ If it is defined, then use it as the TEMP and TMP variables.
+ */
+ char *p;
+ if ((p = getenv("TEXMFTEMP")) != NULL) {
+ putenv(concat("TEMP=", p));
+ putenv(concat("TMP=", p));
+ }
+ }
+}
+
+/* Returns the home directory, in external format */
+static char *
+get_home_directory (void)
+{
+ char *found_home_directory = NULL;
+
+ if ((found_home_directory = getenv("HOME")) != NULL) {
+ char q[MAXPATHLEN];
+ /* In case it is %HOMEDRIVE%%HOMEPATH% */
+ if (ExpandEnvironmentStrings(found_home_directory, q, sizeof(q)) == 0) {
+ /* Error */
+ found_home_directory = NULL;
+ }
+ else {
+ found_home_directory = xstrdup(q);
+ goto done;
+ }
+ }
+
+ {
+ char *homedrive, *homepath;
+ if ((homedrive = getenv("HOMEDRIVE")) != NULL &&
+ (homepath = getenv("HOMEPATH")) != NULL) {
+ found_home_directory = concat(homedrive, homepath);
+ goto done;
+ }
+ }
+
+ /* This method is the prefered one because even if it requires a more recent shell32.dll,
+ it does not need to call SHMalloc()->Free() */
+ {
+ /* This will probably give the wrong value */
+ char q [MAXPATHLEN];
+ HINSTANCE h;
+ pSHGetSpecialFolderPathA p1;
+ pGetDesktopWindow p2;
+ HWND hwnd = NULL;
+
+ if ((h = LoadLibrary("user32.dll"))) {
+ if ((p2 = (pGetDesktopWindow)GetProcAddress(h, "GetDesktopWindow")))
+ hwnd = (*p2)();
+ FreeLibrary(h);
+ }
+
+ if (hwnd && (h = LoadLibrary("shell32.dll"))) {
+ if ((p1 = (pSHGetSpecialFolderPathA)GetProcAddress(h, "SHGetSpecialFolderPathA")))
+ if ((*p1)(hwnd, q, CSIDL_PERSONAL, TRUE)) {
+ found_home_directory = xstrdup(q);
+ }
+ FreeLibrary(h);
+ }
+ if (found_home_directory) goto done;
+ }
+
+ if (1) {
+ fprintf(stderr, "kpathsea has been unable to determine a good value for the user's $HOME\n"
+ " directory, and will be using the value:\n"
+ " %s\n"
+ " This is probably incorrect.\n",
+ found_home_directory
+ );
+ }
+ done:
+ return found_home_directory;
+}
+
+
+/* Consider cached volume information to be stale if older than 10s,
+ at least for non-local drives. Info for fixed drives is never stale. */
+#define DRIVE_INDEX( c ) ( (c) <= 'Z' ? (c) - 'A' : (c) - 'a' )
+#define VOLINFO_STILL_VALID( root_dir, info ) \
+ ( ( isalpha (root_dir[0]) ) \
+ || GetTickCount () - info->timestamp < 10000 )
+
+
+/* Normalize filename by converting all path separators to
+ the specified separator. Also conditionally convert upper
+ case path name components to lower case.
+ Returns the index of the first meaningful char in the path
+ past any drive specifier of unc name specifier.
+ Remove any multiple path separators after a leading
+ drive specifier or double path separator.
+*/
+
+static int
+normalize_filename (char *fp, char path_sep)
+{
+ char *p;
+ int ret, i;
+
+ /* Always lower-case drive letters a-z, even if the filesystem
+ preserves case in filenames.
+ This is so filenames can be compared by string comparison
+ functions that are case-sensitive. Even case-preserving filesystems
+ do not distinguish case in drive letters. */
+ if (fp[1] == ':' && *fp >= 'A' && *fp <= 'Z') {
+ *fp += 'a' - 'A';
+ }
+
+ /* Remove unneeded double slashes */
+ ret = (IS_UNC_NAME(fp) ? 2 :
+ NAME_BEGINS_WITH_DEVICE(fp) ?
+ (IS_DIR_SEP(*(fp+2)) ? 3 : 2) : IS_DIR_SEP(*fp) ? 1 : 0);
+ for (i = ret, p = fp+i;
+ IS_DIR_SEP(*p);
+ i++, p++);
+ if (i > ret) {
+ int len = strlen(fp+i);
+ /* remove unneeded slashes, for the sake of win95 */
+#if 0
+ fprintf(stderr, "moving %s to %s\n", fp+ret, fp+i);
+#endif
+ memmove (fp+ret, fp+i, len+1);
+ }
+
+ /* conditionnally rewrite to same path_sep, slash preferably */
+ if (path_sep) {
+ for (p = fp; *p; p++)
+ if (IS_DIR_SEP(*p))
+ *p = path_sep;
+ }
+
+#if 0
+ fprintf(stderr, "normalize_filename returned (%d) %s\n", ret, fp);
+#endif
+
+ return ret;
+}
+
+
+/* Destructively turn backslashes into slashes. */
+#if 0 /* unused */
+static void
+dostounix_filename (char *p)
+{
+ normalize_filename (p, '/');
+}
+#endif
+
+/* Destructively turn slashes into backslashes. */
+static void
+unixtodos_filename (char *p)
+{
+ normalize_filename (p, '\\');
+}
+
+/* Remove all CR's that are followed by a LF.
+ (From msdos.c...probably should figure out a way to share it,
+ although this code isn't going to ever change.) */
+#if 0 /* unused */
+static int
+crlf_to_lf (int n, unsigned char *buf, unsigned *lf_count)
+{
+ unsigned char *np = buf;
+ unsigned char *startp = buf;
+ unsigned char *endp = buf + n;
+
+ if (n == 0)
+ return n;
+ while (buf < endp - 1)
+ {
+ if (*buf == 0x0a)
+ (*lf_count)++;
+ if (*buf == 0x0d)
+ {
+ if (*(++buf) != 0x0a)
+ *np++ = 0x0d;
+ }
+ else
+ *np++ = *buf++;
+ }
+ if (buf < endp)
+ {
+ if (*buf == 0x0a)
+ (*lf_count)++;
+ *np++ = *buf++;
+ }
+ return np - startp;
+}
+#endif
+
+/* Parse the root part of file name, if present. Return length and
+ optionally store pointer to char after root. */
+static int
+_parse_root (char * name, char ** pPath)
+{
+ char * start = name;
+
+ if (name == NULL)
+ return 0;
+
+ /* find the root name of the volume if given */
+ if (isalpha (name[0]) && name[1] == ':')
+ {
+ /* skip past drive specifier */
+ name += 2;
+ if (IS_DIR_SEP (name[0]))
+ name++;
+ }
+ else if (IS_DIR_SEP (name[0]) && IS_DIR_SEP (name[1]))
+ {
+ int slashes = 2;
+ name += 2;
+ do
+ {
+ if (IS_DIR_SEP (*name) && --slashes == 0)
+ break;
+ name++;
+ }
+ while ( *name );
+ if (IS_DIR_SEP (name[0]))
+ name++;
+ }
+
+ if (pPath)
+ *pPath = name;
+
+ return name - start;
+}
+
+/* Get long base name for name; name is assumed to be absolute. */
+static int
+get_long_basename (char * name, char * buf, int size)
+{
+ WIN32_FIND_DATA find_data;
+ HANDLE dir_handle;
+ int len = 0;
+#ifdef PIGSFLY
+ char *p;
+
+ /* If the last component of NAME has a wildcard character,
+ return it as the basename. */
+ p = name + strlen (name);
+ while (*p != '\\' && *p != ':' && p > name) p--;
+ if (p > name) p++;
+ if (strchr (p, '*') || strchr (p, '?'))
+ {
+ if ((len = strlen (p)) < size)
+ memcpy (buf, p, len + 1);
+ else
+ len = 0;
+ return len;
+ }
+#endif
+
+ dir_handle = FindFirstFile (name, &find_data);
+ if (dir_handle != INVALID_HANDLE_VALUE)
+ {
+ if ((len = strlen (find_data.cFileName)) < size)
+ memcpy (buf, find_data.cFileName, len + 1);
+ else
+ len = 0;
+ FindClose (dir_handle);
+ }
+ return len;
+}
+
+/* Get long name for file, if possible (assumed to be absolute). */
+BOOL
+win32_get_long_filename (char * name, char * buf, int size)
+{
+ char * o = buf;
+ char * p;
+ char * q;
+ char full[ MAX_PATH ];
+ int len;
+
+ len = strlen (name);
+ if (len >= MAX_PATH)
+ return FALSE;
+
+ /* Use local copy for destructive modification. */
+ memcpy (full, name, len+1);
+ unixtodos_filename (full);
+
+ /* Copy root part verbatim. */
+ len = _parse_root (full, &p);
+ memcpy (o, full, len);
+ o += len;
+ size -= len;
+
+ do
+ {
+ q = p;
+ p = strchr (q, '\\');
+ if (p) *p = '\0';
+ len = get_long_basename (full, o, size);
+ if (len > 0)
+ {
+ o += len;
+ size -= len;
+ if (p != NULL)
+ {
+ *p++ = '\\';
+ if (size < 2)
+ return FALSE;
+ *o++ = '\\';
+ size--;
+ *o = '\0';
+ }
+ }
+ else
+ return FALSE;
+ }
+ while (p != NULL && *p);
+
+ return TRUE;
+}
+
+/* special TeXLive Ghostscript */
+
+static int is_dir (char *buff)
+{
+ struct stat stats;
+
+ return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode);
+}
+
+/*
+ TeXlive uses its own gs in
+ $SELFAUTOPARENT/tlpkg/tlgs
+*/
+void texlive_gs_init(void)
+{
+ char *nptr, *path;
+ char tlgsbindir[512];
+ char tlgslibdir[512];
+ char resourcedir[512];
+ nptr = kpse_var_value("TEXLIVE_WINDOWS_EXTERNAL_GS");
+ if (nptr == NULL || *nptr == '0' || *nptr == 'n' || *nptr == 'f') {
+ if (nptr)
+ free (nptr);
+ nptr = kpse_var_value("SELFAUTOPARENT");
+ if (nptr) {
+ strcpy(tlgsbindir, nptr);
+ strcat(tlgsbindir,"/tlpkg/tlgs");
+ strcpy(resourcedir, tlgsbindir);
+ strcat(resourcedir, "/Resource");
+ if(is_dir(tlgsbindir)) {
+ strcpy(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/lib;");
+ if(is_dir(resourcedir)) {
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/fonts;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/Resource/Init;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/Resource;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/kanji");
+ } else {
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/fonts");
+ }
+ strcat(tlgsbindir, "/bin;");
+ free(nptr);
+ for(nptr = tlgsbindir; *nptr; nptr++) {
+ if(*nptr == '/') *nptr = '\\';
+ }
+ nptr = getenv("PATH");
+ path = (char *)malloc(strlen(nptr) + strlen(tlgsbindir) + 6);
+ strcpy(path, tlgsbindir);
+ strcat(path, nptr);
+ xputenv("PATH", path);
+ xputenv("GS_LIB", tlgslibdir);
+ }
+ }
+ } else {
+ free (nptr);
+ }
+}
+
+#endif /* __MINGW32__ */
diff --git a/Build/source/texk/kpathsea/mingw32.h b/Build/source/texk/kpathsea/mingw32.h
new file mode 100644
index 00000000000..cfa49a65737
--- /dev/null
+++ b/Build/source/texk/kpathsea/mingw32.h
@@ -0,0 +1,97 @@
+/* mingw32.h: declarations for mingw32.
+
+ Copyright 2009-2016 Taco Hoekwater <taco@luatex.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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _MINGW32_H_
+#define _MINGW32_H_
+
+/* We need GetLongPathName and perhaps others. */
+#if !defined WINVER || WINVER < 0x0500
+#undef WINVER
+#define WINVER 0x0500
+#endif
+
+#include <stdlib.h>
+/* The embedded rndnpc.h defines boolean as 'unsigned char',
+ and we do not want that.
+ This should be safe as long as we don't use npc ourselves. */
+#define boolean saved_boolean
+/* With WINVER >= 0x0403 winuser.h declares INPUT as `struct tagINPUT`,
+ and we do not want that. */
+#define INPUT saved_INPUT
+#include <windows.h>
+#include <winerror.h>
+#include <winnt.h>
+#undef boolean
+#undef INPUT
+#include <dirent.h>
+#include <direct.h>
+#include <fcntl.h>
+#include <ctype.h>
+
+/* sys/types.h defines off_t as `long' and we do not want that.
+ We need to include unistd.h and sys/stat.h using off_t
+ before defining off_t (no need to include wchar.h). */
+#include <unistd.h>
+#include <sys/stat.h>
+#define off_t off64_t
+#define ftello ftello64
+#define fseeko fseeko64
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN _MAX_PATH
+#endif
+
+#ifndef MAX_PIPES
+#define MAX_PIPES 128
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+extern void init_user_info (void);
+extern BOOL look_for_cmd (const char *, char **);
+extern char *quote_args(char **);
+
+#endif /* MAKE_KPSE_DLL */
+
+extern KPSEDLL BOOL win32_get_long_filename (char *, char *, int);
+extern KPSEDLL void texlive_gs_init (void);
+extern KPSEDLL double win32_floor (double);
+
+static inline FILE *
+win32_popen (const char *command, const char *fmode)
+{
+ char mode[3];
+
+ /* We always use binary mode */
+ mode[0] = fmode[0];
+ mode[1] = 'b';
+ mode[2] = '\0';
+
+ return _popen (command, mode);
+}
+#undef popen
+#define popen(cmd, mode) win32_popen(cmd, mode)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/Build/source/texk/kpathsea/path-elt.c b/Build/source/texk/kpathsea/path-elt.c
new file mode 100644
index 00000000000..5666e30b615
--- /dev/null
+++ b/Build/source/texk/kpathsea/path-elt.c
@@ -0,0 +1,146 @@
+/* path-elt.c: return the stuff between colons.
+
+ Copyright 1993, 1996, 2008, 2016, 2018 Karl Berry.
+ Copyright 1997, 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/pathsearch.h>
+
+
+/* Upon entry, the static `path' is at the first (and perhaps last)
+ character of the return value, or else NULL if we're at the end (or
+ haven't been called). I make no provision for caching the results;
+ thus, we parse the same path over and over, on every lookup. If that
+ turns out to be a significant lose, it can be fixed, but I'm guessing
+ disk accesses overwhelm everything else. If ENV_P is true, use
+ IS_KPSE_SEP; else use IS_DIR_SEP. */
+
+static string
+element (kpathsea kpse, const_string passed_path, boolean env_p)
+{
+ const_string p;
+ string ret;
+ int brace_level;
+ unsigned len;
+
+ if (passed_path)
+ kpse->path = passed_path;
+ /* Check if called with NULL, and no previous path (perhaps we reached
+ the end). */
+ else if (!kpse->path)
+ return NULL;
+
+ /* OK, we have a non-null `path' if we get here. */
+ assert (kpse->path);
+ p = kpse->path;
+
+ /* Find the next path separator not enclosed by braces (or the end of
+ the path). Here we want to check for either : or ; because we might
+ be called with the ;-using paths from the default texmf.cnf, e.g.,
+ with kpsewhich --expand-braces or kpsewhich --var-value, while on a
+ Unix system. Otherwise, the path elements are not parsed and thus ~
+ expansion (for example), does not happen except on the first element.
+ https://github.com/TeX-Live/texlive-source/issues/3 */
+ brace_level = 0;
+ while (*p != 0 && !(brace_level == 0
+ && (env_p ? IS_KPSE_SEP (*p) : IS_DIR_SEP (*p)))) {
+ if (*p == '{') ++brace_level;
+ else if (*p == '}') --brace_level;
+#if defined(WIN32)
+ else if (kpathsea_IS_KANJI(kpse, p))
+ p++;
+#endif
+ p++;
+ }
+
+ /* Return the substring starting at `path'. */
+ len = p - kpse->path;
+
+ /* Make sure we have enough space (including the null byte). */
+ if (len + 1 > kpse->elt_alloc)
+ {
+ kpse->elt_alloc = len + 1;
+ kpse->elt = (string)xrealloc (kpse->elt, kpse->elt_alloc);
+ }
+
+ strncpy (kpse->elt, kpse->path, len);
+ kpse->elt[len] = 0;
+ ret = kpse->elt;
+
+ /* If we are at the end, return NULL next time. */
+ if (kpse->path[len] == 0)
+ kpse->path = NULL;
+ else
+ kpse->path += len + 1;
+
+ return ret;
+}
+
+string
+kpathsea_path_element (kpathsea kpse, const_string p)
+{
+ return element (kpse, p, true);
+}
+
+string
+kpathsea_filename_component (kpathsea kpse, const_string p)
+{
+ return element (kpse, p, false);
+}
+
+#ifdef TEST
+
+void
+print_path_elements (const_string path)
+{
+ string elt;
+ printf ("Elements of `%s':", path ? path : "(null)");
+
+ for (elt = kpathsea_path_element (kpse_def, path); elt != NULL;
+ elt = kpathsea_path_element (kpse_def, NULL))
+ {
+ printf (" %s", *elt ? elt : "`'");
+ }
+
+ puts (".");
+}
+
+int
+main ()
+{
+ /* All lists end with NULL. */
+ print_path_elements (NULL); /* */
+ print_path_elements (""); /* "" */
+ print_path_elements ("a"); /* a */
+ print_path_elements (ENV_SEP_STRING); /* "", "" */
+ print_path_elements (ENV_SEP_STRING ENV_SEP_STRING); /* "", "", "" */
+ print_path_elements ("a" ENV_SEP_STRING); /* a, "" */
+ print_path_elements (ENV_SEP_STRING "b"); /* "", b */
+ print_path_elements ("a" ENV_SEP_STRING "b"); /* a, b */
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST path-elt.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/pathsearch.c b/Build/source/texk/kpathsea/pathsearch.c
new file mode 100644
index 00000000000..778b952a6b3
--- /dev/null
+++ b/Build/source/texk/kpathsea/pathsearch.c
@@ -0,0 +1,932 @@
+/* pathsearch.c: look up a filename in a path.
+
+ Copyright 1993, 1994, 1995, 1997, 2007, 2009-2012, 2018, 2020 Karl Berry.
+ Copyright 1997-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/c-fopen.h>
+#include <kpathsea/absolute.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/db.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/readable.h>
+#include <kpathsea/str-list.h>
+#include <kpathsea/str-llist.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/xopendir.h>
+
+#include <time.h> /* for `time' */
+
+#ifdef __DJGPP__
+#include <sys/stat.h> /* for stat bits */
+#endif
+
+#ifdef WIN32
+#undef fputs
+#undef puts
+#define fputs win32_fputs
+#define puts win32_puts
+#endif
+
+/* The very first search is for texmf.cnf, called when someone tries to
+ initialize the TFM path or whatever. init_path calls kpse_cnf_get
+ which calls kpse_all_path_search to find all the texmf.cnf's. We
+ need to do various special things in this case, since we obviously
+ don't yet have the configuration files when we're searching for the
+ configuration files. Therefore we have a followup_search member in
+ kpathsea_instance to distinguish the first search from all others. */
+
+
+
+#ifdef KPSE_DEBUG
+/* Print on FH elements of L surrounded by brackets, separated by spaces. */
+
+static void
+print_space_list (FILE *fh, string *l)
+{
+ fputs ("[", fh);
+ while (l && *l) {
+ fputs (*l, fh);
+ l++;
+ if (*l)
+ fputs (" ", fh);
+ }
+ fputs ("]", fh);
+}
+#endif /* KPSE_DEBUG */
+
+/* This function is called after every search (except the first, since
+ we definitely want to allow enabling the logging in texmf.cnf) to
+ record the filename(s) found in $TEXMFLOG. */
+
+static void
+log_search (kpathsea kpse, str_list_type filenames)
+{
+ if (kpse->log_opened == false) {
+ /* Get name from either envvar or config file. Thus, the first time
+ is called, for the first search, we will be opening texmf.cnf
+ and ls-R just to resolve the variable. */
+ string log_name = kpathsea_var_value (kpse, "TEXMFLOG");
+ kpse->log_opened = true;
+ if (log_name) {
+ kpse->log_file = fopen (log_name, FOPEN_A_MODE);
+ if (!kpse->log_file)
+ perror (log_name);
+ free (log_name);
+ }
+ }
+
+ if (
+#ifdef KPSE_DEBUG
+ KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH) ||
+#endif /* KPSE_DEBUG */
+ kpse->log_file) {
+ unsigned e;
+
+ /* FILENAMES should never be null, but safety doesn't hurt. */
+ for (e = 0; e < STR_LIST_LENGTH (filenames) && STR_LIST_ELT (filenames, e);
+ e++) {
+ string filename = STR_LIST_ELT (filenames, e);
+
+ /* Only record absolute filenames, for privacy. */
+ if (kpse->log_file && kpathsea_absolute_p (kpse, filename, false)) {
+ fprintf (kpse->log_file, "%lu %s\n", (long unsigned) time (NULL),
+ filename);
+ }
+
+#ifdef KPSE_DEBUG
+ /* And show them online, if debugging. We've already started the
+ debugging line in `search' and
+ `kpathsea_path_search_list_generic', where this is called, so
+ just print the filename here, don't use DEBUGF. */
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ putc (' ', stderr);
+ fputs (filename, stderr);
+ }
+#endif /* KPSE_DEBUG */
+ }
+ }
+}
+
+/* Either casefold_readable_file or kpathsea_readable_file. We need the
+ type even if we don't have casefolding enabled at compile-time. */
+typedef string (*readable_file_fn_type) (kpathsea, string);
+
+#ifdef MONOCASE_FILENAMES
+/* Don't do any of this fallback casefolding stuff on Windows. */
+#undef KPSE_CASEFOLDING_SEARCH
+#else
+#define KPSE_CASEFOLDING_SEARCH 1
+#endif
+
+#ifdef KPSE_CASEFOLDING_SEARCH
+
+/* Same as kpathsea_readable_file (readable.c), but check
+ case-insensitively on the last file name component. We return the
+ first match (in new memory), or NULL. In practice this is always
+ called after checking the filename as-is, so there's no use in
+ continuing to look for an exact match. The KPSE arg is only passed
+ to kpathsea_readable_file if we have a candidate match.
+
+ Clearly we could do some caching here, but let's see if it's actually
+ necessary, given all the other levels of caching (disk, memory, cpu)
+ that are going on these days. */
+
+static string
+casefold_readable_file (kpathsea kpse, string name)
+{
+ string ret = NULL;
+ const_string this_base_name = xbasename (name);
+ string this_dir_name = xdirname (name);
+ DIR *thisdir = opendir (this_dir_name);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ DEBUGF2 (" casefold_readable_file(%s) in %s => ",
+ this_base_name, this_dir_name);
+ }
+#endif
+
+ /* We can be called with a name like `subdir/somefile', where subdir/
+ does not exist. So the opendir might fail, and that's ok. */
+ if (thisdir) {
+ struct dirent *e;
+
+ while ((e = readdir (thisdir)) != NULL) {
+ /* The standard strcasecmp seems like enough for the comparison? */
+ if (strcasecmp (e->d_name, this_base_name) == 0) {
+ ret = concat3 (this_dir_name, DIR_SEP_STRING, e->d_name);
+ if (kpathsea_readable_file (kpse, ret)) {
+ break; /* success */
+ } else {
+ /* This only happens when the name matches, but the potential file is
+ not actually readable, e.g., a broken symlink. It seems
+ sufficiently unusual to be worth logging. */
+ #ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ fprintf (stderr, "{casefolded candidate %s not readable, continuing}",ret);
+ }
+ #endif
+ free (ret); /* not readable, keep looking */
+ ret = NULL;
+ }
+ }
+ } /* end of readdir loop */
+ xclosedir (thisdir);
+ }
+ free (this_dir_name);
+
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ fputs (ret ? ret : "(nil)", stderr);
+ fputc ('\n', stderr);
+ }
+ return ret;
+}
+#endif /* KPSE_CASEFOLDING_SEARCH */
+
+/* Return a str_list of matches in DIRS of NAME.
+
+ Concatenate each element in DIRS with NAME, assuming each ends with /.
+ If SEARCH_ALL is false, return a list containing just the first
+ readable (according to the READABLE_FILE_P function) regular file.
+ Else continue to search and return them all. In any case, if none,
+ return a list containing just NULL.
+
+ DIRS is modified only in that the directory where a search matches is
+ floated toward the top of the list.
+
+ We keep a single buffer for the potential filenames and reallocate
+ only when necessary. I'm not sure it's noticeably faster, but it
+ does seem cleaner. (We do waste a bit of space in the return
+ value, since we don't shrink it to the final size returned.) */
+
+#define INIT_ALLOC 75 /* Doesn't much matter what this number is. */
+
+static str_list_type
+dir_list_search (kpathsea kpse, str_llist_type *dirs, const_string name,
+ boolean search_all, readable_file_fn_type readable_file_p)
+{
+ str_llist_elt_type *elt;
+ str_llist_elt_type *next_elt;
+ str_list_type ret;
+ unsigned name_len = strlen (name);
+ unsigned allocated = INIT_ALLOC;
+ string potential = (string) xmalloc (allocated);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ const_string casefold =
+#ifdef KPSE_CASEFOLDING_SEARCH
+ (readable_file_p == casefold_readable_file) ? "yes" : "no";
+#else
+ "No";
+#endif
+ DEBUGF3 (" dir_list_search(file=%s, find_all=%d, casefold=%s)\n",
+ name, search_all, casefold);
+ }
+#endif
+
+ ret = str_list_init ();
+
+ for (elt = *dirs; elt; elt = next_elt) {
+ string readable_name;
+ const_string dir = STR_LLIST (*elt);
+ unsigned dir_len = strlen (dir);
+
+ next_elt = STR_LLIST_NEXT (*elt); /* in case elt floats */
+
+ while (dir_len + name_len + 1 > allocated) {
+ allocated += allocated;
+ XRETALLOC (potential, allocated, char);
+ }
+ strcpy (potential, dir);
+ strcat (potential, name);
+
+ readable_name = readable_file_p (kpse, potential);
+ if (readable_name) {
+ str_list_add (&ret, readable_name);
+
+ /* Move this element towards the top of the list. */
+ str_llist_float (dirs, elt);
+
+ /* If caller only wanted one file returned, no need to
+ terminate the list with NULL; the caller knows to only look
+ at the first element. */
+ if (!search_all)
+ return ret;
+
+ /* Start new filename. */
+ allocated = INIT_ALLOC;
+ potential = (string) xmalloc (allocated);
+ }
+ }
+
+ /* If we get here, either we didn't find any files, or we were finding
+ all the files. But we're done with the last filename, anyway. */
+ free (potential);
+
+ return ret;
+}
+
+/* This is analogous to dir_list_search above, except we search for
+ multiple NAMES instead of one (unfortunately the code is duplicated).
+ Absolute or explicitly relative items in NAMES are ignored; the
+ caller (kpathsea_path_search_list_generic) deals with those
+ separately. NAMES[i] is not modified. */
+
+
+static str_list_type
+dir_list_search_list (kpathsea kpse, str_llist_type *dirs, string* names,
+ boolean search_all, readable_file_fn_type readable_file_p)
+{
+ str_llist_elt_type *elt;
+ str_llist_elt_type *next_elt;
+ str_list_type ret;
+ unsigned allocated = INIT_ALLOC;
+ string potential = XTALLOC (allocated, char);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ const_string casefold =
+#ifdef KPSE_CASEFOLDING_SEARCH
+ (readable_file_p == casefold_readable_file) ? "yes" : "no";
+#else
+ "No";
+#endif
+ DEBUGF (" dir_list_search_list(files=");
+ print_space_list (stderr, names);
+ fprintf (stderr, ", find_all=%d, casefold=%s)\n", search_all, casefold);
+ }
+#endif
+
+ ret = str_list_init ();
+
+ for (elt = *dirs; elt; elt = next_elt) {
+ int i;
+ string readable_name;
+ const_string dir = STR_LLIST (*elt);
+ unsigned dir_len = strlen (dir);
+
+ next_elt = STR_LLIST_NEXT (*elt); /* in case elt floats */
+
+ for (i = 0; names[i]; i++) {
+ const_string name = names[i];
+ unsigned name_len;
+
+ /* Don't bother with absolute & explicit relative. */
+ if (kpathsea_absolute_p (kpse, name, true))
+ continue;
+
+ name_len = strlen (name);
+
+ while (dir_len + name_len + 1 > allocated) {
+ allocated += allocated;
+ XRETALLOC (potential, allocated, char);
+ }
+
+ strcpy (potential, dir);
+ strcat (potential + dir_len, name);
+ readable_name = readable_file_p (kpse, potential);
+ if (readable_name) {
+ str_list_add (&ret, readable_name);
+
+ /* Move this element towards the top of the list. */
+ str_llist_float (dirs, elt);
+
+ /* If caller only wanted one file returned, no need to
+ terminate the list with NULL; the caller knows to only look
+ at the first element. */
+ if (!search_all)
+ return ret;
+
+ /* Start new filename. */
+ allocated = INIT_ALLOC;
+ potential = XTALLOC (allocated, char);
+ }
+ }
+ }
+
+ /* If we get here, either we didn't find any files, or we were finding
+ all the files. But we're done with the last filename, anyway. */
+ free (potential);
+
+ return ret;
+}
+
+/* This is called when NAME is absolute or explicitly relative; if it's
+ readable, return a one-element str_list containing it (in new
+ memory); otherwise, return an empty list. (We return a list so as to
+ have the same return value as the path_search function.) We also
+ check case-insensitively if enabled and needed. */
+
+static str_list_type
+absolute_search (kpathsea kpse, string name)
+{
+ str_list_type ret_list;
+ string found;
+
+ /* Some old compilers can't initialize structs. */
+ ret_list = str_list_init ();
+
+ /* Do the first check. */
+ found = kpathsea_readable_file (kpse, name);
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ DEBUGF2 (" absolute_search(%s) => %s\n", name, found ? found : "(nil)");
+ }
+#endif
+ if (found) {
+ found = xstrdup (found); /* Return new memory. */
+ }
+
+#ifdef KPSE_CASEFOLDING_SEARCH
+ /* Do the casefolding search only if both needed and enabled. */
+ if (!found) {
+ if (KPSE_CNF_P (kpathsea_var_value (kpse, "texmf_casefold_search"))) {
+ found = casefold_readable_file (kpse, name);
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ DEBUGF2 (" casefold search(%s) => %s\n",name,found ? found : "(nil)");
+ }
+#endif /* KPSE_DEBUG */
+ }
+ }
+#endif /* KPSE_CASEFOLDING_SEARCH */
+
+ if (found) {
+ /* If we didn't find anything, we'll return an empty list. */
+ str_list_add (&ret_list, found);
+ }
+
+ return ret_list;
+}
+
+/* This is the hard case -- look for NAME in PATH. If ALL is false,
+ return the first file found. Otherwise, search all elements of PATH.
+ We also check case-insensitively if needed and requested. */
+
+static str_list_type
+path_search (kpathsea kpse, const_string path, string name,
+ boolean must_exist, boolean all)
+{
+ string elt;
+ str_list_type ret_list;
+ boolean done = false;
+ ret_list = str_list_init (); /* some compilers lack struct initialization */
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ DEBUGF4 (" path_search(file=%s, must_exist=%d, find_all=%d, path=%s)\n",
+ name, all, must_exist, path);
+ }
+#endif
+
+ for (elt = kpathsea_path_element (kpse, path); !done && elt;
+ elt = kpathsea_path_element (kpse, NULL)) {
+ str_list_type *found;
+ boolean allow_disk_search = true;
+
+ if (*elt == '!' && *(elt + 1) == '!') {
+ /* Those magic leading chars in a path element means don't search the
+ disk for this elt. And move past the magic to get to the name. */
+ allow_disk_search = false;
+ elt += 2;
+ }
+
+ /* See elt-dirs.c for side effects of this function. */
+ kpathsea_normalize_path (kpse, elt);
+
+ /* Try ls-R, unless we're searching for texmf.cnf. Our caller
+ (search), also tests followup_search, and does the resetting. */
+ found = kpse->followup_search ? kpathsea_db_search (kpse, name, elt, all)
+ : NULL;
+
+ /* Search the filesystem if (1) the path spec allows it, and either
+ (2a) we are searching for texmf.cnf; or
+ (2b) no db exists; or
+ (2c) no db's are relevant to this elt; or
+ (3) MUST_EXIST && NAME was not in the db.
+ In (2*), `found' will be NULL.
+ In (3), `found' will be an empty list. */
+ if (allow_disk_search
+ && (!found || (must_exist && !STR_LIST (*found)))) {
+ /* Determine the directories in which to search: */
+ str_llist_type *dirs = kpathsea_element_dirs (kpse, elt);
+ if (dirs && *dirs) {
+ if (!found) {
+ found = XTALLOC1 (str_list_type);
+ }
+ /* Search in the directories: */
+ *found = dir_list_search (kpse, dirs, name, all,
+ kpathsea_readable_file);
+#ifdef KPSE_CASEFOLDING_SEARCH
+ if (!STR_LIST (*found)
+ && KPSE_CNF_P (kpathsea_var_value (kpse,
+ "texmf_casefold_search"))) {
+ /* Nothing found; search again, case-insensitively: */
+ *found = dir_list_search (kpse, dirs, name, all,
+ casefold_readable_file);
+ }
+#endif /* KPSE_CASEFOLDING_SEARCH */
+ }
+ }
+
+ /* Did we find anything? */
+ if (found && STR_LIST (*found)) {
+ if (all) {
+ str_list_concat (&ret_list, *found);
+ } else {
+ str_list_add (&ret_list, STR_LIST_FIRST_ELT (*found));
+ done = true;
+ }
+ }
+
+ /* Free the list space, if any (but not the elements). */
+ if (found) {
+ str_list_free (found);
+ free (found);
+ }
+ }
+
+ return ret_list;
+}
+
+/* Search PATH for ORIGINAL_NAME. If ALL is false, or ORIGINAL_NAME is
+ absolute_p, check ORIGINAL_NAME itself. Otherwise, look at each
+ element of PATH for the first readable ORIGINAL_NAME.
+
+ Always return a list; if no files are found, the list will
+ contain just NULL. If ALL is true, the list will be
+ terminated with NULL.
+
+ This function is a special case of kpathsea_path_search_list_generic
+ below (which takes a list of names, instead of a single name, to
+ search for), and so should be rewritten to call it. But this
+ function came first, and life is short, so the code duplication
+ is here. Sorry. Please fix. */
+
+static string *
+search (kpathsea kpse, const_string path, const_string original_name,
+ boolean must_exist, boolean all)
+{
+ str_list_type ret_list;
+ string name;
+ boolean absolute_p;
+#ifdef __DJGPP__
+ /* We will use `stat' heavily, so let's request for
+ the fastest possible version of `stat', by telling
+ it what members of struct stat do we really need.
+
+ We need to set this on each call because this is a
+ library function; the caller might need other options
+ from `stat'. Thus save the flags and restore them
+ before exit.
+
+ This call tells `stat' that we do NOT need to recognize
+ executable files (neither by an extension nor by a magic
+ signature); that we do NOT need time stamp of root directories;
+ and that we do NOT need the write access bit in st_mode.
+
+ Note that `kpse_set_program_name' needs the EXEC bits,
+ but it was already called by the time we get here. */
+ unsigned short save_djgpp_flags = _djstat_flags;
+
+ _djstat_flags = _STAT_EXEC_MAGIC | _STAT_EXEC_EXT
+ | _STAT_ROOT_TIME | _STAT_WRITEBIT;
+#endif
+
+ /* Make a leading ~ count as an absolute filename, and expand $FOO's. */
+ name = kpathsea_expand (kpse, original_name);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ DEBUGF4 ("start search(xname=%s, must_exist=%d, find_all=%d, path=%s).\n",
+ name, must_exist, all, path);
+#endif /* KPSE_DEBUG */
+
+ /* If the first name is absolute or explicitly relative, no need to
+ consider PATH at all. */
+ absolute_p = kpathsea_absolute_p (kpse, name, true);
+
+ /* Find the file(s). */
+ ret_list = absolute_p ? absolute_search (kpse, name)
+ : path_search (kpse, path, name, must_exist, all);
+
+ /* Append NULL terminator if we didn't find anything at all, or we're
+ supposed to find ALL and the list doesn't end in NULL now. */
+ if (STR_LIST_EMPTY (ret_list)
+ || (all && STR_LIST_LAST_ELT (ret_list) != NULL))
+ str_list_add (&ret_list, NULL);
+
+ /* The very first search is for texmf.cnf. We can't log that, since
+ we want to allow setting TEXMFLOG in texmf.cnf. */
+ if (kpse->followup_search == false) {
+ kpse->followup_search = true;
+ } else {
+ /* Record the filenames we found, if desired. And wrap them in a
+ debugging line if we're doing that. */
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ DEBUGF1 ("returning from search(%s) =>", original_name);
+#endif /* KPSE_DEBUG */
+ log_search (kpse, ret_list);
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ putc ('\n', stderr);
+#endif /* KPSE_DEBUG */
+ }
+
+#ifdef __DJGPP__
+ /* Undo any side effects. */
+ _djstat_flags = save_djgpp_flags;
+#endif
+
+ /* Free the expanded name we were passed. It can't be in the return
+ list, since the path directories got unconditionally prepended. */
+ free (name);
+
+ return STR_LIST (ret_list);
+}
+
+/* Search PATH for null-terminated array of NAMES. Always return a list;
+ if no files are found, the list will contain just NULL. If ALL is
+ true, the list will be terminated with NULL (but no NULL terminator
+ if ALL is false). This is a generalization of the `search' fn above. */
+
+string *
+kpathsea_path_search_list_generic (kpathsea kpse,
+ const_string path, string* names,
+ boolean must_exist, boolean all)
+{
+ str_list_type ret_list;
+ string* namep;
+ string elt;
+ boolean done = false;
+ boolean all_absolute = true;
+#ifdef __DJGPP__
+ /* See DJGPP comments above. */
+ unsigned short save_djgpp_flags = _djstat_flags;
+
+ _djstat_flags = _STAT_EXEC_MAGIC | _STAT_EXEC_EXT
+ | _STAT_ROOT_TIME | _STAT_WRITEBIT;
+#endif
+
+ ret_list = str_list_init ();
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ DEBUGF ("start generic search(files=");
+ print_space_list (stderr, names);
+ fprintf (stderr, ", must_exist=%d, find_all=%d, path=%s)\n",
+ must_exist, all, path);
+ }
+#endif /* KPSE_DEBUG */
+
+ /* kpathsea_find_file_generic in tex-file.c does the variable and
+ tilde expansion, so don't redo that here. Maybe we should have
+ done it differently, but we certainly don't want to create an
+ incompatibility now. */
+
+ /* First catch any absolute or explicit relative names. */
+ for (namep = names; *namep; namep++) {
+ if (kpathsea_absolute_p (kpse, *namep, true)) {
+ str_list_type abs_ret_list = absolute_search (kpse, *namep);
+ /* That search can only return a zero- or one-element list, so: */
+ if (!STR_LIST_EMPTY (abs_ret_list)) {
+ str_list_add (&ret_list, STR_LIST_FIRST_ELT (abs_ret_list));
+ if (!all) { /* if they only wanted one, we're done */
+ goto out;
+ }
+ }
+ } else {
+ all_absolute = false;
+ }
+ }
+ /* Shortcut: if we were only given absolute/explicit relative names,
+ we can skip the rest. Typically, if one name is absolute, they
+ all are, because our caller derived them from each other. */
+ if (all_absolute) {
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ unsigned i;
+ DEBUGF (" generic search: all absolute, candidates are:");
+ /* List might not be NULL-terminated, so can't use print_space_list. */
+ for (i = 0; i < STR_LIST_LENGTH (ret_list); i++) {
+ fprintf (stderr, " %s", STR_LIST_ELT (ret_list, i));
+ }
+ fputs (".\n", stderr);
+ }
+#endif
+ goto out;
+ }
+
+ /* Look at each path element in turn. This is essentially the same
+ code as `path_search' above, unfortunately. */
+ for (elt = kpathsea_path_element (kpse, path); !done && elt;
+ elt = kpathsea_path_element (kpse, NULL)) {
+ str_list_type *found;
+ boolean allow_disk_search = true;
+
+ if (elt[0] == '!' && elt[1] == '!') {
+ /* !! magic string -> disallow disk searches. */
+ allow_disk_search = false;
+ elt += 2;
+ }
+
+ /* See elt-dirs.c for side effects of this function. */
+ kpathsea_normalize_path (kpse, elt);
+
+ /* Try ls-R, unless we're searching for texmf.cnf. */
+ found = kpse->followup_search
+ ? kpathsea_db_search_list (kpse, names, elt, all) : NULL;
+
+ /* Search the filesystem in the same cases as `path_search' above. */
+ if (allow_disk_search
+ && (!found || (must_exist && !STR_LIST (*found)))) {
+ str_llist_type *dirs = kpathsea_element_dirs (kpse, elt);
+ if (dirs && *dirs) {
+ if (!found) {
+ found = XTALLOC1 (str_list_type);
+ }
+ /* Search in the directories: */
+ *found = dir_list_search_list (kpse, dirs, names, all,
+ kpathsea_readable_file);
+#ifdef KPSE_CASEFOLDING_SEARCH
+ if (!STR_LIST (*found) && KPSE_CNF_P (kpathsea_var_value (kpse,
+ "texmf_casefold_search"))) {
+ /* Still nothing; search again, case-insensitively: */
+ *found = dir_list_search_list (kpse, dirs, names, all,
+ casefold_readable_file);
+ }
+#endif
+ }
+ }
+
+ /* Did we find anything? */
+ if (found && STR_LIST (*found)) {
+ if (all) {
+ str_list_concat (&ret_list, *found);
+ } else {
+ str_list_add (&ret_list, STR_LIST_FIRST_ELT (*found));
+ done = true;
+ }
+ }
+ }
+
+ out:
+ /* Uniqify, since our paths can often end up finding the same file
+ more than once. */
+ str_list_uniqify (&ret_list);
+
+ /* Add NULL element to terminate return list if empty or multiple. */
+ if (STR_LIST_EMPTY (ret_list)
+ || (all && STR_LIST_LAST_ELT (ret_list) != NULL))
+ str_list_add (&ret_list, NULL);
+
+ if (kpse->followup_search == false) {
+ kpse->followup_search = true;
+ } else {
+ /* Record the filenames we found, if desired. And wrap them in a
+ debugging line if we're doing that. */
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
+ DEBUGF ("returning from generic search(");
+ print_space_list (stderr, names);
+ fputs (") =>", stderr);
+ }
+#endif /* KPSE_DEBUG */
+ log_search (kpse, ret_list);
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ putc ('\n', stderr);
+#endif /* KPSE_DEBUG */
+ }
+
+#ifdef __DJGPP__
+ /* Undo any side effects. */
+ _djstat_flags = save_djgpp_flags;
+#endif
+
+ return STR_LIST (ret_list);
+}
+
+/* Search PATH for the first NAME according to MUST_EXIST. */
+
+string
+kpathsea_path_search (kpathsea kpse, const_string path, const_string name,
+ boolean must_exist)
+{
+ string *ret_list = search (kpse, path, name, must_exist, false);
+ string ret = *ret_list;
+ free (ret_list);
+ return ret;
+}
+
+/* Search PATH for all files named NAME. Might have been better not
+ to assert `must_exist' here, but it's too late to change. */
+
+string *
+kpathsea_all_path_search (kpathsea kpse, const_string path, const_string name)
+{
+ string *ret = search (kpse, path, name, true, true);
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_path_search (const_string path, const_string name, boolean must_exist)
+{
+ return kpathsea_path_search (kpse_def, path, name, must_exist);
+}
+
+string *
+kpse_all_path_search (const_string path, const_string name)
+{
+ return kpathsea_all_path_search (kpse_def, path, name);
+}
+#endif /* KPSE_COMPAT_API */
+
+
+#ifdef TEST
+
+/* Each element of L on its own line, prefixed by a tab. */
+
+static void
+print_tab_list (string *l)
+{
+ while (l && *l) {
+ if (*l)
+ putchar ('\t');
+ printf ("%s\n", *l);
+ l++;
+ }
+}
+
+static void
+test_path_search (const_string path, const_string file)
+{
+ string answer;
+ string *answer_list;
+
+ printf ("\nSearch %s for %s:\t", path, file);
+ answer = kpse_path_search (path, file, 0);
+ puts (answer ? answer : "(nil)");
+
+ printf ("Search %s for all %s:\t", path, file);
+ answer_list = kpse_all_path_search (path, file);
+ putchar ('\n');
+ print_tab_list (answer_list);
+}
+
+static void
+test_path_search_list_generic (void)
+{
+ const_string path = "/u/karl/.fonts";
+ /* absolute: should return just console/both, because no case
+ sensitive match */
+ // string names[] = { "/u/karl/.fonts/lucidaConsoleDK.otf",
+ // "/u/karl/.fonts/lucidaGrandeMonoDK.otf", NULL };
+
+ /* dirs: should return just grande, because case sensitive wins */
+ // string names[] = { "lucidaConsoleDK.otf", "LucidaGrandeMonoDK.otf", NULL };
+
+ /* dirs: should return just console/both, because no case sensitive match */
+ string names[] = { "lucidaConsoleDK.otf", "lucidaGrandeMonoDK.otf", NULL };
+
+ boolean all;
+ string *answer_list;
+
+ printf ("\nGeneric search %s for ", path);
+ print_space_list (stdout, names);
+ puts (":\t");
+
+ all = false; answer_list
+ = kpathsea_path_search_list_generic (kpse_def, path, names, false, all);
+ puts (answer_list && *answer_list ? *answer_list : "(nil)");
+
+ printf ("\nGeneric search %s for all ", path);
+ print_space_list (stdout, names);
+ puts (":");
+
+ all = true; answer_list
+ = kpathsea_path_search_list_generic (kpse_def, path, names, false, all);
+ print_tab_list (answer_list);
+}
+
+#define TEXFONTS "/usr/local/texlive-rel/texmf-dist/fonts"
+
+int
+main (int argc, char **argv)
+{
+ xputenv ("KPATHSEA_DEBUG", "-1"); /* must be before setting progname */
+ kpse_set_program_name (argv[0], NULL);
+
+ xputenv ("MALLOC_CHECK_", "3");
+ xputenv ("MALLOC_PERTURB_", "75");
+
+ xputenv ("texmf_casefold_search", "1");
+ test_path_search (".:/k", "readme");
+ exit (0);
+ test_path_search_list_generic ();
+ exit (0);
+
+ xputenv ("TEXMFCNF", "/nc");
+ /* casefolding with absolute search: */
+ test_path_search ("/k", "/u/karl/.fonts/lucidaConsoleDK.otf");
+ /* casefolding with directory search: */
+ test_path_search ("/u/karl/.fonts", "Lucidaconsoledk.otf");
+ /* exit (0); */
+ xputenv ("texmf_casefold_search", "0");
+ /* should fail since no casefolding: */
+ test_path_search ("/u/karl/.fonts", "lucidaconsoledk.otf");
+
+ /* All lists end with NULL. */
+ test_path_search (".", "nonexistent");
+ test_path_search (".", "/nonexistent");
+ test_path_search ("/k" ENV_SEP_STRING ".", "README");
+ test_path_search ("/k" ENV_SEP_STRING ".", "/etc/fstab");
+ test_path_search ("." ENV_SEP_STRING TEXFONTS "//", "cmr10.tfm");
+ test_path_search ("." ENV_SEP_STRING TEXFONTS "//", "logo10.tfm");
+ test_path_search (TEXFONTS "//times" ENV_SEP_STRING "."
+ ENV_SEP_STRING ENV_SEP_STRING, "ptmr.vf");
+ test_path_search (TEXFONTS ENV_SEP_STRING
+ "/u/karl/.fonts", "LucidaConsoleDK.otf");
+
+ test_path_search ("~karl", ".profile"); // nil, no ~ expansion on path
+ test_path_search ("/k", "~karl/.profile");
+
+ xputenv ("NONEXIST", "nonexistent");
+ test_path_search (".", "$NONEXIST");
+ xputenv ("KPATHSEA", "kpathsea");
+ test_path_search ("/k" ENV_SEP_STRING "./doc", "$KPATHSEA.texi");
+ test_path_search ("/k" ENV_SEP_STRING "./doc", "${KPATHSEA}.texi");
+ test_path_search ("$KPATHSEA" ENV_SEP_STRING ".", "README");
+ test_path_search ("." ENV_SEP_STRING "$KPATHSEA", "README");
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/* ${wc} is the corresponding build directory.
+ -DMAKE_KPSE_DLL for inlined str_list_init etc.
+ Memory checking: -fsanitize=address or -lefence.
+Local variables:
+standalone-compile-command: "make --no-print-dir -C ${wc} && gcc -g -I. -I.. -I${wc}/.. -DMAKE_KPSE_DLL -DTEST pathsearch.c ${wc}/.libs/libkpathsea.a && ./a.out"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/pathsearch.h b/Build/source/texk/kpathsea/pathsearch.h
new file mode 100644
index 00000000000..057c6c92c03
--- /dev/null
+++ b/Build/source/texk/kpathsea/pathsearch.h
@@ -0,0 +1,116 @@
+/* pathsearch.h: mostly-generic path searching.
+
+ Copyright 1993, 1994, 1996, 1997, 2007, 2008, 2009, 2011, 2012,
+ 2014, 2018 Karl Berry.
+ Copyright 1999-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_PATHSEARCH_H
+#define KPATHSEA_PATHSEARCH_H
+
+#include <kpathsea/c-proto.h>
+
+#include <kpathsea/str-llist.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The naming of all these functions is rather scattered and
+ inconsistent, but they grew over time, and we don't want to change
+ the meaning of existing names. */
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* If PATH is non-null, return its first element (as defined by
+ IS_KPSE_SEP). If it's NULL, return the next element in the previous
+ path, a la strtok. Leading, trailing, or doubled colons result in
+ the empty string. When at the end of PATH, return NULL. In any
+ case, return a pointer to an area that may be overwritten on
+ subsequent calls. */
+extern string kpathsea_path_element (kpathsea kpse, const_string path);
+
+/* Like `kpathsea_path_element', but for filename components (using
+ IS_DIR_SEP). Uses same area as `kpathsea_path_element'. */
+extern string kpathsea_filename_component (kpathsea kpse, const_string path);
+
+/* This function may rewrite its argument to avoid bugs when calling
+ stat() or equivalent under Windows. Also, it returns the index after
+ which the program should start to look for expandable constructs. */
+extern unsigned kpathsea_normalize_path (kpathsea kpse, string elt);
+
+/* Given a path element ELT, return a pointer to a NULL-terminated list
+ of the corresponding (existing) directory or directories, with
+ trailing slashes, or NULL. If ELT is the empty string, check the
+ current working directory.
+
+ It's up to the caller to expand ELT. This is because this routine is
+ most likely only useful to be called from `kpathsea_path_search', which
+ has already assumed expansion has been done. */
+extern str_llist_type *kpathsea_element_dirs (kpathsea kpse, string elt);
+
+#endif /* MAKE_KPSE_DLL */
+
+/* Call `kpathsea_expand' on NAME. If the result is an absolute or
+ explicitly relative filename, check whether it is a readable
+ (regular) file.
+
+ Otherwise, look in each of the directories specified in PATH (also do
+ tilde and variable expansion on elements in PATH), using a prebuilt
+ db (see db.h) if it's relevant for a given path element.
+
+ If the prebuilt db doesn't exist, or if MUST_EXIST is true and NAME
+ isn't found in the prebuilt db, look on the filesystem. (I.e., if
+ MUST_EXIST is false, and NAME isn't found in the db, do *not* look on
+ the filesystem.)
+
+ The caller must expand PATH. This is because it makes more sense to
+ do this once, in advance, instead of for every search.
+
+ In any case, return a matching filename if found, otherwise NULL.
+ If more than one file matches, which one gets returned is
+ unspecified. */
+extern KPSEDLL string kpathsea_path_search
+ (kpathsea kpse, const_string path, const_string name, boolean must_exist);
+
+/* Like `kpathsea_path_search' with MUST_EXIST true, but always return all
+ matches in a NULL-terminated list. */
+extern KPSEDLL string *kpathsea_all_path_search
+ (kpathsea kpse, const_string path, const_string name);
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Search for any of the NAMES in PATH, and allow specifying both
+ MUST_EXIST and ALL. */
+extern string *kpathsea_path_search_list_generic (kpathsea kpse,
+ const_string path, string* names, boolean must_exist, boolean all);
+
+#endif /* MAKE_KPSE_DLL */
+
+#if defined(KPSE_COMPAT_API)
+
+extern KPSEDLL string kpse_path_search
+ (const_string path, const_string name, boolean must_exist);
+extern KPSEDLL string *kpse_all_path_search
+ (const_string path, const_string name);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_PATHSEARCH_H */
diff --git a/Build/source/texk/kpathsea/proginit.c b/Build/source/texk/kpathsea/proginit.c
new file mode 100644
index 00000000000..265b5ebb052
--- /dev/null
+++ b/Build/source/texk/kpathsea/proginit.c
@@ -0,0 +1,85 @@
+/* proginit.c: useful initializations for DVI drivers.
+
+ Copyright 1994, 1995, 1996, 2008 Karl Berry.
+ Copyright 1997, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/proginit.h>
+#include <kpathsea/tex-file.h>
+
+
+/* These initializations were common to all the drivers modified for
+ kpathsea, so a single routine seemed in order. Kind of a bollixed-up
+ mess, but still better than repeating the code. */
+
+void
+kpathsea_init_prog (kpathsea kpse, const_string prefix, unsigned dpi,
+ const_string mode, const_string fallback)
+{
+ string font_var = concat (prefix, "FONTS");
+ string header_var = concat (prefix, "HEADERS");
+ string makepk_var = concat (prefix, "MAKEPK");
+ string size_var = concat (prefix, "SIZES");
+
+ /* Do both `pk_format' and `any_glyph_format' for the sake of xdvi; in
+ general, mktexpk might apply to either, and the program will ask
+ for the one it wants. */
+
+ /* Might have a program-specific name for mktexpk itself. */
+ if (getenv (makepk_var)) {
+ /* If we did, we want to enable the program, I think. */
+ kpathsea_set_program_enabled (kpse, kpse_pk_format, 1, kpse_src_env);
+ kpathsea_set_program_enabled (kpse, kpse_any_glyph_format, 1,kpse_src_env);
+
+ kpse->format_info[kpse_pk_format].program
+ = kpse->format_info[kpse_any_glyph_format].program
+ = getenv (makepk_var);
+ }
+
+ /* A couple font paths have traditionally had application-specific
+ environment variables to override all else; namely, XDVIFONTS and
+ DVIPSHEADERS. So set those if we have them. */
+ kpse->format_info[kpse_pk_format].override_path
+ = kpse->format_info[kpse_gf_format].override_path
+ = kpse->format_info[kpse_any_glyph_format].override_path
+ = kpse->format_info[kpse_tfm_format].override_path
+ = getenv (font_var);
+
+ kpse->format_info[kpse_tex_ps_header_format].override_path
+ = getenv (header_var);
+
+ kpathsea_init_fallback_resolutions (kpse, size_var);
+ kpathsea_xputenv_int (kpse, "MAKETEX_BASE_DPI", dpi);
+ kpse->fallback_font = fallback;
+
+ /* Ugliness. See comments in kpse_make_tex in kpathsea/tex-make.c. */
+ kpathsea_xputenv (kpse, "MAKETEX_MODE", mode ? mode : DIR_SEP_STRING);
+
+ free (font_var);
+ free (header_var);
+ free (makepk_var);
+ free (size_var);
+}
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_init_prog (const_string prefix, unsigned dpi,
+ const_string mode, const_string fallback)
+{
+ kpathsea_init_prog(kpse_def,prefix,dpi,mode,fallback);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/proginit.h b/Build/source/texk/kpathsea/proginit.h
new file mode 100644
index 00000000000..a917c6482f3
--- /dev/null
+++ b/Build/source/texk/kpathsea/proginit.h
@@ -0,0 +1,48 @@
+/* proginit.h: declarations for DVI driver initializations.
+
+ Copyright 1994, 1995, 1996, 2008 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_PROGINIT_H
+#define KPATHSEA_PROGINIT_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Common initializations for DVI drivers -- check for `PREFIX'SIZES and
+ `PREFIX'FONTS environment variables, setenv MAKETEX_MODE to MODE,
+ etc., etc. See the source. */
+
+extern KPSEDLL void
+kpathsea_init_prog (kpathsea kpse, const_string prefix, unsigned dpi,
+ const_string mode, const_string fallback);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL void
+kpse_init_prog (const_string prefix, unsigned dpi, const_string mode,
+ const_string fallback);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_PROGINIT_H */
diff --git a/Build/source/texk/kpathsea/progname.c b/Build/source/texk/kpathsea/progname.c
new file mode 100644
index 00000000000..a984eabc471
--- /dev/null
+++ b/Build/source/texk/kpathsea/progname.c
@@ -0,0 +1,793 @@
+/* progname.c: the executable name we were invoked as; general initialization.
+
+ Copyright 1994, 1996, 1997, 2008-2013, 2016-2019 Karl Berry.
+ Copyright 1998-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/absolute.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/c-pathmx.h>
+#include <kpathsea/c-stat.h>
+#include <kpathsea/pathsearch.h>
+/* For kpse_reset_progname */
+#include <kpathsea/tex-file.h>
+
+
+#if defined(__i386_pc_gnu__)
+#ifndef _S_ISUID
+#define _S_ISUID 04000 /* Set user ID on execution. */
+#endif
+#ifndef _S_ISGID
+#define _S_ISGID 02000 /* Set group ID on execution. */
+#endif
+#ifndef _S_ISVTX
+#define _S_ISVTX 01000 /* Save swapped text after use (sticky). */
+#endif
+#ifndef _S_IREAD
+#define _S_IREAD 0400 /* Read by owner. */
+#endif
+#ifndef _S_IWRITE
+#define _S_IWRITE 0200 /* Write by owner. */
+#endif
+#ifndef _S_IEXEC
+#define _S_IEXEC 0100 /* Execute by owner. */
+#endif
+#endif
+
+/* NeXT does not define the standard macros, but has the equivalent.
+ WIN32 doesn't define them either, and doesn't have them.
+ From: Gregor Hoffleit <flight@mathi.uni-heidelberg.de>. */
+#ifndef S_IXUSR
+#ifdef WIN32
+#define S_IXUSR 0
+#define S_IXGRP 0
+#define S_IXOTH 0
+#else /* not WIN32 */
+#define S_IXUSR 0100
+#endif /* not WIN32 */
+#endif /* not S_IXUSR */
+#ifndef S_IXGRP
+#define S_IXGRP 0010
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH 0001
+#endif
+
+
+#ifndef WIN32
+/* From a standalone program `ll' to expand symlinks written by Kimbo Mundy.
+ Don't bother to compile if we don't have symlinks; thus we can assume
+ / as the separator. Also don't try to use basename, etc., or
+ handle arbitrary filename length. Mixed case function names because
+ that's what kimbo liked. */
+
+#ifdef S_ISLNK
+
+#undef BSIZE
+#define BSIZE 2048 /* sorry */
+
+
+/* Read link FN into SYM. */
+
+static void
+ReadSymLink (char *fn, char *sym)
+{
+ int n = readlink (fn, sym, BSIZE);
+ if (n < 0) {
+ perror (fn);
+ exit (1);
+ }
+ sym[n] = 0;
+}
+
+
+/* Strip first component from S, and also return it in a static buffer. */
+
+static char *
+StripFirst (char *s)
+{
+ static char buf[BSIZE];
+ char *s1;
+
+ /* Find the end of the first path element */
+ for (s1 = s; *s1 && (*s1 != '/' || s1 == s); s1++)
+ ;
+
+ /* Copy it into buf and null-terminate it. */
+ strncpy (buf, s, s1 - s);
+ buf[s1 - s] = 0;
+
+ /* Skip over the leading / (if any) */
+ if (*s1 == '/')
+ ++s1;
+
+ /* Squeeze out the element */
+ while ((*s++ = *s1++) != 0)
+ ;
+
+ return buf;
+}
+
+
+/* Strip last component from S, and also return it in a static buffer. */
+
+static char *
+StripLast (char *s)
+{
+ static char buf[BSIZE];
+ char *s1;
+
+ for (s1 = s + strlen (s); s1 > s && *s1 != '/'; s1--)
+ ;
+ strcpy (buf, s1 + (*s1 == '/'));
+ *s1 = 0;
+
+ return buf;
+}
+
+
+/* Copy first path element from B to A, removing it from B. */
+
+static void
+CopyFirst (char *a, char *b)
+{
+ int length = strlen (a);
+
+ if (length > 0 && a[length - 1] != '/') {
+ a[length] = '/';
+ a[length + 1] = 0;
+ }
+ strcat (a, StripFirst (b));
+}
+
+/* Returns NULL on error, such as an unresolvable symlink. Prints
+ intermediate results if global `ll_verbose' is nonzero. Otherwise,
+ returns a pointer to a static buffer (sorry). */
+
+#define EMPTY_STRING(s) (*(s) == 0)
+#define EX(s) (!EMPTY_STRING (s) && strcmp (s, "/") ? "/" : "")
+#define EXPOS EX(post)
+#define EXPRE EX(pre)
+
+static char *
+expand_symlinks (kpathsea kpse, char *s)
+{
+ static char pre[BSIZE]; /* return value */
+ char post[BSIZE], sym[BSIZE], tmp[BSIZE], before[BSIZE];
+ char *cp;
+ char a;
+ struct stat st;
+ int done;
+
+ strcpy (post, s);
+ strcpy (pre, "");
+
+ while (!EMPTY_STRING (post)) {
+ CopyFirst (pre, post);
+
+ if (lstat (pre, &st) != 0) {
+ fprintf (stderr, "lstat(%s) failed: ", pre);
+ perror (pre);
+ return NULL;
+ }
+
+ if (S_ISLNK (st.st_mode)) {
+ ReadSymLink (pre, sym);
+
+ if (!strncmp (sym, "/", 1)) {
+ if (kpse->ll_verbose)
+ printf ("[%s]%s%s -> [%s]%s%s\n", pre, EXPOS, post, sym, EXPOS,post);
+ strcpy (pre, "");
+
+ } else {
+ a = pre[0]; /* handle links through the root */
+ strcpy (tmp, StripLast (pre));
+ if (EMPTY_STRING (pre) && a == '/')
+ strcpy (pre, "/");
+
+ if (kpse->ll_verbose) {
+ sprintf (before, "%s%s[%s]%s%s", pre, EXPRE, tmp, EXPOS, post);
+ printf ("%s -> %s%s[%s]%s%s\n", before, pre, EXPRE, sym, EXPOS,post);
+ }
+
+ /* Strip "../" path elements from the front of sym; print
+ new result if there were any such elements. */
+ done = 0;
+ a = pre[0]; /* handle links through the root */
+ while (!strncmp (sym, "..", 2)
+ && (sym[2] == 0 || sym[2] == '/')
+ && !EMPTY_STRING (pre)
+ && strcmp (pre, ".")
+ && strcmp (pre, "..")
+ && (strlen (pre) < 3
+ || strcmp (pre + strlen (pre) - 3, "/.."))) {
+ done = 1;
+ StripFirst (sym);
+ StripLast (pre);
+ }
+
+ if (done && kpse->ll_verbose) {
+ for (cp = before; *cp;)
+ *cp++ = ' ';
+ if (strlen (sym))
+ printf ("%s == %s%s%s%s%s\n", before, pre, EXPRE, sym, EXPOS,post);
+ else
+ printf ("%s == %s%s%s\n", before, pre, EXPOS, post);
+ }
+ if (EMPTY_STRING (pre) && a == '/')
+ strcpy (pre, "/");
+ }
+
+ if (!EMPTY_STRING (post) && !EMPTY_STRING (sym))
+ strcat (sym, "/");
+
+ strcat (sym, post);
+ strcpy (post, sym);
+ }
+ }
+
+ return pre;
+}
+#else /* not S_ISLNK */
+#define expand_symlinks(k,s) (s)
+#endif /* not S_ISLNK */
+
+/* Remove .'s and ..'s in DIR, to avoid problems with relative symlinks
+ as the program name, etc. This does not canonicalize symlinks. */
+
+static string
+remove_dots (kpathsea kpse, string dir)
+{
+#ifdef AMIGA
+ return dir;
+#else
+ string c;
+ unsigned len;
+ string ret = NULL;
+
+ for (c = kpathsea_filename_component (kpse, dir); c;
+ c = kpathsea_filename_component (kpse, NULL)) {
+ if (STREQ (c, ".")) {
+ /* If leading ., replace with cwd. Else ignore. */
+ if (!ret) {
+ ret = xgetcwd ();
+ }
+
+ } else if (STREQ (c, "..")) {
+ /* If leading .., start with xdirname (cwd). Else remove last
+ component from ret, if any. */
+ if (!ret) {
+ string dot = xgetcwd ();
+ ret = xdirname (dot);
+ free (dot);
+ } else {
+ unsigned last;
+ string p = NAME_BEGINS_WITH_DEVICE (ret) ? ret + 2 : ret;
+ for (last = strlen (p); last > 0; last--) {
+ if (IS_DIR_SEP_CH (p[last - 1])) {
+ /* If we have `/../', that's the same as `/'. */
+ p[(last > 1 ? last - 1 : 1)] = 0;
+ break;
+ }
+ }
+ }
+
+ } else {
+ /* Not . or ..; just append. Include a directory separator unless
+ our string already ends with one. This also changes all directory
+ separators into the canonical DIR_SEP_STRING. */
+ if (!ret) {
+ ret = concat (NAME_BEGINS_WITH_DEVICE (c) ? "" : DIR_SEP_STRING, c);
+ } else {
+ string temp = ret;
+ len = strlen (ret);
+ ret = concat3 (ret, ret[len - 1] == DIR_SEP ? "" : DIR_SEP_STRING, c);
+ free (temp);
+ }
+ }
+ }
+ assert (ret);
+
+ /* Remove a trailing /, just in case it snuck in. */
+ len = strlen (ret);
+ if (len > 0 && ret[len - 1] == DIR_SEP) {
+ ret[len - 1] = 0;
+ }
+
+ return ret;
+#endif /* not AMIGA */
+}
+
+/* Return directory ARGV0 comes from. Check PATH if ARGV0 is not
+ absolute. If ARGV0 cannot be found (e.g., --progname=nonesuch), quit. */
+
+string
+kpathsea_selfdir (kpathsea kpse, const_string argv0)
+{
+ string name;
+ string ret;
+ string self = NULL;
+
+ if (kpathsea_absolute_p (kpse, argv0, true)) {
+ self = xstrdup (argv0);
+ } else {
+#ifdef AMIGA
+#include <dos.h>
+#include <proto/dos.h>
+#include <proto/exec.h>
+ BPTR lock;
+ struct DosLibrary *DOSBase
+ = (struct DosLibrary *) OpenLibrary ("dos.library", 0L);
+ assert (DOSBase);
+
+ self = xmalloc (BUFSIZ);
+ lock = findpath (argv0);
+ if (lock != ((BPTR) -1)) {
+ if (getpath (lock, self) == -1) {
+ *self = '\0';
+ } else {
+ strcat (self,DIR_SEP_STRING);
+ strcat (self,argv0);
+ }
+ UnLock (lock);
+ }
+ CloseLibrary((struct Library *) DOSBase);
+#else /* not AMIGA */
+ const_string elt;
+ struct stat s;
+
+ /* Have to check PATH. But don't call kpse_path_search since we don't
+ want to search any ls-R's or do anything special with //'s. */
+ for (elt = kpathsea_path_element (kpse, getenv ("PATH")); !self && elt;
+ elt = kpathsea_path_element (kpse, NULL)) {
+ /* UNIX tradition interprets the empty path element as "." */
+ if (*elt == 0) elt = ".";
+
+ name = concat3 (elt, DIR_SEP_STRING, argv0);
+
+ /* In order to do this perfectly, we'd have to check the owner bits only
+ if we are the file owner, and the group bits only if we belong
+ to the file group. That's a lot of work, though, and it's not
+ likely that kpathsea will ever be used with a program that's
+ only executable by some classes and not others. See the
+ `file_status' function in execute_cmd.c in bash for what's
+ necessary if we were to do it right. */
+ if (stat (name, &s) == 0 && s.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)
+ /* Do not stop at directories. */
+ && !S_ISDIR(s.st_mode))
+ self = name;
+ else
+ free (name);
+ }
+#endif /* not AMIGA */
+ }
+
+ /* If argv0 is somehow dir/exename, `self' will still be NULL. */
+ if (!self)
+ self = concat3 (".", DIR_SEP_STRING, argv0);
+
+ /* If we can't expand symlinks (--progname=nonesuch), give up. */
+ name = expand_symlinks (kpse, self);
+ if (!name) {
+ fprintf (stderr, "kpathsea: Can't get directory of program name: %s\n",
+ self);
+ exit (1);
+ }
+
+ /* If we have something real, we can resolve ./ and ../ elements. */
+ name = remove_dots (kpse, name);
+
+#ifndef AMIGA
+ free (self);
+#endif
+
+ ret = xdirname (name);
+ free (name);
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_selfdir (const_string argv0)
+{
+ return kpathsea_selfdir (kpse_def, argv0);
+}
+#endif
+
+#endif /* not WIN32 */
+
+#if defined(WIN32) || defined(__CYGWIN__)
+
+/* Create a list of executable suffixes of files not to be written. */
+#define EXE_SUFFIXES ".com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.ws;.tcl;.py;.pyw"
+
+static void
+mk_suffixlist (kpathsea kpse)
+{
+ char **p;
+ char *q, *r, *v;
+ int n;
+
+#if defined(__CYGWIN__)
+ v = xstrdup (EXE_SUFFIXES);
+#else
+ v = getenv ("PATHEXT");
+ if (v) /* strlwr() exists also in MingW */
+ v = strlwr (xstrdup (v));
+ else
+ v = xstrdup (EXE_SUFFIXES);
+#endif
+
+ q = v;
+ n = 0;
+
+ while ((r = strchr (q, ';')) != NULL) {
+ n++;
+ r++;
+ q = r;
+ }
+ if (*q)
+ n++;
+ kpse->suffixlist = (char **) xmalloc ((n + 2) * sizeof (char *));
+ p = kpse->suffixlist;
+ *p = xstrdup (".dll");
+ p++;
+ q = v;
+ while ((r = strchr (q, ';')) != NULL) {
+ *r = '\0';
+ *p = xstrdup (q);
+ p++;
+ r++;
+ q = r;
+ }
+ if (*q) {
+ *p = xstrdup (q);
+ p++;
+ }
+ *p = NULL;
+ free (v);
+}
+#endif /* WIN32 || __CYGWIN__ */
+
+/* On win32 SELFAUTO{LOC,DIR,PARENT} must not be just `/', otherwise,
+ e.g., $SELFAUTODIR/texmf/tex would be mistaken as UNC name. */
+static inline string
+fix_selfdir (string dir)
+{
+#if defined(WIN32)
+ if (IS_DIR_SEP_CH (*dir) && dir[1] == 0)
+ dir++;
+#endif
+ return dir;
+}
+
+void
+kpathsea_set_program_name (kpathsea kpse, const_string argv0,
+ const_string progname)
+{
+ const_string ext;
+ string sdir, sdir_parent, sdir_grandparent, sdir_greatgrandparent;
+ string s = getenv ("KPATHSEA_DEBUG");
+#ifdef WIN32
+ string debug_output = getenv("KPATHSEA_DEBUG_OUTPUT");
+ string append_debug_output = getenv("KPATHSEA_DEBUG_APPEND");
+ int err, olderr, cp;
+#endif
+
+ /* Set debugging stuff first, in case we end up doing debuggable stuff
+ during this initialization. */
+ if (s) {
+ kpse->debug |= atoi (s);
+ }
+
+#if defined(WIN32)
+ cp = AreFileApisANSI() ? GetACP() : GetOEMCP();
+ if (!kpse->File_system_codepage)
+ kpse->File_system_codepage = cp;
+ kpse->Win32_codepage = cp;
+ if (cp == 932 || cp == 936 || cp == 950) {
+ kpse->Is_cp932_system = cp;
+ }
+ else
+ kpse->Is_cp932_system = 0;
+
+#if defined(__MINGW32__)
+ /* Set various info about user. Among many things,
+ ensure that HOME is set. */
+ init_user_info();
+#else /* !__MINGW32__ */
+ kpse->the_passwd.pw_name = kpse->the_passwd_name;
+ kpse->the_passwd.pw_passwd = kpse->the_passwd_passwd;
+ kpse->the_passwd.pw_uid = 0;
+ kpse->the_passwd.pw_gid = 0;
+ kpse->the_passwd.pw_quota = 0;
+ kpse->the_passwd.pw_gecos = kpse->the_passwd_gecos;
+ kpse->the_passwd.pw_dir = kpse->the_passwd_dir;
+ kpse->the_passwd.pw_shell = kpse->the_passwd_shell;
+ kpse->__system_allow_multiple_cmds = 0;
+
+ /* Set various info about user. Among many things,
+ ensure that HOME is set. */
+ kpathsea_init_user_info(kpse);
+#endif /* !__MINGW32__ */
+
+ /* redirect stderr to debug_output. Easier to send logfiles. */
+ if (debug_output) {
+ int flags = _O_CREAT | _O_TRUNC | _O_RDWR;
+ err = -1;
+ if (_stricmp(debug_output, "con") == 0
+ || _stricmp(debug_output, "con:") == 0) {
+ err = _fileno(stdout);
+ } else {
+ if (append_debug_output) {
+ flags = _O_CREAT | _O_APPEND | _O_WRONLY;
+ } else {
+ flags = _O_CREAT | _O_TRUNC | _O_WRONLY;
+ kpathsea_xputenv(kpse, "KPATHSEA_DEBUG_APPEND", "yes");
+ }
+ }
+
+ if ((err < 0)
+ && (err = _open(debug_output, flags, _S_IREAD | _S_IWRITE)) == -1)
+ {
+ WARNING1 ("kpathsea: Can't open %s for stderr redirection!\n",
+ debug_output);
+ perror (debug_output);
+ } else if ((olderr = _dup(fileno(stderr))) == -1) {
+ WARNING ("kpathsea: Can't dup() stderr!\n");
+ close (err);
+ } else if (_dup2(err, fileno(stderr)) == -1) {
+ WARNING1 ("kpathsea: Can't redirect stderr to %s!\n", debug_output);
+ close (olderr);
+ close (err);
+ } else {
+ close (err);
+ }
+ }
+
+ /* Win95 always gives the short filename for argv0, not the long one.
+ There is only this way to catch it. It makes all the kpse_selfdir
+ stuff useless for win32. */
+ {
+ char short_path[PATH_MAX], path[PATH_MAX], *fp;
+#if !defined(__MINGW32__)
+ HANDLE hnd;
+ WIN32_FIND_DATA ffd;
+#endif
+
+ /* SearchPath() always gives back an absolute directory */
+ if (SearchPath(NULL, argv0, ".exe", PATH_MAX, short_path, &fp) == 0)
+ LIB_FATAL1("Can't determine where the executable %s is.\n", argv0);
+#if defined(__MINGW32__)
+ if (!win32_get_long_filename(short_path, path, sizeof(path))) {
+ LIB_FATAL1("This path points to an invalid file : %s\n", short_path);
+ }
+ /* slashify the dirname */
+ for (fp = path; fp && *fp; fp++)
+ if (IS_DIR_SEP(*fp)) *fp = DIR_SEP;
+#else /* !__MINGW32__ */
+ if (kpathsea_getlongpath(kpse, path, short_path, PATH_MAX) == 0)
+ FATAL1("Can't get long name for %s.\n", short_path);
+ if ((hnd = FindFirstFile(short_path, &ffd)) == INVALID_HANDLE_VALUE)
+ FATAL1("The following path points to an invalid file : %s\n", path);
+ FindClose(hnd);
+ /* dirname aleady slashified in WIN32 */
+#endif /* !__MINGW32__ */
+ /* sdir will be the directory of the executable, ie: c:/TeX/bin */
+ sdir = xdirname(path);
+ kpse->invocation_name = xstrdup(xbasename(path));
+ }
+
+#elif defined(__DJGPP__)
+
+ /* DJGPP programs support long filenames on Windows 95, but ARGV0 there
+ is always made with the short 8+3 aliases of all the pathname elements.
+ If long names are supported, we need to convert that to a long name.
+
+ All we really need is to call `_truename', but most of the code
+ below is required to deal with the special case of networked drives. */
+ if (pathconf (argv0, _PC_NAME_MAX) > 12) {
+ char long_progname[PATH_MAX];
+
+ if (_truename (argv0, long_progname)) {
+ char *fp;
+
+ if (long_progname[1] != ':') {
+ /* A complication: `_truename' returns network-specific string at
+ the beginning of `long_progname' when the program resides on a
+ networked drive, and DOS calls cannot grok such pathnames. We
+ need to convert the filesystem name back to a drive letter. */
+ char rootname[PATH_MAX], rootdir[4];
+
+ if (argv0[0] && argv0[1] == ':')
+ rootdir[0] = argv0[0]; /* explicit drive in `argv0' */
+ else
+ rootdir[0] = getdisk () + 'A';
+ rootdir[1] = ':';
+ rootdir[2] = '\\';
+ rootdir[3] = '\0';
+ if (_truename (rootdir, rootname)) {
+ /* Find out where `rootname' ends in `long_progname' and replace
+ it with the drive letter. */
+ int root_len = strlen (rootname);
+
+ if (IS_DIR_SEP (rootname[root_len - 1]))
+ root_len--; /* keep the trailing slash */
+ long_progname[0] = rootdir[0];
+ long_progname[1] = ':';
+ memmove (long_progname + 2, long_progname + root_len,
+ strlen (long_progname + root_len) + 1);
+ }
+ }
+
+ /* Convert everything to canonical form. */
+ if (long_progname[0] >= 'A' && long_progname[0] <= 'Z')
+ long_progname[0] += 'a' - 'A'; /* make drive lower case, for beauty */
+ for (fp = long_progname; *fp; fp++)
+ if (IS_DIR_SEP (*fp))
+ *fp = DIR_SEP;
+
+ kpse->invocation_name = xstrdup (long_progname);
+ }
+ else
+ /* If `_truename' failed, God help them, because we won't... */
+ kpse->invocation_name = xstrdup (argv0);
+ }
+ else
+ kpse->invocation_name = xstrdup (argv0);
+
+#else /* !WIN32 && !__DJGPP__ */
+ kpse->invocation_name = xstrdup (argv0);
+#endif
+
+ /* We need to find SELFAUTOLOC *before* removing the ".exe" suffix from
+ the program_name, otherwise the PATH search inside kpse_selfdir will fail,
+ since `prog' doesn't exists as a file, there's `prog.exe' instead. */
+#ifndef WIN32
+ sdir = kpathsea_selfdir (kpse, kpse->invocation_name);
+#endif
+ /* SELFAUTODIR is actually the parent of the invocation directory,
+ and SELFAUTOPARENT the grandparent. This is how teTeX did it. */
+ kpathsea_xputenv (kpse, "SELFAUTOLOC", fix_selfdir (sdir));
+ sdir_parent = xdirname (sdir);
+ kpathsea_xputenv (kpse, "SELFAUTODIR", fix_selfdir (sdir_parent));
+ sdir_grandparent = xdirname (sdir_parent);
+ kpathsea_xputenv (kpse, "SELFAUTOPARENT", fix_selfdir (sdir_grandparent));
+ sdir_greatgrandparent = xdirname (sdir_grandparent);
+ kpathsea_xputenv (kpse, "SELFAUTOGRANDPARENT", fix_selfdir (sdir_greatgrandparent));
+
+#if defined(WIN32) || defined(__CYGWIN__)
+ mk_suffixlist(kpse);
+#endif /* WIN32 || __CYGWIN__ */
+
+ free (sdir);
+ free (sdir_parent);
+ free (sdir_grandparent);
+ free (sdir_greatgrandparent);
+
+ kpse->invocation_short_name
+ = xstrdup (xbasename (kpse->invocation_name));
+
+ if (progname) {
+ kpse->program_name = xstrdup (progname);
+ } else {
+ /* If configured --enable-shared and running from the build directory
+ with the wrapper scripts (e.g., for make check), the binaries will
+ be named foo.exe instead of foo. Or possibly if we're running on a
+ DOSISH system. */
+ ext = find_suffix (kpse->invocation_short_name);
+ if (ext && FILESTRCASEEQ (ext, "exe")) {
+ kpse->program_name = remove_suffix (kpse->invocation_short_name);
+ } else {
+ kpse->program_name = xstrdup (kpse->invocation_short_name);
+ }
+ }
+
+ /* Runtime check that snprintf always writes a trailing NUL byte. */
+ {
+ char buf[4] = "old";
+ assert (snprintf (buf, 2, "a") == 1 && buf[1] == '\0');
+ assert ((unsigned)snprintf (buf, 2, "ab") >= 2 && buf[1] == '\0');
+ assert ((unsigned)snprintf (buf, 2, "abc") >= 2 && buf[1] == '\0');
+ }
+ /* Some of the utility routines (like atou() and xfopen()) will use
+ FATAL and variations thereof (see lib.h) if there is a problem.
+
+ The next trick makes it possible for that message to report some useful
+ name instead of (NULL), if the backward compatible is compiled in. */
+
+#if defined (KPSE_COMPAT_API)
+ if (kpse!=kpse_def) {
+ kpse_def->invocation_name = xstrdup(kpse->invocation_name);
+ kpse_def->invocation_short_name = xstrdup(kpse->invocation_short_name);
+ }
+#endif
+
+ kpathsea_xputenv (kpse, "progname", kpse->program_name);
+}
+
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_set_program_name (const_string argv0, const_string progname)
+{
+ kpathsea_set_program_name (kpse_def, argv0, progname);
+}
+#endif
+
+/* Returns ARGV0 with any leading path and on some systems the suffix
+ for executables stripped off. This returns a new string.
+ For example, `kpse_program_basename ("/foo/bar.EXE")' returns "bar"
+ on WIndows or Cygwin and "bar.EXE" otherwise. */
+
+string
+kpse_program_basename (const_string argv0)
+{
+ string base = xstrdup (xbasename (argv0));
+#ifdef EXEEXT
+ string dot = strrchr (base, '.');
+ if (dot && FILESTRCASEEQ (dot, EXEEXT))
+ *dot = 0;
+#endif
+ return base;
+}
+
+
+#ifdef TEST
+static const char *tab[] = {
+/* 'normal' names */
+ "/w/kpathsea",
+ "/w//kpathsea",
+ "/w/./kpathsea",
+ ".",
+ "./",
+ "./.",
+ "../kpathsea",
+ "/kpathsea/../foo",
+ "/../w/kpathsea",
+ "/../w/kpathsea/.",
+ "/te/share/texmf/../../../../bin/gnu",
+ NULL
+};
+
+int
+main (int argc, char **argv)
+{
+ const char **p;
+ kpathsea kpse = xcalloc(1, sizeof(kpathsea_instance));
+
+ kpathsea_set_program_name(kpse, argv[0], NULL);
+
+#if defined(WIN32)
+ printf("\n%s: Nothing to do for WIN32\n",
+ kpse->invocation_short_name);
+#else
+ printf("\n%s: name -> remove_dots(name)\n\n",
+ kpse->invocation_short_name);
+
+ for (p = tab; *p; p++) {
+ char *q = xstrdup(*p);
+ char *s = remove_dots(kpse, q);
+
+ printf("%s -> %s\n", q, s);
+ free (q);
+ free (s);
+ }
+#endif
+
+ return 0;
+}
+#endif /* TEST */
diff --git a/Build/source/texk/kpathsea/progname.h b/Build/source/texk/kpathsea/progname.h
new file mode 100644
index 00000000000..b5c1c43afbd
--- /dev/null
+++ b/Build/source/texk/kpathsea/progname.h
@@ -0,0 +1,70 @@
+/* progname.h: Declarations for argv[0] equivalents.
+
+ Copyright 1994, 1996, 2008, 2010-2019 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_PROGNAME_H
+#define KPATHSEA_PROGNAME_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return directory ARGV0 comes from. Check PATH if ARGV0 is not
+ absolute. */
+
+#if !defined (WIN32)
+extern KPSEDLL string kpathsea_selfdir (kpathsea kpse, const_string argv0);
+#endif
+
+/* Set the two members `invocation_name' and `invocation_short_name'
+ in the KPSE instance to a copy of ARGV0 and everything in ARGV0 after
+ the last directory separator, respectively. Set `program_name' (also in
+ the KPSE instance) to a copy of PROGNAME or the value of
+ kpse_invocation_short_name if PROGNAME is NULL. This function also
+ sets the SELFAUTO* environment variables. */
+
+extern KPSEDLL void kpathsea_set_program_name (kpathsea kpse,
+ const_string argv0, const_string progname);
+
+/* See also `kpathsea_reset_program_name', which is defined in tex-file.c.
+ That function is to be used to set kpse->program_name to a different
+ value. It clears the path searching information, to ensure that
+ the search paths are appropriate to the new name. */
+
+
+#if defined (KPSE_COMPAT_API)
+#if !defined (WIN32)
+extern KPSEDLL string kpse_selfdir (const_string argv0);
+#endif
+
+extern KPSEDLL void kpse_set_program_name (const_string argv0,
+ const_string progname);
+#endif /* KPSE_COMPAT_API */
+
+/* Returns ARGV0 with any leading path and on some systems the suffix
+ for executables stripped off. This returns a new string. */
+
+extern KPSEDLL string kpse_program_basename (const_string argv0);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_PROGNAME_H */
diff --git a/Build/source/texk/kpathsea/putenv.c b/Build/source/texk/kpathsea/putenv.c
new file mode 100644
index 00000000000..34cbd3add89
--- /dev/null
+++ b/Build/source/texk/kpathsea/putenv.c
@@ -0,0 +1,110 @@
+/****************************************************************/
+/* */
+/* putenv(3) */
+/* */
+/* Change or add an environment entry */
+/* */
+/****************************************************************/
+/* origination 1987-Oct-7 T. Holm */
+/****************************************************************/
+
+/*
+Path: hoptoad!pacbell!ames!ll-xn!mit-eddie!uw-beaver!ssc-vax!uvicctr!tholm
+From: tholm@uvicctr.UUCP (Terrence W. Holm)
+Newsgroups: comp.os.minix
+Subject: putenv(3)
+Message-ID: <395@uvicctr.UUCP>
+Date: 5 May 88 06:40:52 GMT
+Organization: University of Victoria, Victoria B.C. Canada
+
+EFTH Minix report #2 - May 1988 - putenv(3)
+
+This is an implementation of putenv(3) that we
+wrote for Minix. Please consider this a public
+domain program.
+*/
+
+#define NULL 0
+#define PSIZE sizeof(char *)
+
+extern char **environ;
+
+char *strchr();
+char *malloc();
+
+/****************************************************************/
+/* */
+/* int */
+/* putenv( entry ) */
+/* */
+/* The "entry" should follow the form */
+/* "NAME=VALUE". This routine will search the */
+/* user environment for "NAME" and replace its */
+/* value with "VALUE". */
+/* */
+/* Note that "entry" is not copied, it is used */
+/* as the environment entry. This means that it */
+/* must not be unallocated or otherwise modifed */
+/* by the caller, unless it is replaced by a */
+/* subsequent putenv(). */
+/* */
+/* If the name is not found in the environment, */
+/* then a new vector of pointers is allocated, */
+/* "entry" is put at the end and the global */
+/* variable "environ" is updated. */
+/* */
+/* This function normally returns 0, but -1 */
+/* is returned if it can not allocate enough */
+/* space using malloc(3), or "entry" does not */
+/* contain a '='. */
+/* */
+/****************************************************************/
+
+
+int
+putenv( entry )
+ char *entry;
+{
+ unsigned length;
+ unsigned size;
+ char *temp;
+ char **p;
+ char **new_environ;
+
+ /* Find the length of the "NAME=" */
+
+ temp = strchr(entry,'=');
+ if ( temp == 0 )
+ return( -1 );
+
+ length = (unsigned) (temp - entry + 1);
+
+
+ /* Scan through the environment looking for "NAME=" */
+
+ for ( p=environ; *p != 0 ; p++ )
+ if ( strncmp( entry, *p, length ) == 0 )
+ {
+ *p = entry;
+ return( 0 );
+ }
+
+
+ /* The name was not found, build a bigger environment */
+
+ size = p - environ;
+
+ new_environ = (char **) malloc( (size+2)*PSIZE );
+
+ if ( new_environ == (char **) NULL )
+ return( -1 );
+
+ memcpy ((char *) new_environ, (char *) environ, size*PSIZE );
+
+ new_environ[size] = entry;
+ new_environ[size+1] = NULL;
+
+ environ = new_environ;
+
+ return(0);
+}
diff --git a/Build/source/texk/kpathsea/readable.c b/Build/source/texk/kpathsea/readable.c
new file mode 100644
index 00000000000..919bfaa0208
--- /dev/null
+++ b/Build/source/texk/kpathsea/readable.c
@@ -0,0 +1,194 @@
+/* readable.c: check if a filename is a readable non-directory file.
+
+ Copyright 1993, 1995, 1996, 2008, 2011, 2012, 2016, 2018 Karl Berry.
+ Copyright 1998, 1999, 2000, 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-namemx.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/c-pathmx.h>
+#include <kpathsea/c-stat.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/readable.h>
+#include <kpathsea/tex-hush.h>
+
+
+/* If access can read FN, run stat (assigning to stat buffer ST) and
+ check that fn is not a directory. Don't check for just being a
+ regular file, as it is potentially useful to read fifo's or some
+ kinds of devices. */
+
+#ifdef __DJGPP__
+/* `stat' is way too expensive for such a simple job. */
+#define READABLE(kpse, fn, st) \
+ (access ((fn), R_OK) == 0 && access ((fn), D_OK) == -1)
+#elif defined (WIN32)
+/* st must be an unsigned int under Windows */
+static boolean
+READABLE(kpathsea kpse, const_string fn, unsigned int st)
+{
+ wchar_t *fnw;
+ unsigned char *fnn;
+ unsigned char *p;
+ size_t len = strlen(fn);
+
+ fnn = xmalloc(len + 10);
+/*
+ Support very long input path name, longer than _MAX_PATH for
+ Windows, if it really exists and input name is given in
+ full-absolute path in a command line.
+ /../, /./, \..\, \.\ should be excluded (2020/06/06)
+ More than one adjacent directory separators should be
+ excluded. (2020/10/24)
+*/
+ p = strstr(fn, ".\\");
+ if (!p) {
+ p = strstr(fn, "./");
+ }
+ if (!p && len > 2) {
+ p = strstr(fn + 2, "//");
+ }
+ if (!p && len > 2) {
+ p = strstr(fn + 2, "\\\\");
+ }
+ if (!p && len > 2) {
+ p = strstr(fn + 2, "\\/");
+ }
+ if (!p && len > 2) {
+ p = strstr(fn + 2, "/\\");
+ }
+ if (!p && len > 2 && ((fn[0] == '/' && fn[1] == '/') ||
+ (fn[0] == '\\' && fn[1] == '\\' && fn[2] != '?'))) {
+ fn += 2;
+ strcpy (fnn, "\\\\?\\UNC\\");
+ strcat (fnn, fn);
+ } else if (!p && len > 2 && fn[1] == ':') {
+ strcpy (fnn, "\\\\?\\");
+ strcat (fnn, fn);
+ } else {
+ strcpy (fnn, fn);
+ }
+
+ for (p = fnn; *p; p++) {
+ if (*p == '/')
+ *p = '\\';
+ }
+
+ fnw = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnw=NULL);
+ if ((st = GetFileAttributesW(fnw)) != 0xFFFFFFFF) {
+ /* succeeded */
+ errno = 0;
+ } else {
+ switch(GetLastError()) {
+ case ERROR_BUFFER_OVERFLOW:
+ errno = ENAMETOOLONG;
+ break;
+ case ERROR_ACCESS_DENIED:
+ errno = EACCES;
+ break;
+ default :
+ errno = EIO; /* meaningless, will make ret=NULL later */
+ break;
+ }
+ }
+ free (fnn);
+ if (fnw)
+ free (fnw);
+ return ((st != 0xFFFFFFFF) && !(st & FILE_ATTRIBUTE_DIRECTORY));
+}
+#else /* not __DJGPP__ and not WIN32 */
+#define READABLE(kpse, fn, st) \
+ (access((fn), R_OK) == 0 && stat((fn), &(st)) == 0 && !S_ISDIR ((st).st_mode))
+#endif
+
+
+/* POSIX invented the brain-damage of not necessarily truncating
+ filename components; the system's behavior is defined by the value of
+ the symbol _POSIX_NO_TRUNC, but it can't be changed. */
+
+string
+kpathsea_readable_file (kpathsea kpse, string name)
+{
+#ifdef WIN32
+ unsigned int st = 0;
+#else /* ! WIN32 */
+ struct stat st;
+#endif
+
+ kpathsea_normalize_path (kpse, name);
+ if (READABLE (kpse, name, st)) {
+ return name;
+
+#ifdef ENAMETOOLONG
+ } else if (errno == ENAMETOOLONG) {
+ /* Truncate any too-long components in NAME. */
+ unsigned c_len = 0; /* Length of current component. */
+ char *s = name; /* Position in current component. */
+ char *t = name; /* End of allowed length. */
+
+ for (; *s; s++) {
+ if (c_len <= NAME_MAX) {
+ t = s;
+ }
+#if defined(WIN32)
+ if (kpathsea_IS_KANJI (kpse, s)) {
+ s++;
+ c_len += 2;
+ continue;
+ }
+#endif /* WIN32 */
+ if (IS_DIR_SEP (*s) || IS_DEVICE_SEP (*s)) {
+ if (c_len > NAME_MAX) {
+ /* Truncate if past the max for a component. */
+ memmove (t, s, strlen (s) + 1);
+ s = t;
+ }
+ /* At a directory delimiter, reset component length. */
+ c_len = 0;
+ } else {
+ c_len++;
+ }
+ }
+ if (c_len > NAME_MAX) {
+ /* Truncate if past the max for last component. */
+ *t = 0;
+ }
+
+ /* Perhaps some other error will occur with the truncated name, so
+ let's call access again. */
+ if (READABLE (kpse, name, st)) /* Success. */
+ return name;
+#endif /* ENAMETOOLONG */
+
+ } else { /* Some other error. */
+ if (errno == EACCES) { /* Maybe warn them if permissions are bad. */
+ if (!kpathsea_tex_hush (kpse, "readable")) {
+ perror (name);
+ }
+ }
+ }
+
+ return NULL;
+}
+
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_readable_file (string name)
+{
+ return kpathsea_readable_file (kpse_def, name);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/readable.h b/Build/source/texk/kpathsea/readable.h
new file mode 100644
index 00000000000..98e434bbcc2
--- /dev/null
+++ b/Build/source/texk/kpathsea/readable.h
@@ -0,0 +1,43 @@
+/* readable.h: is a file readable?
+
+ Copyright 1993, 2008, 2009, 2018 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_READABLE_H
+#define KPATHSEA_READABLE_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* If NAME is readable and is a regular file, return it (as is). If the
+ error is ENAMETOOLONG, truncate any too-long path components, and if
+ the result is a readable file, return that (in the same memory, since
+ it only got shorter). Otherwise return NULL. */
+extern KPSEDLL string kpathsea_readable_file (kpathsea kpse, string name);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL string kpse_readable_file (string name);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_READABLE_H */
diff --git a/Build/source/texk/kpathsea/readlink.c b/Build/source/texk/kpathsea/readlink.c
new file mode 100644
index 00000000000..1a0fe72c26a
--- /dev/null
+++ b/Build/source/texk/kpathsea/readlink.c
@@ -0,0 +1,77 @@
+/* readlink -- obtain contents of symlink.
+
+ Copyright 2008, 2009 Karl Berry.
+ Copyright 1998, 1999, 2001, 2005 Olaf Weber.
+
+ This program is free software; you can 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.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-pathmx.h>
+#include <kpathsea/c-unistd.h>
+#include <kpathsea/c-stat.h>
+
+#ifdef WIN32
+#include <string.h>
+#endif
+
+/*
+ * readlink name
+ * Returns 0 if name exists and is a symlink, 1 otherwise. The contents
+ * of the link are printed on standard output.
+ */
+
+int
+main (int argc, char **argv)
+{
+#ifdef S_ISLNK
+ int status;
+ char path[PATH_MAX];
+#endif
+
+ if (argc > 1 && strcmp (argv[1], "--help") == 0) {
+ printf("Usage: %s FILE\n\
+ If FILE exists and is a symlink, print the contents of the link and\n\
+ exit successfully. Otherwise print nothing and fail.\n\
+\n\
+--help display this help and exit\n\
+--version output version information and exit\n\n", argv[0]);
+ fputs ("Email bug reports to tex-k@tug.org.\n", stdout);
+ exit(0);
+ } else if (argc > 1 && strcmp (argv[1], "--version") == 0) {
+ printf ("%s (%s)\n\
+Copyright (C) 2009 Olaf Weber & Karl Berry.\n\
+There is NO warranty. You may redistribute this software\n\
+under the terms of the GNU General Public License\n\
+For more information about these matters, see the file named GPL.\n\
+Primary author of %s: Olaf Weber.\n",
+argv[0], KPSEVERSION, argv[0]);
+ exit (0);
+ }
+
+ /* insist on exactly one arg */
+ if (argc != 2) {
+ fprintf(stderr, "%s: Need exactly one argument.\n\
+Try `%s --help' for more information.\n", argv[0], argv[0]);
+ exit(1);
+ }
+
+#ifdef S_ISLNK
+ status = readlink(argv[1], path, PATH_MAX);
+ if (status != -1) {
+ printf("%.*s\n", status, path);
+ return 0;
+ }
+#endif
+ return 1;
+}
diff --git a/Build/source/texk/kpathsea/rm-suffix.c b/Build/source/texk/kpathsea/rm-suffix.c
new file mode 100644
index 00000000000..289847de455
--- /dev/null
+++ b/Build/source/texk/kpathsea/rm-suffix.c
@@ -0,0 +1,41 @@
+/* rm-suffix.c: remove any suffix.
+
+ Copyright 2008, 2011, 2012 Karl Berry.
+ Copyright 1992, 1993, 1995 Free Software Foundation, Inc.
+ Modified for kpathsea by Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+string
+remove_suffix (const_string s)
+{
+ string ret;
+ const_string suffix = find_suffix (s);
+
+ if (suffix)
+ {
+ /* Back up to before the dot. */
+ suffix--;
+ ret = (string) xmalloc (suffix - s + 1);
+ strncpy (ret, s, suffix - s);
+ ret[suffix - s] = 0;
+ }
+ else
+ ret = xstrdup (s);
+
+ return ret;
+}
diff --git a/Build/source/texk/kpathsea/simpletypes.h b/Build/source/texk/kpathsea/simpletypes.h
new file mode 100644
index 00000000000..fc515213562
--- /dev/null
+++ b/Build/source/texk/kpathsea/simpletypes.h
@@ -0,0 +1,68 @@
+/* simpletypes.h: basic string, boolean, etc., that we use in kpathsea.
+
+ This is needed to avoid a loop between types.h and str-llist.h.
+ Otherwise, types.h would have to be included before str-llist.h,
+ because types.h itself also includes str-llist.h, and its following
+ use of str_llist_type would not be defined. So instead we have
+ str-llist.h #include this, instead of the full types.h. All follows
+ from types.h including nearly everything, so that MetaPost can be a
+ threaded library.
+
+ Copyright 1993, 1994, 2008, 2010, 2014 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_SIMPLETYPES_H
+#define KPATHSEA_SIMPLETYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Booleans. */
+/* NeXT wants to define their own boolean type. */
+#ifndef HAVE_BOOLEAN
+#define HAVE_BOOLEAN
+typedef int boolean;
+/* `true' and `false' are reserved words in C++. */
+#ifndef __cplusplus
+#ifndef true
+#define true 1
+#define false 0
+#endif /* not true */
+#endif /* not __cplusplus */
+#endif /* not HAVE_BOOLEAN */
+
+/* The X library (among other things) defines `FALSE' and `TRUE', and so
+ we only want to define them if necessary, for use by application code. */
+#ifndef FALSE
+#define FALSE false
+#define TRUE true
+#endif /* FALSE */
+
+/* The usual null-terminated string. */
+typedef char *string;
+
+/* A pointer to constant data. (ANSI says `const string' is
+ `char * const', which is a constant pointer to non-constant data.) */
+typedef const char *const_string;
+
+/* A generic pointer. */
+typedef void *address;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_TYPES_H */
diff --git a/Build/source/texk/kpathsea/str-list.c b/Build/source/texk/kpathsea/str-list.c
new file mode 100644
index 00000000000..676aaa0ad26
--- /dev/null
+++ b/Build/source/texk/kpathsea/str-list.c
@@ -0,0 +1,151 @@
+/* str-list.c: define routines for string lists.
+
+ Copyright 1993, 2008, 2012, 2018 Karl Berry.
+ Copyright 2001, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/str-list.h>
+
+
+/* See the .h file for comments. */
+
+
+void
+str_list_add (str_list_type *l, string s)
+{
+ STR_LIST_LENGTH (*l)++;
+ XRETALLOC (STR_LIST (*l), STR_LIST_LENGTH (*l), string);
+ STR_LIST_LAST_ELT (*l) = s;
+}
+
+void
+cstr_list_add (cstr_list_type *l, const_string s)
+{
+ STR_LIST_LENGTH (*l)++;
+ XRETALLOC (STR_LIST (*l), STR_LIST_LENGTH (*l), const_string);
+ STR_LIST_LAST_ELT (*l) = s;
+}
+
+
+/* May as well save some reallocations and do everything in a chunk
+ instead of calling str_list_add on each element. */
+
+void
+str_list_concat (str_list_type *target, str_list_type more)
+{
+ unsigned e;
+ unsigned prev_len = STR_LIST_LENGTH (*target);
+
+ STR_LIST_LENGTH (*target) += STR_LIST_LENGTH (more);
+ XRETALLOC (STR_LIST (*target), STR_LIST_LENGTH (*target), string);
+
+ for (e = 0; e < STR_LIST_LENGTH (more); e++) {
+ STR_LIST_ELT (*target, prev_len + e) = STR_LIST_ELT (more, e);
+ }
+}
+
+
+/* Concatenate the elements of MORE to each element of TARGET. This
+ _must_ be done with the first index varying fastest.
+ We free the old elements of TARGET. */
+
+void
+str_list_concat_elements (str_list_type *target, str_list_type more)
+{
+ if (STR_LIST_EMPTY (more)) {
+ return;
+
+ } else if (STR_LIST_EMPTY (*target)) {
+ unsigned i;
+ STR_LIST_LENGTH (*target) = STR_LIST_LENGTH (more);
+ STR_LIST (*target) = (string *) xmalloc (STR_LIST_LENGTH (more)
+ * sizeof (char *));
+ for (i = 0; i != STR_LIST_LENGTH (more); ++i) {
+ STR_LIST_ELT (*target, i) = xstrdup (STR_LIST_ELT (more, i));
+ }
+ return;
+
+ } else {
+ unsigned new_len;
+ char **new_list;
+ unsigned i, j;
+ new_list = (string *) xmalloc (STR_LIST_LENGTH (*target)
+ * STR_LIST_LENGTH (more)
+ * sizeof (char *));
+ new_len = 0;
+ for (j = 0; j != STR_LIST_LENGTH (more); ++j) {
+ for (i = 0; i != STR_LIST_LENGTH (*target); ++i) {
+ new_list[new_len] = concat (STR_LIST_ELT (*target, i),
+ STR_LIST_ELT (more, j));
+ ++new_len;
+ }
+ }
+ for (i = 0; i != STR_LIST_LENGTH(*target); ++i) {
+ free (STR_LIST_ELT (*target, i));
+ }
+ free (STR_LIST (*target));
+ STR_LIST_LENGTH (*target) = new_len;
+ STR_LIST (*target) = new_list;
+ }
+}
+
+
+/* Free the list (but not the elements within it). */
+
+void
+str_list_free (str_list_type *l)
+{
+ if (STR_LIST (*l)) {
+ free (STR_LIST (*l));
+ STR_LIST (*l) = NULL;
+ }
+}
+
+
+
+/* Remove duplicate elements from L, freeing their space. Since our
+ lists are so short, we do a maximally inefficient bubble search. */
+
+void
+str_list_uniqify (str_list_type *l)
+{
+ unsigned e;
+ str_list_type ret = str_list_init ();
+
+ for (e = 0; e < STR_LIST_LENGTH (*l); e++) {
+ string elt1 = STR_LIST_ELT (*l, e);
+ unsigned f;
+ for (f = e + 1; f < STR_LIST_LENGTH (*l); f++) {
+ string elt2 = STR_LIST_ELT (*l, f);
+ /* I don't think our list should ever contain NULL's, but if
+ it does, let it stay and don't bother collapsing multiple
+ NULL's into one. */
+ if (FILESTRCASEEQ (elt1, elt2)) {
+ break;
+ }
+ }
+
+ if (f == STR_LIST_LENGTH (*l)) {
+ str_list_add (&ret, elt1); /* not found */
+ } else {
+ free (elt1); /* duplicate, forget this one */
+ }
+ }
+
+ /* Replace the passed list with what we constructed. */
+ *l = ret;
+}
diff --git a/Build/source/texk/kpathsea/str-list.h b/Build/source/texk/kpathsea/str-list.h
new file mode 100644
index 00000000000..0644f10aac2
--- /dev/null
+++ b/Build/source/texk/kpathsea/str-list.h
@@ -0,0 +1,106 @@
+/* str-list.h: declarations for string lists.
+
+ Copyright 1993, 1994, 2007, 2008, 2010, 2012, 2018 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_STR_LIST_H
+#define KPATHSEA_STR_LIST_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Lists of strings; used for, e.g., directory lists. */
+typedef struct
+{
+ unsigned length;
+ string *list;
+} str_list_type;
+
+/* Lists of const strings; used for, e.g., hash tables. */
+typedef struct
+{
+ unsigned length;
+ const_string *list;
+} cstr_list_type;
+
+#define STR_LIST_LENGTH(l) ((l).length)
+#define STR_LIST_EMPTY(l) (STR_LIST_LENGTH (l) == 0)
+
+#define STR_LIST(l) ((l).list)
+#define STR_LIST_ELT(l, n) (STR_LIST (l)[n])
+#define STR_LIST_FIRST_ELT(l) STR_LIST_ELT ((l), 0)
+#define STR_LIST_LAST_ELT(l) STR_LIST_ELT ((l), STR_LIST_LENGTH (l) - 1)
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Return a new, empty, list. */
+static inline str_list_type
+str_list_init (void)
+{
+ str_list_type ret;
+
+ STR_LIST_LENGTH (ret) = 0;
+ STR_LIST (ret) = NULL;
+
+ return ret;
+}
+static inline cstr_list_type
+cstr_list_init (void)
+{
+ cstr_list_type ret;
+
+ STR_LIST_LENGTH (ret) = 0;
+ STR_LIST (ret) = NULL;
+
+ return ret;
+}
+
+#endif /* MAKE_KPSE_DLL */
+
+/* Append the string S to the list L. It's up to the caller to not
+ deallocate S; we don't copy it. Also up to the caller to terminate
+ the list with a null entry. */
+extern KPSEDLL void str_list_add (str_list_type *l, string s);
+extern KPSEDLL void cstr_list_add (cstr_list_type *l, const_string s);
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Append all the elements from MORE to TARGET. */
+extern void str_list_concat (str_list_type * target, str_list_type more);
+
+/* Free the space for the list elements (but not the list elements
+ themselves). */
+extern void str_list_free (str_list_type *l);
+
+/* Append each element of MORE to each element of TARGET. */
+extern void str_list_concat_elements
+ (str_list_type *target, str_list_type more);
+
+/* Remove duplicate elements from L, freeing their space. */
+extern void str_list_uniqify (str_list_type *l);
+
+#endif /* MAKE_KPSE_DLL */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_STR_LIST_H */
diff --git a/Build/source/texk/kpathsea/str-llist.c b/Build/source/texk/kpathsea/str-llist.c
new file mode 100644
index 00000000000..cea178194cf
--- /dev/null
+++ b/Build/source/texk/kpathsea/str-llist.c
@@ -0,0 +1,93 @@
+/* str-llist.c: implementation of a linked list of strings.
+
+ Copyright 1993, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/str-llist.h>
+
+
+/* Add the new string STR to the end of the list L. */
+
+void
+str_llist_add (str_llist_type *l, string str)
+{
+ str_llist_elt_type *e;
+ str_llist_elt_type *new_elt = XTALLOC1 (str_llist_elt_type);
+
+ /* The new element will be at the end of the list. */
+ STR_LLIST (*new_elt) = str;
+ STR_LLIST_MOVED (*new_elt) = false;
+ STR_LLIST_NEXT (*new_elt) = NULL;
+
+ /* Find the current end of the list. */
+ for (e = *l; e && STR_LLIST_NEXT (*e); e = STR_LLIST_NEXT (*e))
+ ;
+
+ if (!e)
+ *l = new_elt;
+ else
+ STR_LLIST_NEXT (*e) = new_elt;
+}
+
+/* Move an element towards the top. The idea is that when a file is
+ found in a given directory, later files will likely be in that same
+ directory, and looking for the file in all the directories in between
+ is thus a waste. */
+
+void
+str_llist_float (str_llist_type *l, str_llist_elt_type *mover)
+{
+ str_llist_elt_type *last_moved, *unmoved;
+
+ /* If we've already moved this element, never mind. */
+ if (STR_LLIST_MOVED (*mover))
+ return;
+
+ /* Find the first unmoved element (to insert before). We're
+ guaranteed this will terminate, since MOVER itself is currently
+ unmoved, and it must be in L (by hypothesis). */
+ for (last_moved = NULL, unmoved = *l; STR_LLIST_MOVED (*unmoved);
+ last_moved = unmoved, unmoved = STR_LLIST_NEXT (*unmoved))
+ ;
+
+ /* If we are the first unmoved element, nothing to relink. */
+ if (unmoved != mover)
+ { /* Remember `mover's current successor, so we can relink `mover's
+ predecessor to it. */
+ str_llist_elt_type *before_mover;
+ str_llist_elt_type *after_mover = STR_LLIST_NEXT (*mover);
+
+ /* Find `mover's predecessor. */
+ for (before_mover = unmoved; STR_LLIST_NEXT (*before_mover) != mover;
+ before_mover = STR_LLIST_NEXT (*before_mover))
+ ;
+
+ /* `before_mover' now links to `after_mover'. */
+ STR_LLIST_NEXT (*before_mover) = after_mover;
+
+ /* Insert `mover' before `unmoved' and after `last_moved' (or at
+ the head of the list). */
+ STR_LLIST_NEXT (*mover) = unmoved;
+ if (!last_moved)
+ *l = mover;
+ else
+ STR_LLIST_NEXT (*last_moved) = mover;
+ }
+
+ /* We've moved it. */
+ STR_LLIST_MOVED (*mover) = true;
+}
diff --git a/Build/source/texk/kpathsea/str-llist.h b/Build/source/texk/kpathsea/str-llist.h
new file mode 100644
index 00000000000..2d1468c4ace
--- /dev/null
+++ b/Build/source/texk/kpathsea/str-llist.h
@@ -0,0 +1,65 @@
+/* str-llist.h: a linked list of strings,
+
+ It's pretty sad that both this and str-list exist; the reason is
+ that C cannot express iterators very well, and I don't want to change
+ all the for loops.
+
+ Copyright 1993, 1994, 2008, 2010, 2014 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef STR_LLIST_H
+#define STR_LLIST_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/simpletypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* It's a little bizarre to be using the same type for the list and the
+ elements of the list, but no reason not to in this case, I think --
+ we never need a NULL string in the middle of the list, and an extra
+ NULL/NULL element always at the end is inconsequential. */
+
+struct str_llist_elt
+{
+ string str;
+ boolean moved;
+ struct str_llist_elt *next;
+};
+typedef struct str_llist_elt str_llist_elt_type;
+typedef struct str_llist_elt *str_llist_type;
+
+#define STR_LLIST(sl) ((sl).str)
+#define STR_LLIST_MOVED(sl) ((sl).moved)
+#define STR_LLIST_NEXT(sl) ((sl).next)
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Add the new string E to the end of the list L. */
+extern void str_llist_add (str_llist_type *l, string e);
+
+/* Reorganize L so that E is below only other elements that have already
+ been moved. Set `moved' member for E. */
+extern void str_llist_float (str_llist_type *l, str_llist_elt_type *e);
+
+#endif /* MAKE_KPSE_DLL */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not STR_LLIST_H */
diff --git a/Build/source/texk/kpathsea/systypes.h b/Build/source/texk/kpathsea/systypes.h
new file mode 100644
index 00000000000..e6f920c1f44
--- /dev/null
+++ b/Build/source/texk/kpathsea/systypes.h
@@ -0,0 +1,28 @@
+/* c-systypes.h: include <sys/types.h>. It's too bad we need this file,
+ but some systems don't protect <sys/types.h> from multiple inclusions.
+
+ Copyright 1993, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef C_SYSTYPES_H
+#define C_SYSTYPES_H
+
+#include <sys/types.h>
+
+/* This is the symbol that X uses to determine if <sys/types.h> has been
+ read, so we define it. */
+#define __TYPES__
+
+#endif /* not C_SYSTYPES_H */
diff --git a/Build/source/texk/kpathsea/tests/cnfline.test b/Build/source/texk/kpathsea/tests/cnfline.test
new file mode 100755
index 00000000000..bffe8808b9d
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfline.test
@@ -0,0 +1,27 @@
+#!/bin/sh -vx
+# $Id$
+# Copyright 2019 Karl Berry <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+cnf_dir=$srcdir/tests/cnfline
+
+# Just for fun, let's first try the --cnf-line feature to set TEXMFCNF.
+val=`./kpsewhich "--cnf-line=TEXMFCNF=$cnf_dir" --var-value=othervar`
+test x"$val" = x300 || exit 1
+
+# But for the rest, just use the environment, to keep things simpler.
+TEXMFCNF=$cnf_dir; export TEXMFCNF
+
+# Make sure we get expected values from the test texmf.cnf.
+val=`./kpsewhich --var-value=maxpr`
+test x"$val" = x200 || exit 1
+#
+val=`./kpsewhich --progname=foo --var-value=maxpr`
+test x"$val" = x100 || exit 1
+#
+val=`./kpsewhich --var-value=othervar`
+test x"$val" = x300 || exit 1
+
+# Now override on cmd line -- both texmf.cnf values should get overridden.
+val=`./kpsewhich --cnf-line=maxpr=99 --var-value=maxpr`
+test x"$val" = x99 || exit 1
diff --git a/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf b/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
new file mode 100644
index 00000000000..164f25744f5
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
@@ -0,0 +1,5 @@
+# $Id$
+# Public domain. This tiny texmf.cnf is for kpathsea/tests/cnfline.test.
+maxpr=100
+maxpr.kpsewhich=200
+othervar=300
diff --git a/Build/source/texk/kpathsea/tests/cnfnewline.test b/Build/source/texk/kpathsea/tests/cnfnewline.test
new file mode 100755
index 00000000000..9d93984d8f5
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfnewline.test
@@ -0,0 +1,18 @@
+#!/bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2013 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+TEXMFCNF=$srcdir/tests/cnfnewline; export TEXMFCNF
+
+val=`./kpsewhich --debug=-1 --var-value=lastvar`
+test x"$val" = xlastval || exit 1
+
+# verbose for testing.
+#if test x"$val" = xlastval; then
+# echo "$0: ok"
+#else
+# echo "$0: bad, got \`$val'"
+# exit 1
+#fi
diff --git a/Build/source/texk/kpathsea/tests/cnfnewline/texmf.cnf b/Build/source/texk/kpathsea/tests/cnfnewline/texmf.cnf
new file mode 100644
index 00000000000..a3a189023f4
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfnewline/texmf.cnf
@@ -0,0 +1 @@
+lastvar = lastval # with comment, but no final newline \ No newline at end of file
diff --git a/Build/source/texk/kpathsea/tests/cnfnull.test b/Build/source/texk/kpathsea/tests/cnfnull.test
new file mode 100755
index 00000000000..e80d931394c
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfnull.test
@@ -0,0 +1,23 @@
+#!/bin/sh -vx
+# $Id$
+# Copyright 2020 Karl Berry <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+#
+# Test nul (zero) bytes in texmf.cnf.
+
+cnf_dir=cnfnull
+cnf_file=$cnf_dir/texmf.cnf
+
+# Create the texmf.cnf dynamically so we don't have to check in a file
+# containing nul bytes.
+rm -rf $cnf_dir
+mkdir $cnf_dir
+test -d $cnf_dir || exit 1
+printf 'x\0=1\n\0' >$cnf_file || exit 1
+
+val=`./kpsewhich "--cnf-line=TEXMFCNF=$cnf_dir" --var-value=x`
+test x"$val" = x1 || exit 1
+
+# Before we dropped nul bytes in 2020, kpse gave a warning:
+# warning: cnfnull/texmf.cnf:1: (kpathsea) No cnf value on line: x.
+# and did not assign anything (since the string ended with the x).
diff --git a/Build/source/texk/kpathsea/tests/cnfprog.test b/Build/source/texk/kpathsea/tests/cnfprog.test
new file mode 100755
index 00000000000..08f472e2b34
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfprog.test
@@ -0,0 +1,23 @@
+#!/bin/sh -vx
+# $Id$
+# Copyright 2019 Karl Berry <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+# Test strange program name qualifiers which should give warnings.
+
+cnf_dir=$srcdir/tests/cnfprog
+
+# But for the rest, just use the environment, to keep things simpler.
+TEXMFCNF=$cnf_dir; export TEXMFCNF
+
+# Make sure we get expected values from the test texmf.cnf.
+errfile=cnfprog.err
+val=`./kpsewhich --var-value=noequals 2>$errfile`
+
+# the vaiable should not have any value.
+test -z "$val" || exit 1
+
+grep 'Empty program name qualifier' $errfile || exit 1
+grep 'Unlikely character ;' $errfile || exit 1
+grep 'Unlikely character \$' $errfile || exit 1
+
+exit 0
diff --git a/Build/source/texk/kpathsea/tests/cnfprog/texmf.cnf b/Build/source/texk/kpathsea/tests/cnfprog/texmf.cnf
new file mode 100644
index 00000000000..9b7bd3c6219
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfprog/texmf.cnf
@@ -0,0 +1,13 @@
+# $Id$
+# Public domain. This tiny texmf.cnf is for kpathsea/tests/cnfprog.test.
+
+# An empty program name is warned about (as of August 2019).
+justdot. = dval
+
+# Contrary to appearances, this is interpreted as a program name ";val",
+# with no value. A warning is issued.
+noequals .;qval
+
+# Similarly, the "${var}" is a literal string here, not expanded.
+# Again, a warning is issued.
+braceprog.${var} = bval
diff --git a/Build/source/texk/kpathsea/tests/kpseaccess.test b/Build/source/texk/kpathsea/tests/kpseaccess.test
new file mode 100755
index 00000000000..a1630e6ec8e
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/kpseaccess.test
@@ -0,0 +1,51 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+ret=0
+
+pass () {
+ echo "***** unexpected success of './kpseaccess $@'"
+ ret=77
+}
+
+fail () {
+ echo "***** unexpected failure of './kpseaccess $@'"
+ ret=77
+}
+
+./kpseaccess '' nonesuch && exit 1
+./kpseaccess - nonesuch && exit 1
+./kpseaccess r nonesuch && exit 1
+./kpseaccess w nonesuch && exit 1
+./kpseaccess x nonesuch && exit 1
+
+./kpseaccess '' access.o || exit 1
+./kpseaccess - access.o || exit 1
+./kpseaccess rw access.o || exit 1
+# From the access(3p) POSIX manpage:
+# If the process has appropriate privileges, an implementation may indicate
+# success for X_OK even if none of the execute file permission bits are set.
+./kpseaccess x access.o && pass x access.o
+
+# Testing write access to kpseaccess itself might fail with ETXTBSY.
+./kpseaccess rwx kpsewhich || {
+ fail rwx kpsewhich
+ ./kpseaccess r kpsewhich || fail r kpsewhich
+ ./kpseaccess w kpsewhich || fail w kpsewhich
+ ./kpseaccess x kpsewhich || fail x kpsewhich
+}
+
+./kpseaccess r $srcdir/access.c || exit 1
+./kpseaccess x $srcdir/access.c && pass x $srcdir/access.c
+
+if ./kpseaccess w $srcdir/access.c; then
+ echo 'file "$srcdir/access.c" is writable'
+else
+ echo 'file "$srcdir/access.c" is not writable'
+fi
+
+exit $ret
+
diff --git a/Build/source/texk/kpathsea/tests/kpsereadlink.test b/Build/source/texk/kpathsea/tests/kpsereadlink.test
new file mode 100755
index 00000000000..3b3570aa8d2
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/kpsereadlink.test
@@ -0,0 +1,14 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+test "x$LN_S" = 'xln -s' || exit 77
+
+./kpsereadlink $LT_OBJDIR/libkpathsea.lai && exit 1
+
+link=`./kpsereadlink $LT_OBJDIR/libkpathsea.la` || exit 1
+
+test "x$link" = x../libkpathsea.la || exit 1
+
diff --git a/Build/source/texk/kpathsea/tests/kpsestat.test b/Build/source/texk/kpathsea/tests/kpsestat.test
new file mode 100755
index 00000000000..fa25f5a5968
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/kpsestat.test
@@ -0,0 +1,20 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2010 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+./kpsestat = nonesuch 2>/dev/null && exit 1
+
+for f in . kpsestat kpsestat.o; do
+ echo "kpsestat = $f => `./kpsestat = $f`"
+done
+
+for m in -rw g-r u-w o+x -rw,u+s -rw,g+s -rw,o+t; do
+ echo "kpsestat $m kpsestat.o => `./kpsestat $m kpsestat.o`"
+done
+
+echo "kpsestat = \$srcdir => `./kpsestat = $srcdir`"
+echo "kpsestat = \$srcdir/ => `./kpsestat = $srcdir/`"
+echo "kpsestat = \$srcdir/kpsestat.c => `./kpsestat = $srcdir/kpsestat.c`"
+
diff --git a/Build/source/texk/kpathsea/tests/kpsewhich.test b/Build/source/texk/kpathsea/tests/kpsewhich.test
new file mode 100755
index 00000000000..261bf1b17f3
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/kpsewhich.test
@@ -0,0 +1,35 @@
+#! /bin/sh -vx
+# $Id$
+# Copyright 2018 Karl Berry <tex-live@tug.org>
+# Copyright 2010-2013 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+TEXMFCNF=$srcdir
+export TEXMFCNF
+
+./kpsewhich --var-value=TEXMFCNF || exit 1 # environment variable
+./kpsewhich --var-value=TEXMFMAIN || exit 1
+./kpsewhich --expand-var=\$TEXMFMAIN || exit 1
+
+# It turns out --all and no --all go through rather different code
+# in pathsearch.c, so try them both.
+TEXINPUTS=$srcdir/../tests/texmf \
+ ./kpsewhich --casefold-search --all Plain.TeX || exit 1
+TEXINPUTS=$srcdir/../tests/texmf \
+ ./kpsewhich --casefold-search Plain.TeX || exit 1
+#
+# These runs will succeed on case-insensitive (file)systems, so don't
+# run them.
+#TEXINPUTS=$srcdir/../tests/texmf \
+# ./kpsewhich --no-casefold-search --all Plain.TeX && exit 1
+#TEXINPUTS=$srcdir/../tests/texmf \
+# ./kpsewhich --no-casefold-search Plain.TeX && exit 1
+
+TEXINPUTS=$srcdir/../tests/texmf \
+ ./kpsewhich --all plain || exit 1
+
+AFMFONTS=$srcdir/../tests/texmf \
+ ./kpsewhich afmtest.afm || exit 1
+
+BSTINPUTS=$srcdir/../tests/texmf \
+ ./kpsewhich plain.bst || exit 1
diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c
new file mode 100644
index 00000000000..335f13b45f4
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-file.c
@@ -0,0 +1,1480 @@
+/* tex-file.c: high-level file searching by format.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 2007, 2008, 2009, 2010, 2011
+ 2012, 2014, 2016, 2017, 2019 Karl Berry.
+ Copyright 1998-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-fopen.h>
+#include <kpathsea/c-pathch.h>
+#include <stdarg.h>
+#include <kpathsea/cnf.h>
+#include <kpathsea/absolute.h>
+#include <kpathsea/concatn.h>
+#include <kpathsea/default.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/fontmap.h>
+#include <kpathsea/paths.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/tex-file.h>
+#include <kpathsea/tex-make.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/c-ctype.h>
+
+/* These are not in the structure
+ because it's annoying to initialize lists in C. */
+#define GF_ENVS "GFFONTS", GLYPH_ENVS
+#define PK_ENVS "PKFONTS", "TEXPKS", GLYPH_ENVS
+#define GLYPH_ENVS "GLYPHFONTS", "TEXFONTS"
+#define TFM_ENVS "TFMFONTS", "TEXFONTS"
+#define AFM_ENVS "AFMFONTS", "TEXFONTS"
+#define BASE_ENVS "MFBASES", "TEXMFINI"
+#define BIB_ENVS "BIBINPUTS", "TEXBIB"
+#define BST_ENVS "BSTINPUTS"
+#define CNF_ENVS "TEXMFCNF"
+#define DB_ENVS "TEXMFDBS"
+#define FMT_ENVS "TEXFORMATS", "TEXMFINI"
+#define FONTMAP_ENVS "TEXFONTMAPS", "TEXFONTS"
+#define MEM_ENVS "MPMEMS", "TEXMFINI"
+#define MF_ENVS "MFINPUTS"
+#define MFPOOL_ENVS "MFPOOL", "TEXMFINI"
+#define MFT_ENVS "MFTINPUTS"
+#define MP_ENVS "MPINPUTS"
+#define MPPOOL_ENVS "MPPOOL", "TEXMFINI"
+#define MPSUPPORT_ENVS "MPSUPPORT"
+#define OCP_ENVS "OCPINPUTS"
+#define OFM_ENVS "OFMFONTS", "TEXFONTS"
+#define OPL_ENVS "OPLFONTS", "TEXFONTS"
+#define OTP_ENVS "OTPINPUTS"
+#define OVF_ENVS "OVFFONTS", "TEXFONTS"
+#define OVP_ENVS "OVPFONTS", "TEXFONTS"
+#define PICT_ENVS "TEXPICTS", TEX_ENVS
+#define TEX_ENVS "TEXINPUTS"
+#define TEXDOC_ENVS "TEXDOCS"
+#define TEXPOOL_ENVS "TEXPOOL", "TEXMFINI"
+#define TEXSOURCE_ENVS "TEXSOURCES"
+#define TEX_PS_HEADER_ENVS "TEXPSHEADERS", "PSHEADERS"
+#define TROFF_FONT_ENVS "TRFONTS"
+#define TYPE1_ENVS "T1FONTS", "T1INPUTS", "TEXFONTS", TEX_PS_HEADER_ENVS
+#define VF_ENVS "VFFONTS", "TEXFONTS"
+#define DVIPS_CONFIG_ENVS "TEXCONFIG"
+#define IST_ENVS "TEXINDEXSTYLE", "INDEXSTYLE"
+#define TRUETYPE_ENVS "TTFONTS", "TEXFONTS"
+#define TYPE42_ENVS "T42FONTS", "TEXFONTS"
+#define WEB2C_ENVS "WEB2C"
+#define MISCFONTS_ENVS "MISCFONTS", "TEXFONTS"
+#define WEB_ENVS "WEBINPUTS"
+#define CWEB_ENVS "CWEBINPUTS"
+#define ENC_ENVS "ENCFONTS", "TEXFONTS"
+#define CMAP_ENVS "CMAPFONTS", "TEXFONTS"
+#define SFD_ENVS "SFDFONTS", "TEXFONTS"
+#define OPENTYPE_ENVS "OPENTYPEFONTS", "TEXFONTS"
+#define PDFTEXCONFIG_ENVS "PDFTEXCONFIG"
+#define LIG_ENVS "LIGFONTS", "TEXFONTS"
+#define TEXMFSCRIPTS_ENVS "TEXMFSCRIPTS"
+#define LUA_ENVS "LUAINPUTS"
+#define FONTFEATURES_ENVS "FONTFEATURES"
+#define FONTCIDMAPS_ENVS "FONTCIDMAPS"
+#define MLBIB_ENVS "MLBIBINPUTS", BIB_ENVS
+#define MLBST_ENVS "MLBSTINPUTS", BST_ENVS
+#define CLUA_ENVS "CLUAINPUTS"
+#define RIS_ENVS "RISINPUTS"
+#define BLTXML_ENVS "BLTXMLINPUTS"
+
+/* The compiled-in default list, DEFAULT_FONT_SIZES, is intended to be
+ set from the command line (presumably via the Makefile). */
+
+#ifndef DEFAULT_FONT_SIZES
+#define DEFAULT_FONT_SIZES ""
+#endif
+
+void
+kpathsea_init_fallback_resolutions (kpathsea kpse, string envvar)
+{
+ string size;
+ const_string size_var = ENVVAR (envvar, "TEXSIZES");
+ string size_str = getenv (size_var);
+ unsigned *last_resort_sizes = NULL;
+ unsigned size_count = 0;
+ const_string default_sizes = kpse->fallback_resolutions_string
+ ? kpse->fallback_resolutions_string
+ : DEFAULT_FONT_SIZES;
+ string size_list = kpathsea_expand_default (kpse, size_str, default_sizes);
+
+ /* Initialize the list of last-resort sizes. */
+ for (size = kpathsea_path_element (kpse, size_list); size != NULL;
+ size = kpathsea_path_element (kpse, NULL))
+ {
+ unsigned s;
+ if (! *size) /* Skip empty elements. */
+ continue;
+
+ s = atoi (size);
+ if (size_count && s < last_resort_sizes[size_count - 1]) {
+ WARNING1 ("kpathsea: last resort size %s not in ascending order; ignored",
+ size);
+ } else {
+ size_count++;
+ XRETALLOC (last_resort_sizes, size_count, unsigned);
+ last_resort_sizes[size_count - 1] = atoi (size);
+ }
+ }
+
+ /* Add a zero to mark the end of the list. */
+ size_count++;
+ XRETALLOC (last_resort_sizes, size_count, unsigned);
+ last_resort_sizes[size_count - 1] = 0;
+
+ free (size_list);
+
+ kpse->fallback_resolutions = last_resort_sizes;
+}
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_init_fallback_resolutions ( string envvar)
+{
+ kpathsea_init_fallback_resolutions (kpse_def, envvar);
+}
+#endif
+
+
+/* We should be able to set the program arguments in the same way. Not
+ to mention the path values themselves. */
+
+void
+kpathsea_set_program_enabled (kpathsea kpse, kpse_file_format_type fmt,
+ boolean value, kpse_src_type level)
+{
+ kpse_format_info_type *f = &(kpse->format_info[fmt]);
+ if (level >= f->program_enable_level) {
+ f->program_enabled_p = value;
+ f->program_enable_level = level;
+ }
+}
+
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_set_program_enabled (kpse_file_format_type fmt,
+ boolean value, kpse_src_type level)
+{
+ kpathsea_set_program_enabled (kpse_def, fmt, value, level);
+}
+
+#endif
+
+
+/* Web2c and kpsewhich have command-line options to set this stuff. May
+ as well have a common place. */
+
+void
+kpathsea_maketex_option (kpathsea kpse, const_string fmtname, boolean value)
+{
+ kpse_file_format_type fmt = kpse_last_format;
+
+ /* Trying to match up with the suffix lists unfortunately doesn't work
+ well, since that would require initializing the formats. */
+ if (FILESTRCASEEQ (fmtname, "pk")) {
+ fmt = kpse_pk_format;
+ } else if (FILESTRCASEEQ (fmtname, "mf")) {
+ fmt = kpse_mf_format;
+ } else if (FILESTRCASEEQ (fmtname, "tex")) {
+ fmt = kpse_tex_format;
+ } else if (FILESTRCASEEQ (fmtname, "tfm")) {
+ fmt = kpse_tfm_format;
+ } else if (FILESTRCASEEQ (fmtname, "fmt")) {
+ fmt = kpse_fmt_format;
+ } else if (FILESTRCASEEQ (fmtname, "ofm")) {
+ fmt = kpse_ofm_format;
+ } else if (FILESTRCASEEQ (fmtname, "ocp")) {
+ fmt = kpse_ocp_format;
+ } else {
+ fprintf (stderr, "\nkpathsea: Unknown mktex format: %s\n", fmtname);
+ }
+
+ if (fmt != kpse_last_format) {
+ kpathsea_set_program_enabled (kpse, fmt, value, kpse_src_cmdline);
+ }
+}
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_maketex_option (const_string fmtname, boolean value)
+{
+ kpathsea_maketex_option (kpse_def, fmtname, value);
+}
+#endif
+
+
+/* Macro subroutine for `init_path'. EXPAND_DEFAULT calls
+ kpse_expand_default on try_path and the present info->path. */
+#define EXPAND_DEFAULT(try_path, source_string) \
+ if (try_path) { \
+ info->raw_path = try_path; \
+ tmp = info->path; \
+ info->path = kpathsea_expand_default (kpse, try_path, info->path); \
+ free (tmp); \
+ info->path_source = source_string; \
+ }
+
+/* Find the final search path to use for the format entry INFO, given
+ the compile-time default (DEFAULT_PATH), and the environment
+ variables to check (the remaining arguments, terminated with NULL).
+ We set the `path' and `path_source' members of INFO. The
+ `client_path' member must already be set upon entry. */
+
+static void
+init_path (kpathsea kpse, kpse_format_info_type *info,
+ const_string default_path, ...)
+{
+ string env_name;
+ string env_value = NULL;
+ string var = NULL;
+ string tmp;
+ va_list ap;
+
+ info->default_path = default_path;
+
+ va_start (ap, default_path);
+ /* First envvar that's set to a nonempty value will exit the loop. If
+ none are set, we want the first cnf entry that matches. Find the
+ cnf value simultaneously with the envvar value, to avoid having to
+ go through the envvar list twice,
+ that would mean having to create a str_list and use it twice. */
+ while ((env_name = va_arg (ap, string)) != NULL) {
+ /* Since sh doesn't like envvar names with `.', check PATH_prog
+ as well as PATH.prog. */
+ if (!var) { /* Try PATH.prog. */
+ string evar = concat3 (env_name, ".", kpse->program_name);
+ env_value = getenv (evar);
+ if (env_value && *env_value) {
+ var = evar;
+ } else { /* Try PATH_prog. */
+ free (evar);
+ evar = concat3 (env_name, "_", kpse->program_name);
+ env_value = getenv (evar);
+ if (env_value && *env_value) {
+ var = evar;
+ } else { /* Try simply PATH. */
+ free (evar);
+ env_value = getenv (env_name);
+ if (env_value && *env_value) {
+ var = env_name;
+ }
+ }
+ }
+ }
+
+ /* If we are initializing the cnf path, don't try to get any
+ values from the cnf files; that's infinite loop time. */
+ if (!info->cnf_path && info != &(kpse->format_info[kpse_cnf_format]))
+ info->cnf_path = kpathsea_cnf_get (kpse, env_name);
+
+ if (var && info->cnf_path)
+ break;
+ }
+ va_end (ap);
+
+ /* Expand any extra :'s. For each level, we replace an extra : with
+ the path at the next lower level. For example, an extra : in a
+ user-set envvar should be replaced with the path from the cnf file.
+ things are complicated because none of the levels above the very
+ bottom are guaranteed to exist. */
+
+ /* Assume we can reliably start with the compile-time default. */
+ info->raw_path = info->default_path;
+ info->path = xstrdup (info->raw_path);
+ info->path_source = "compile-time paths.h";
+
+ EXPAND_DEFAULT (info->cnf_path, "texmf.cnf");
+ EXPAND_DEFAULT (info->client_path, "program config file");
+
+ if (var) {
+ /* Translate `;' in the envvar into `:' if that's our ENV_SEP. */
+ if (IS_ENV_SEP (':')) {
+ string loc;
+ env_value = xstrdup (env_value); /* Freed below. */
+ for (loc = env_value; *loc; loc++) {
+ if (*loc == ';')
+ *loc = ':';
+ }
+ }
+ EXPAND_DEFAULT (env_value, concat (var, " environment variable"));
+ /* Do not free the copied env_value, because EXPAND_DEFAULT set
+ raw_path to point to it. If it gets overwritten again, tough. */
+ }
+
+ EXPAND_DEFAULT (info->override_path, "application override variable");
+ tmp = info->path;
+ info->path = kpathsea_brace_expand (kpse, info->path);
+ free (tmp);
+}
+
+
+/* Some file types have more than one suffix, and sometimes it is
+ convenient to modify the list of searched suffixes. */
+
+static void
+kpathsea_set_suffixes_va_list (kpathsea kpse, kpse_file_format_type format,
+ boolean alternate, va_list ap)
+{
+ const_string **list;
+ const_string s;
+ int count = 0;
+
+ if (alternate) {
+ list = &(kpse->format_info[format].alt_suffix);
+ } else {
+ list = &(kpse->format_info[format].suffix);
+ }
+
+ while ((s = va_arg (ap, string)) != NULL) {
+ count++;
+ /* This is essentially
+ XRETALLOC (*list, count + 1, const_string);
+ except that MSVC warns without the cast to `void *'. */
+ *list = (const_string *) xrealloc ((void *) *list,
+ (count + 1) * sizeof(const_string));
+ (*list)[count - 1] = s;
+ }
+ (*list)[count] = NULL;
+}
+
+void
+kpathsea_set_suffixes (kpathsea kpse, kpse_file_format_type format,
+ boolean alternate, ...)
+{
+ va_list ap;
+ va_start (ap, alternate);
+ kpathsea_set_suffixes_va_list (kpse, format, alternate, ap);
+ va_end (ap);
+}
+
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_set_suffixes (kpse_file_format_type format,
+ boolean alternate, ...)
+{
+ va_list ap;
+ va_start (ap, alternate);
+ kpathsea_set_suffixes_va_list (kpse_def, format, alternate, ap);
+ va_end (ap);
+}
+#endif
+
+
+/* The path spec we are defining, one element of the global array. */
+#define FMT_INFO (kpse->format_info[format])
+/* Call kpse_set_add_suffixes. */
+#define SUFFIXES(args) kpathsea_set_suffixes(kpse, format, false, args, NULL)
+#define ALT_SUFFIXES(args) kpathsea_set_suffixes(kpse, format, true, args, NULL)
+
+/* Call `init_path', including appending the trailing NULL to the envvar
+ list. Also initialize the fields not needed in setting the path. */
+#define INIT_FORMAT(text, default_path, envs) \
+ FMT_INFO.type = text; \
+ init_path (kpse, &FMT_INFO, default_path, envs, NULL); \
+ envvar_list = concatn_with_spaces (envs, NULL);
+
+
+/* A few file types allow for runtime generation by an external program.
+ kpse_init_prog may have already initialized it (the `program'
+ member). Here we allow people to turn it off or on in the config
+ file, by setting the variable whose name is the uppercasified program
+ name to 0 or 1. */
+
+static void
+init_maketex (kpathsea kpse, kpse_file_format_type fmt,
+ const_string dflt_prog, ...)
+{
+ kpse_format_info_type *f = &(kpse->format_info[fmt]);
+ const_string prog = f->program ? f->program : dflt_prog; /* mktexpk */
+ string PROG = uppercasify (prog); /* MKTEXPK */
+ string progval = kpathsea_var_value (kpse, PROG); /* $ENV/cnf{"MKTEXPK"} */
+ const_string arg;
+ va_list ap;
+
+ /* Doesn't hurt to always set this info. */
+ f->program = prog;
+
+ /* Set up the argument vector. */
+ f->argc = 0;
+ f->argv = XTALLOC (2, const_string);
+ f->argv[f->argc++] = dflt_prog;
+ va_start (ap, dflt_prog);
+ while ((arg = va_arg (ap, string)) != NULL) {
+ f->argc++;
+ f->argv = (const_string *) xrealloc ((void *) f->argv,
+ (f->argc + 1) * sizeof(const_string));
+ f->argv[f->argc - 1] = arg;
+ }
+ va_end (ap);
+ f->argv[f->argc] = NULL;
+
+ if (progval && *progval) {
+ /* This might actually be from an environment variable value, but in
+ that case, we'll have previously set it from kpse_init_prog. */
+ kpathsea_set_program_enabled (kpse, fmt, *progval == '1',
+ kpse_src_client_cnf);
+ }
+
+ free (PROG);
+}
+
+/* We need this twice, so ... */
+#define MKTEXPK_ARGS \
+ "--mfmode","$MAKETEX_MODE",\
+ "--bdpi","$MAKETEX_BASE_DPI",\
+ "--mag","$MAKETEX_MAG",\
+ "--dpi","$KPATHSEA_DPI",\
+ NULL
+
+static string
+remove_dbonly (const_string path)
+{
+ string ret = XTALLOC(strlen (path) + 1, char), q=ret;
+ const_string p=path;
+ boolean new_elt=true;
+
+ while (*p) {
+ if (new_elt && *p && *p == '!' && *(p+1) == '!')
+ p += 2;
+ else {
+ new_elt = (*p == ENV_SEP);
+ *q++ = *p++;
+ }
+ }
+ *q = '\0';
+ return(ret);
+}
+
+/* Same as concatn but puts a space between each element. All this just
+ for nice debugging output. But it's useful. */
+
+static string
+concatn_with_spaces (const_string str1, ...)
+{
+ string arg;
+ string ret;
+ va_list ap;
+
+ if (!str1)
+ return NULL;
+
+ ret = xstrdup (str1);
+
+ va_start (ap, str1);
+ while ((arg = va_arg (ap, string)) != NULL)
+ {
+ string temp = concat3 (ret, " ", arg);
+ free (ret);
+ ret = temp;
+ }
+ va_end (ap);
+
+ return ret;
+}
+
+
+/* Initialize everything for FORMAT. Return its search path. */
+
+const_string
+kpathsea_init_format (kpathsea kpse, kpse_file_format_type format)
+{
+ /* If we get called twice, don't redo all the work. */
+ if (! FMT_INFO.path) {
+ /* Don't care about the list of variable names. */
+ (void) kpathsea_init_format_return_varlist (kpse, format);
+ }
+
+ return FMT_INFO.path;
+}
+
+/* Initialize everything for FORMAT. Return the list of
+ environment/config variable names considered, which is not otherwise
+ saved. Although in principle we could add that list to our format
+ struct, it seems a waste, since this is only used by kpsewhich --help. */
+
+const_string
+kpathsea_init_format_return_varlist(kpathsea kpse,kpse_file_format_type format)
+{
+ string envvar_list; /* only for debug output, set in INIT_FORMAT */
+
+ switch (format)
+ { /* We might be able to avoid repeating `gf' or whatever so many
+ times with token pasting, but it doesn't seem worth it. */
+ case kpse_gf_format:
+ INIT_FORMAT ("gf", DEFAULT_GFFONTS, GF_ENVS);
+ SUFFIXES ("gf");
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_pk_format:
+ init_maketex (kpse, format, "mktexpk", MKTEXPK_ARGS);
+ INIT_FORMAT ("pk", DEFAULT_PKFONTS, PK_ENVS);
+ SUFFIXES ("pk");
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_any_glyph_format:
+ init_maketex (kpse, format, "mktexpk", MKTEXPK_ARGS);
+ INIT_FORMAT ("bitmap font", DEFAULT_GLYPHFONTS, GLYPH_ENVS);
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_tfm_format:
+ /* Must come before kpse_ofm_format. */
+ init_maketex (kpse, format, "mktextfm", NULL);
+ INIT_FORMAT ("tfm", DEFAULT_TFMFONTS, TFM_ENVS);
+ SUFFIXES (".tfm");
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_afm_format:
+ INIT_FORMAT ("afm", DEFAULT_AFMFONTS, AFM_ENVS);
+ SUFFIXES (".afm");
+ break;
+ case kpse_base_format:
+ init_maketex (kpse, format, "mktexfmt", NULL);
+ INIT_FORMAT ("base", DEFAULT_MFBASES, BASE_ENVS);
+ SUFFIXES (".base");
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_bib_format:
+ INIT_FORMAT ("bib", DEFAULT_BIBINPUTS, BIB_ENVS);
+ SUFFIXES (".bib");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_bst_format:
+ INIT_FORMAT ("bst", DEFAULT_BSTINPUTS, BST_ENVS);
+ SUFFIXES (".bst");
+ break;
+ case kpse_cnf_format:
+ INIT_FORMAT ("cnf", DEFAULT_TEXMFCNF, CNF_ENVS);
+ SUFFIXES (".cnf");
+ break;
+ case kpse_db_format:
+ INIT_FORMAT ("ls-R", DEFAULT_TEXMFDBS, DB_ENVS);
+#define LSR_SUFFIXES "ls-R", "ls-r"
+ SUFFIXES (LSR_SUFFIXES);
+ FMT_INFO.path = remove_dbonly (FMT_INFO.path);
+ break;
+ case kpse_fmt_format:
+ init_maketex (kpse, format, "mktexfmt", NULL);
+ INIT_FORMAT ("fmt", DEFAULT_TEXFORMATS, FMT_ENVS);
+ SUFFIXES (".fmt");
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_fontmap_format:
+ INIT_FORMAT ("map", DEFAULT_TEXFONTMAPS, FONTMAP_ENVS);
+ SUFFIXES (".map");
+ break;
+ case kpse_mem_format:
+ init_maketex (kpse, format, "mktexfmt", NULL);
+ INIT_FORMAT ("mem", DEFAULT_MPMEMS, MEM_ENVS);
+ SUFFIXES (".mem");
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_mf_format:
+ init_maketex (kpse, format, "mktexmf", NULL);
+ INIT_FORMAT ("mf", DEFAULT_MFINPUTS, MF_ENVS);
+ SUFFIXES (".mf");
+ break;
+ case kpse_mft_format:
+ INIT_FORMAT ("mft", DEFAULT_MFTINPUTS, MFT_ENVS);
+ SUFFIXES (".mft");
+ break;
+ case kpse_mfpool_format:
+ INIT_FORMAT ("mfpool", DEFAULT_MFPOOL, MFPOOL_ENVS);
+ SUFFIXES (".pool");
+ break;
+ case kpse_mp_format:
+ INIT_FORMAT ("mp", DEFAULT_MPINPUTS, MP_ENVS);
+ SUFFIXES (".mp");
+ break;
+ case kpse_mppool_format:
+ INIT_FORMAT ("mppool", DEFAULT_MPPOOL, MPPOOL_ENVS);
+ SUFFIXES (".pool");
+ break;
+ case kpse_mpsupport_format:
+ INIT_FORMAT ("MetaPost support", DEFAULT_MPSUPPORT, MPSUPPORT_ENVS);
+ break;
+ case kpse_ocp_format:
+ init_maketex (kpse, format, "mkocp", NULL);
+ INIT_FORMAT ("ocp", DEFAULT_OCPINPUTS, OCP_ENVS);
+ SUFFIXES (".ocp");
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_ofm_format:
+ init_maketex (kpse, format, "mkofm", NULL);
+ INIT_FORMAT ("ofm", DEFAULT_OFMFONTS, OFM_ENVS);
+#define OFM_SUFFIXES ".ofm", ".tfm"
+ SUFFIXES (OFM_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_opl_format:
+ INIT_FORMAT ("opl", DEFAULT_OPLFONTS, OPL_ENVS);
+ SUFFIXES (".opl");
+ ALT_SUFFIXES (".pl");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_otp_format:
+ INIT_FORMAT ("otp", DEFAULT_OTPINPUTS, OTP_ENVS);
+ SUFFIXES (".otp");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_ovf_format:
+ INIT_FORMAT ("ovf", DEFAULT_OVFFONTS, OVF_ENVS);
+#define OVF_SUFFIXES ".ovf", ".vf"
+ SUFFIXES (OVF_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_ovp_format:
+ INIT_FORMAT ("ovp", DEFAULT_OVPFONTS, OVP_ENVS);
+ SUFFIXES (".ovp");
+ ALT_SUFFIXES (".vpl");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_pict_format:
+ INIT_FORMAT ("graphic/figure", DEFAULT_TEXINPUTS, PICT_ENVS);
+#define ALT_PICT_SUFFIXES ".eps", ".epsi"
+ ALT_SUFFIXES (ALT_PICT_SUFFIXES);
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_tex_format:
+ init_maketex (kpse, format, "mktextex", NULL);
+ INIT_FORMAT ("tex", DEFAULT_TEXINPUTS, TEX_ENVS);
+ SUFFIXES (".tex");
+ /* TeX files can have any obscure suffix in the world (or none at
+ all). Only check for the most common ones. */
+#define ALT_TEX_SUFFIXES ".sty",".cls",".fd",".aux",".bbl",".def",".clo",".ldf"
+ ALT_SUFFIXES (ALT_TEX_SUFFIXES);
+ break;
+ case kpse_tex_ps_header_format:
+ INIT_FORMAT ("PostScript header", DEFAULT_TEXPSHEADERS,
+ TEX_PS_HEADER_ENVS);
+/* Unfortunately, at one time dvips used this format for type1 fonts. */
+#define ALT_TEXPSHEADER_SUFFIXES ".pro"
+ ALT_SUFFIXES (ALT_TEXPSHEADER_SUFFIXES);
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_texdoc_format:
+ INIT_FORMAT ("TeX system documentation", DEFAULT_TEXDOCS, TEXDOC_ENVS);
+ break;
+ case kpse_texpool_format:
+ INIT_FORMAT ("texpool", DEFAULT_TEXPOOL, TEXPOOL_ENVS);
+ SUFFIXES (".pool");
+ break;
+ case kpse_texsource_format:
+ INIT_FORMAT ("TeX system sources", DEFAULT_TEXSOURCES, TEXSOURCE_ENVS);
+#define ALT_SOURCES_SUFFIXES ".dtx", ".ins"
+ ALT_SUFFIXES (ALT_SOURCES_SUFFIXES);
+ break;
+ case kpse_troff_font_format:
+ INIT_FORMAT ("Troff fonts", DEFAULT_TRFONTS, TROFF_FONT_ENVS);
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_type1_format:
+ INIT_FORMAT ("type1 fonts", DEFAULT_T1FONTS, TYPE1_ENVS);
+#define TYPE1_SUFFIXES ".pfa", ".pfb"
+ SUFFIXES (TYPE1_SUFFIXES);
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_vf_format:
+ INIT_FORMAT ("vf", DEFAULT_VFFONTS, VF_ENVS);
+ SUFFIXES (".vf");
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_dvips_config_format:
+ INIT_FORMAT ("dvips config", DEFAULT_TEXCONFIG, DVIPS_CONFIG_ENVS);
+ break;
+ case kpse_ist_format:
+ INIT_FORMAT ("ist", DEFAULT_INDEXSTYLE, IST_ENVS);
+ SUFFIXES (".ist");
+ break;
+ case kpse_truetype_format:
+ INIT_FORMAT ("truetype fonts", DEFAULT_TTFONTS, TRUETYPE_ENVS);
+#define TRUETYPE_SUFFIXES ".ttf", ".ttc", ".TTF", ".TTC", ".dfont"
+ SUFFIXES (TRUETYPE_SUFFIXES);
+ FMT_INFO.suffix_search_only = false;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_type42_format:
+ INIT_FORMAT ("type42 fonts", DEFAULT_T42FONTS, TYPE42_ENVS);
+#define TYPE42_SUFFIXES ".t42", ".T42"
+ SUFFIXES (TYPE42_SUFFIXES);
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_web2c_format:
+ INIT_FORMAT ("web2c files", DEFAULT_WEB2C, WEB2C_ENVS);
+ break;
+ case kpse_program_text_format:
+ INIT_FORMAT ("other text files",
+ concatn (".", ENV_SEP_STRING, "$TEXMF", DIR_SEP_STRING,
+ kpse->program_name,
+ DIR_SEP_STRING, DIR_SEP_STRING, NULL),
+ concat (uppercasify (kpse->program_name), "INPUTS"));
+ break;
+ case kpse_program_binary_format:
+ INIT_FORMAT ("other binary files",
+ concatn (".", ENV_SEP_STRING, "$TEXMF", DIR_SEP_STRING,
+ kpse->program_name,
+ DIR_SEP_STRING, DIR_SEP_STRING, NULL),
+ concat (uppercasify (kpse->program_name), "INPUTS"));
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_miscfonts_format:
+ INIT_FORMAT ("misc fonts", DEFAULT_MISCFONTS, MISCFONTS_ENVS);
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_web_format:
+ INIT_FORMAT ("web", DEFAULT_WEBINPUTS, WEB_ENVS);
+ SUFFIXES (".web");
+ ALT_SUFFIXES (".ch");
+ break;
+ case kpse_cweb_format:
+ INIT_FORMAT ("cweb", DEFAULT_CWEBINPUTS, CWEB_ENVS);
+#define CWEB_SUFFIXES ".w", ".web"
+ SUFFIXES (CWEB_SUFFIXES);
+ ALT_SUFFIXES (".ch");
+ break;
+ case kpse_enc_format:
+ INIT_FORMAT ("enc files", DEFAULT_ENCFONTS, ENC_ENVS);
+ SUFFIXES (".enc");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_cmap_format:
+ INIT_FORMAT ("cmap files", DEFAULT_CMAPFONTS, CMAP_ENVS);
+ break;
+ case kpse_sfd_format:
+ INIT_FORMAT ("subfont definition files", DEFAULT_SFDFONTS, SFD_ENVS);
+ SUFFIXES (".sfd");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_opentype_format:
+ INIT_FORMAT ("opentype fonts", DEFAULT_OPENTYPEFONTS, OPENTYPE_ENVS);
+#define OPENTYPE_SUFFIXES ".otf", ".OTF"
+ SUFFIXES (OPENTYPE_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ FMT_INFO.binmode = true;
+ break;
+ case kpse_pdftex_config_format:
+ INIT_FORMAT ("pdftex config", DEFAULT_PDFTEXCONFIG, PDFTEXCONFIG_ENVS);
+ break;
+ case kpse_lig_format:
+ INIT_FORMAT ("lig files", DEFAULT_LIGFONTS, LIG_ENVS);
+ SUFFIXES (".lig");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_texmfscripts_format:
+ INIT_FORMAT ("texmfscripts", DEFAULT_TEXMFSCRIPTS, TEXMFSCRIPTS_ENVS);
+ break;
+ case kpse_lua_format:
+ INIT_FORMAT ("lua", DEFAULT_LUAINPUTS, LUA_ENVS);
+#define LUA_SUFFIXES \
+ ".lua", ".luatex", ".luc", ".luctex", ".texlua", ".texluc", ".tlu"
+ SUFFIXES (LUA_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_fea_format:
+ INIT_FORMAT("font feature files", DEFAULT_FONTFEATURES, FONTFEATURES_ENVS);
+ SUFFIXES (".fea");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_cid_format:
+ INIT_FORMAT ("cid maps", DEFAULT_FONTCIDMAPS, FONTCIDMAPS_ENVS);
+#define CID_SUFFIXES ".cid", ".cidmap"
+ SUFFIXES (CID_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_mlbib_format:
+ INIT_FORMAT ("mlbib", DEFAULT_MLBIBINPUTS, MLBIB_ENVS);
+#define MLBIB_SUFFIXES ".mlbib", ".bib"
+ SUFFIXES (MLBIB_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_mlbst_format:
+ INIT_FORMAT ("mlbst", DEFAULT_MLBSTINPUTS, MLBST_ENVS);
+#define MLBST_SUFFIXES ".mlbst", ".bst"
+ SUFFIXES (MLBST_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_clua_format:
+ INIT_FORMAT ("clua", DEFAULT_CLUAINPUTS, CLUA_ENVS);
+#define CLUA_SUFFIXES ".dll", ".so"
+ SUFFIXES (CLUA_SUFFIXES);
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_ris_format:
+ INIT_FORMAT ("ris", DEFAULT_RISINPUTS, RIS_ENVS);
+ SUFFIXES (".ris");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ case kpse_bltxml_format:
+ INIT_FORMAT ("bltxml", DEFAULT_BLTXMLINPUTS, BLTXML_ENVS);
+ SUFFIXES (".bltxml");
+ FMT_INFO.suffix_search_only = true;
+ break;
+ default:
+ LIB_FATAL1 ("kpse_init_format: Unknown format %d", format);
+ }
+
+#ifdef KPSE_DEBUG
+#define MAYBE(member) (FMT_INFO.member ? FMT_INFO.member : "(none)")
+
+ /* Describe the monster we've created. */
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_PATHS)) {
+ if (format == kpse_cnf_format)
+ fputs ("\n", stderr); /* always mid-search, so break log output */
+
+ DEBUGF2 ("Search path for %s files (from %s)\n",
+ FMT_INFO.type, FMT_INFO.path_source);
+ DEBUGF1 (" = %s\n", FMT_INFO.path);
+ DEBUGF1 (" before expansion = %s\n", FMT_INFO.raw_path);
+ DEBUGF1 (" application override path = %s\n", MAYBE (override_path));
+ DEBUGF1 (" application config file path = %s\n", MAYBE (client_path));
+ DEBUGF1 (" texmf.cnf path = %s\n", MAYBE (cnf_path));
+ DEBUGF1 (" compile-time path = %s\n", MAYBE (default_path));
+ DEBUGF1 (" environment variables = %s\n", envvar_list);
+ DEBUGF (" default suffixes =");
+ if (FMT_INFO.suffix) {
+ const_string *ext;
+ for (ext = FMT_INFO.suffix; ext && *ext; ext++) {
+ fprintf (stderr, " %s", *ext);
+ }
+ putc ('\n', stderr);
+ } else {
+ fputs (" (none)\n", stderr);
+ }
+ DEBUGF (" other suffixes =");
+ if (FMT_INFO.alt_suffix) {
+ const_string *alt;
+ for (alt = FMT_INFO.alt_suffix; alt && *alt; alt++) {
+ fprintf (stderr, " %s", *alt);
+ }
+ putc ('\n', stderr);
+ } else {
+ fputs (" (none)\n", stderr);
+ }
+ DEBUGF1 (" search only with suffix = %d\n",FMT_INFO.suffix_search_only);
+ DEBUGF1 (" runtime generation program = %s\n", MAYBE (program));
+ DEBUGF (" runtime generation command =");
+ if (FMT_INFO.argv) {
+ const_string *arg;
+ for (arg = FMT_INFO.argv; *arg; arg++) {
+ fprintf (stderr, " %s", *arg);
+ }
+ putc ('\n', stderr);
+ } else {
+ fputs(" (none)\n", stderr);
+ }
+ DEBUGF1 (" program enabled = %d\n", FMT_INFO.program_enabled_p);
+ DEBUGF1 (" program enable level = %d\n", FMT_INFO.program_enable_level);
+ DEBUGF1 (" open files in binary mode = %d\n", FMT_INFO.binmode);
+ DEBUGF1 (" numeric format value = %d\n", format);
+}
+#endif /* KPSE_DEBUG */
+
+ return envvar_list;
+}
+
+#if defined (KPSE_COMPAT_API)
+const_string
+kpse_init_format (kpse_file_format_type format)
+{
+ return kpathsea_init_format (kpse_def, format);
+}
+#endif
+
+
+/* These are subroutines called twice when finding file, to construct
+ the list of names to search for. */
+
+/* We don't even use fontmaps any more in practice, they were for things
+ like the lcircle10/lcirc10 name change many years ago, but let's keep
+ the support working nonetheless. */
+
+static void
+target_fontmaps (kpathsea kpse, string **target, unsigned *count,
+ const_string name)
+{
+ const_string *mapped_names = kpathsea_fontmap_lookup (kpse, name);
+
+ if (mapped_names != NULL) {
+ const_string mapped_name;
+ /* We leak mapped_names and its elements, some of the time. */
+ while ((mapped_name = *mapped_names++) != NULL) {
+ (*target)[(*count)] = xstrdup (mapped_name);
+ (*count)++;
+ XRETALLOC ((*target), (*count)+1, string);
+ }
+ }
+}
+
+
+/* Possibly add NAME (and any fontmap equivalents) to the string list
+ in TARGET, depending on the various other parameters. */
+
+static void
+target_asis_name (kpathsea kpse, string **target, unsigned *count,
+ kpse_file_format_type format,
+ const_string name, boolean use_fontmaps, boolean has_potential_suffix,
+ string has_any_suffix)
+{
+ (void) has_any_suffix; /* -Wunused */
+ /* Look for the name we've been given, provided non-suffix
+ searches are allowed or the name already includes a suffix. */
+ if (has_potential_suffix || !FMT_INFO.suffix_search_only) {
+ (*target)[(*count)] = xstrdup (name);
+ (*count)++;
+ XRETALLOC ((*target), (*count)+1, string);
+
+ if (use_fontmaps) {
+ target_fontmaps (kpse, target, count, name);
+ }
+ }
+}
+
+
+/* Possibly add NAME (and any fontmap equivalents), with any suffixes
+ for this FORMAT appended, to TARGET -- if it doesn't already have one
+ of the potential suffixes for FORMAT. */
+
+static void
+target_suffixed_names (kpathsea kpse, string **target, unsigned *count,
+ kpse_file_format_type format,
+ const_string name, boolean use_fontmaps, boolean has_potential_suffix)
+{
+ const_string *ext;
+ if (has_potential_suffix || !FMT_INFO.suffix) {
+ return;
+ }
+
+ for (ext = FMT_INFO.suffix; *ext; ext++) {
+ string name_with_suffix = concat (name, *ext);
+ (*target)[(*count)] = name_with_suffix;
+ (*count)++;
+ XRETALLOC ((*target), (*count)+1, string);
+
+ if (use_fontmaps) {
+ target_fontmaps (kpse, target, count, name_with_suffix);
+ }
+ }
+}
+
+/* Look up a file NAME of type FORMAT, and the given MUST_EXIST. This
+ initializes the path spec for FORMAT if it's the first lookup of that
+ type. Return the filename found, or NULL. This is the most likely
+ thing for clients to call. */
+
+string
+kpathsea_find_file (kpathsea kpse, const_string name,
+ kpse_file_format_type format, boolean must_exist)
+{
+ string *ret_list = kpathsea_find_file_generic (kpse, name, format,
+ must_exist, false);
+ string ret = *ret_list;
+ free (ret_list);
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_find_file (const_string name, kpse_file_format_type format,
+ boolean must_exist)
+{
+ return kpathsea_find_file(kpse_def, name, format, must_exist);
+}
+#endif
+
+/* As with `kpse_find_file', but also allow passing ALL for the search,
+ hence we always return a NULL-terminated list. */
+
+string *
+kpathsea_find_file_generic (kpathsea kpse, const_string const_name,
+ kpse_file_format_type format,
+ boolean must_exist, boolean all)
+{
+#if defined(_WIN32) && !defined(__MINGW32__)
+ char tmpbuffer1[512], tmpbuffer2[512];
+#endif
+ string *target, name;
+ const_string *ext;
+ unsigned count;
+ unsigned name_len = 0;
+ boolean has_potential_suffix = false;
+ string has_any_suffix = NULL;
+ string try_std_extension_first = NULL;
+ boolean use_fontmaps = (format == kpse_tfm_format
+ || format == kpse_gf_format
+ || format == kpse_pk_format
+ || format == kpse_ofm_format);
+ string *ret = NULL;
+
+ /* NAME being NULL is a programming bug somewhere. NAME can be empty,
+ though; this happens with constructs like `\input\relax'. */
+ assert (const_name);
+
+ if (FMT_INFO.path == NULL)
+ kpathsea_init_format (kpse, format);
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH))
+ DEBUGF3 ("kpse_find_file: searching for %s of type %s (from %s)\n",
+ const_name, FMT_INFO.type, FMT_INFO.path_source);
+#endif /* KPSE_DEBUG */
+
+ /* Do variable and tilde expansion. */
+ name = kpathsea_expand (kpse, const_name);
+
+ has_any_suffix = strrchr (name, '.');
+ if (has_any_suffix) {
+ string p = strchr (has_any_suffix, DIR_SEP);
+ if (p) {
+ has_any_suffix = NULL;
+ }
+ }
+
+ /* Does NAME already end in a possible suffix? */
+ name_len = strlen (name);
+ if (FMT_INFO.suffix) {
+ for (ext = FMT_INFO.suffix; !has_potential_suffix && *ext; ext++) {
+ unsigned suffix_len = strlen (*ext);
+ has_potential_suffix = (name_len >= suffix_len
+ && FILESTRCASEEQ (*ext, name + name_len - suffix_len));
+ }
+ }
+ if (!has_potential_suffix && FMT_INFO.alt_suffix) {
+ for (ext = FMT_INFO.alt_suffix; !has_potential_suffix && *ext; ext++) {
+ unsigned suffix_len = strlen (*ext);
+ has_potential_suffix = (name_len >= suffix_len
+ && FILESTRCASEEQ (*ext, name + name_len - suffix_len));
+ }
+ }
+
+ /* Set up list of target names to search for, the order depending on
+ try_std_extension_first. */
+ count = 0;
+ target = XTALLOC1 (string);
+ try_std_extension_first
+ = kpathsea_var_value (kpse, "try_std_extension_first");
+
+ if (has_any_suffix && !KPSE_CNF_P (try_std_extension_first)) {
+ target_asis_name (kpse, &target, &count, format, name, use_fontmaps,
+ has_potential_suffix, has_any_suffix);
+ target_suffixed_names (kpse, &target, &count, format, name, use_fontmaps,
+ has_potential_suffix);
+ } else {
+ target_suffixed_names (kpse, &target, &count, format, name, use_fontmaps,
+ has_potential_suffix);
+ target_asis_name (kpse, &target, &count, format, name, use_fontmaps,
+ has_potential_suffix, has_any_suffix);
+ }
+
+ /* Terminate list. */
+ target[count] = NULL;
+
+ if (try_std_extension_first) {
+ free (try_std_extension_first);
+ }
+
+ /* Search, trying to minimize disk-pounding. */
+ ret = kpathsea_path_search_list_generic (kpse, FMT_INFO.path,
+ target, false, all);
+
+ /* Do we need to pound the disk? */
+ if (! *ret && must_exist) {
+ for (count = 0; target[count]; count++)
+ free (target[count]);
+ count = 0;
+ /* We look for a subset of the previous set of names, so the
+ target array is large enough. In particular, we don't pound
+ the disk for alternate names from the fontmaps. */
+ if (!has_potential_suffix && FMT_INFO.suffix_search_only) {
+ for (ext = FMT_INFO.suffix; *ext; ext++)
+ target[count++] = concat (name, *ext);
+ }
+ if (has_potential_suffix || !FMT_INFO.suffix_search_only) {
+ target[count++] = xstrdup (name);
+ }
+ target[count] = NULL;
+ ret = kpathsea_path_search_list_generic (kpse, FMT_INFO.path,
+ target, true, all);
+ }
+
+ /* Free the list we created. */
+ for (count = 0; target[count]; count++)
+ free (target[count]);
+ free (target);
+
+ /* If nothing was found, call mktex* to create a missing file. Since
+ this returns a single string, morph it into a list. */
+ if (! *ret && must_exist) {
+ ret = XTALLOC (2, string);
+ ret[0] = kpathsea_make_tex (kpse, format, name);
+ if (ret[0]) {
+ ret[1] = NULL;
+ }
+ }
+
+ free (name);
+#if defined(_WIN32) && !defined(__MINGW32__)
+ if (ret && *ret) {
+ if (all) {
+ for (count = 0; ret[count] != NULL; count++) {
+ strcpy (tmpbuffer2, ret[count]);
+ if (kpathsea_getlongpath (kpse, tmpbuffer1, tmpbuffer2, 500)) {
+ if (strlen (tmpbuffer1) > strlen (ret[count]))
+ ret[count] = realloc (ret[count], strlen (tmpbuffer1) + 1);
+ strcpy (ret[count], tmpbuffer1);
+ }
+ }
+ } else {
+ strcpy (tmpbuffer2, *ret);
+ if (kpathsea_getlongpath (kpse, tmpbuffer1, tmpbuffer2, 500)) {
+ if (strlen (tmpbuffer1) > strlen (*ret))
+ *ret = realloc (*ret, strlen (tmpbuffer1) + 1);
+ strcpy (*ret, tmpbuffer1);
+ }
+ }
+ }
+#endif
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string *
+kpse_find_file_generic (const_string name, kpse_file_format_type format,
+ boolean must_exist, boolean all)
+{
+ return kpathsea_find_file_generic(kpse_def, name, format, must_exist, all);
+}
+#endif
+
+
+
+/* Return true if FNAME is acceptable to open for reading or writing. */
+
+typedef enum ok_type {
+ ok_reading,
+ ok_writing
+} ok_type;
+
+static const_string ok_type_name[] = {
+ "reading from",
+ "writing to"
+};
+
+static boolean
+kpathsea_name_ok (kpathsea kpse, const_string fname, const_string check_var,
+ const_string default_choice, ok_type action, boolean silent)
+{
+ /* We distinguish three cases:
+ 'a' (any) allows any file to be opened.
+ 'r' (restricted) means disallowing special file names.
+ 'p' (paranoid) means being really paranoid: disallowing special file
+ names and restricting output files to be in or below
+ the working directory or $TEXMFOUTPUT, while input files
+ must be below the current directory, $TEXMFOUTPUT, or
+ (implicitly) in the system areas.
+ We default to "paranoid". The error messages from TeX may be puzzling.
+ This function contains several return and goto statements, be careful. */
+
+ const_string open_choice = kpathsea_var_value (kpse, check_var);
+
+ if (!open_choice)
+ open_choice = default_choice;
+
+ if (*open_choice == 'a' || *open_choice == 'y' || *open_choice == '1')
+ return true;
+
+#if defined (unix) && !defined (MSDOS)
+ {
+ /* Disallow .rhosts, .login, .ssh/, ..somefile, ..somedir/somefile,
+ etc. But allow .tex (for base LaTeX). */
+ const_string q;
+ const_string qq = fname;
+ while ((q = strchr (qq, '.'))) { /* at each dot */
+ if ((q == fname || IS_DIR_SEP (*(q - 1))) /* start or / precedes dot? */
+ && !IS_DIR_SEP (*(q + 1)) /* ok if /./ */
+ && !(*(q + 1) == '.' && IS_DIR_SEP (*(q + 2))) /* ok if /../ */
+ && !STREQ (q, ".tex")) { /* specially allow .tex */
+ goto not_ok;
+ }
+ qq = q + 1;
+ }
+ }
+#else
+ /* Other OSs don't have special names? */
+#endif
+
+ if (*open_choice == 'r' || *open_choice == 'n' || *open_choice == '0')
+ return true;
+
+ /* Paranoia originally supplied by Charles Karney. */
+ if (kpathsea_absolute_p (kpse, fname, false)) {
+ const_string texmfoutput = kpathsea_var_value (kpse, "TEXMFOUTPUT");
+ /* Absolute pathname is only OK if TEXMFOUTPUT is set, it's not empty,
+ fname begins the TEXMFOUTPUT, and is followed by / */
+ if (!texmfoutput || *texmfoutput == '\0'
+ || fname != strstr (fname, texmfoutput)
+ || !IS_DIR_SEP (fname[strlen (texmfoutput)]))
+ goto not_ok;
+ }
+ /* For all pathnames, we disallow "../" at the beginning or "/../"
+ anywhere. */
+ if (fname[0] == '.' && fname[1] == '.' && IS_DIR_SEP(fname[2]))
+ goto not_ok;
+ else {
+ /* Check for "/../". Since more than one character can be matched
+ by IS_DIR_SEP, we cannot use "/../" itself. */
+ const_string dotpair = strstr (fname, "..");
+ while (dotpair) {
+ /* If dotpair[2] == DIR_SEP, then dotpair[-1] is well-defined,
+ because the "../" case was handled above. */
+ if (IS_DIR_SEP (dotpair[2]) && IS_DIR_SEP (dotpair[-1]))
+ goto not_ok;
+ /* Continue after the dotpair. */
+ dotpair = strstr (dotpair+2, "..");
+ }
+ }
+
+ /* We passed all tests. */
+ return true;
+
+ not_ok: /* Some test failed. */
+ if (!silent)
+ fprintf (stderr, "\n%s: Not %s %s (%s = %s).\n",
+ kpse->invocation_name, ok_type_name[action], fname,
+ check_var, open_choice);
+ return false;
+}
+
+/* For input default to all. */
+
+boolean
+kpathsea_in_name_ok_silent (kpathsea kpse, const_string fname)
+{
+ return kpathsea_name_ok (kpse, fname, "openin_any", "a", ok_reading, true);
+}
+
+boolean
+kpathsea_in_name_ok (kpathsea kpse, const_string fname)
+{
+ return kpathsea_name_ok (kpse, fname, "openin_any", "a", ok_reading, false);
+}
+
+
+#if defined(WIN32) || defined(__CYGWIN__)
+static int
+Isspace (char c)
+{
+ return (c == ' ' || c == '\t');
+}
+
+static boolean
+executable_filep (kpathsea kpse, const_string fname, boolean silent)
+{
+ const_string fn;
+ string p, q, base;
+ string *pp;
+
+/* check openout_any */
+ p = kpathsea_var_value (kpse, "openout_any");
+ if (p && *p == 'p') {
+ free (p);
+/* get base name
+ we cannot use xbasename() for abnormal names.
+*/
+ p = strrchr (fname, '/');
+ if (p)
+ fn = p + 1;
+ else
+ fn = fname;
+ p = strrchr (fn, '\\');
+ if (p)
+ fn = p + 1;
+ base = xstrdup (fn);
+#if defined(__CYGWIN__)
+ for (p = base; *p; p++)
+ *p = TOLOWER (*p);
+ p = base;
+#else
+ p = (char *) strlwr (base);
+#endif
+ for (q = p + strlen (p) - 1;
+ (q >= p) && ((*q == '.') || (Isspace (*q))); q--) {
+ *q = '\0'; /* remove trailing '.' , ' ' and '\t' */
+ }
+ q = strrchr (p, '.'); /* get extension part */
+ pp = kpse->suffixlist;
+ if (pp && q) {
+ while (*pp) {
+ if (!strcmp (q, *pp)) {
+ if (!silent)
+ fprintf (stderr, "\n%s: Forbidden to open for writing\n", fname);
+ free (base);
+ return true;
+ }
+ pp++;
+ }
+ }
+ free (base);
+ } else if (p) {
+ free (p);
+ }
+ return false;
+}
+#endif /* WIN32 || __CYGWIN__ */
+
+static boolean
+kpathsea_out_name_ok_1 (kpathsea kpse, const_string fname, boolean silent)
+{
+#if defined(WIN32) || defined(__CYGWIN__)
+ /* Output of an executable file is restricted on Windows */
+ if (executable_filep (kpse, fname, silent))
+ return false;
+#endif /* WIN32 || __CYGWIN__ */
+ /* For output, default to paranoid. */
+ return kpathsea_name_ok (kpse, fname, "openout_any", "p", ok_writing,silent);
+}
+
+boolean
+kpathsea_out_name_ok_silent (kpathsea kpse, const_string fname)
+{
+ return kpathsea_out_name_ok_1 (kpse, fname, true);
+}
+
+boolean
+kpathsea_out_name_ok (kpathsea kpse, const_string fname)
+{
+ return kpathsea_out_name_ok_1 (kpse, fname, false);
+}
+
+#if defined (KPSE_COMPAT_API)
+boolean
+kpse_in_name_ok (const_string fname)
+{
+ /* For input default to all. */
+ return kpathsea_in_name_ok (kpse_def, fname);
+}
+
+boolean
+kpse_out_name_ok (const_string fname)
+{
+ /* For output, default to paranoid. */
+ return kpathsea_out_name_ok (kpse_def, fname);
+}
+#endif
+
+
+
+/* Open NAME along the search path for TYPE for reading and return the
+ resulting file, or exit with an error message. */
+
+FILE *
+kpathsea_open_file (kpathsea kpse, const_string name,
+ kpse_file_format_type type)
+{
+ string fullname = kpathsea_find_file (kpse, name, type, true);
+ const_string mode = kpse->format_info[type].binmode
+ ? FOPEN_RBIN_MODE
+ : FOPEN_R_MODE;
+ FILE *f = fullname ? fopen (fullname, mode) : NULL;
+ if (!f) {
+ if (fullname) {
+ perror (fullname);
+ exit (1);
+ } else {
+ LIB_FATAL2 ("%s file `%s' not found", kpse->format_info[type].type, name);
+ }
+ }
+
+ return f;
+}
+
+#if defined (KPSE_COMPAT_API)
+FILE *
+kpse_open_file (const_string name, kpse_file_format_type type)
+{
+ return kpathsea_open_file(kpse_def, name, type);
+}
+#endif
+
+
+/* When using the %&<format> construct, we'd like to use the paths for
+ that format, rather than those for the name we were called with.
+ Of course this happens after various initializations have been
+ performed, so we have this function to force the issue. Note that
+ the paths for kpse_cnf_format and kpse_db_format are not cleared.
+
+ This function is defined here, and not in progname.c, because it
+ needs format_info, and would cause all of tex-file to be pulled
+ in by programs that do not need it. */
+
+void
+kpathsea_reset_program_name (kpathsea kpse, const_string progname)
+{
+ int i;
+
+ /* It is a fatal error for either of these to be NULL. */
+ assert (progname && kpse->program_name);
+ /* Do nothing if the name is unchanged. */
+ if (STREQ(kpse->program_name, progname))
+ return;
+
+ free (kpse->program_name);
+ kpse->program_name = xstrdup (progname);
+ kpathsea_xputenv (kpse, "progname", kpse->program_name);
+
+ /* Go through all paths ... */
+ for (i = 0; i != kpse_last_format; ++i) {
+ /* Do not erase the cnf or db paths. This means that the filename
+ database is not rebuilt, nor are different configuration files
+ searched. The alternative is to tolerate a memory leak of up
+ to 100k if this function is called. */
+ if (i == kpse_cnf_format || i == kpse_db_format)
+ continue;
+ /* Wipe the path (it is tested) and the cnf_path because their
+ values may differ with the new program name. */
+ if (kpse->format_info[i].path != NULL) {
+ free (kpse->format_info[i].path);
+ kpse->format_info[i].path = NULL;
+ }
+ /* We cannot free cnf_path: it points into the cnf hash. */
+ if (kpse->format_info[i].cnf_path != NULL) {
+ kpse->format_info[i].cnf_path = NULL;
+ }
+ /* We do not wipe the override_path at this point, though arguably
+ we should provide new values. It is not likely to matter for
+ the programs that call this function. */
+ }
+}
+
+#if defined (KPSE_COMPAT_API)
+void
+kpse_reset_program_name (const_string progname)
+{
+ kpathsea_reset_program_name (kpse_def, progname);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/tex-file.h b/Build/source/texk/kpathsea/tex-file.h
new file mode 100644
index 00000000000..1796bc63093
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-file.h
@@ -0,0 +1,149 @@
+/* tex-file.h: find files in a particular format.
+
+ Copyright 1993, 1994, 1995, 1996, 2007, 2008, 2009, 2010, 2013,
+ 2014 Karl Berry.
+ Copyright 1998-2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_TEX_FILE_H
+#define KPATHSEA_TEX_FILE_H
+
+#include <kpathsea/c-proto.h>
+#include <stdarg.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* This initializes the fallback resolution list. If ENVVAR
+ is set, it is used; otherwise, the envvar `TEXSIZES' is looked at; if
+ that's not set either, a compile-time default is used. */
+extern void kpathsea_init_fallback_resolutions (kpathsea kpse, string envvar);
+
+#endif /* MAKE_KPSE_DLL */
+
+/* If LEVEL is >= FMT's `program_enable_level', set `program_enabled_p'
+ for FMT to VALUE. */
+extern KPSEDLL void kpathsea_set_program_enabled (kpathsea kpse,
+ kpse_file_format_type fmt, boolean value, kpse_src_type level);
+
+/* Call kpse_set_program_enabled with VALUE and the format corresponding
+ to FMTNAME. */
+extern KPSEDLL void kpathsea_maketex_option (kpathsea kpse,
+ const_string fmtname, boolean value);
+
+/* Change the list of searched suffixes for FORMAT to ... (alternate
+ suffixes if ALTERNATE is true). */
+extern KPSEDLL void kpathsea_set_suffixes (kpathsea kpse,
+ kpse_file_format_type format, boolean alternate, ...);
+
+/* Initialize the info for the given format, returning the final search
+ path. This is called automatically by `kpse_find_file', but the
+ glyph searching (for example) can't use that function, so it
+ must also be available separately. */
+extern KPSEDLL const_string kpathsea_init_format (kpathsea kpse,
+ kpse_file_format_type format);
+
+/* Like kpathsea_init_format, but return the list of (environment/config)
+ variable names considered, which is not otherwise saved. This is
+ only used by kpsewhich --help. */
+extern KPSEDLL const_string kpathsea_init_format_return_varlist (kpathsea kpse,
+ kpse_file_format_type format);
+
+/* If FORMAT has a non-null `suffix' member, append it to NAME "."
+ and call `kpse_path_search' with the result and the other arguments.
+ If that fails, try just NAME. */
+extern KPSEDLL string kpathsea_find_file (kpathsea kpse, const_string name,
+ kpse_file_format_type format, boolean must_exist);
+
+/* Ditto, allowing ALL parameter and hence returning a NULL-terminated
+ list of results. */
+extern KPSEDLL string *kpathsea_find_file_generic (kpathsea kpse,
+ const_string name, kpse_file_format_type format, boolean must_exist,
+ boolean all);
+
+/* Return true if FNAME is acceptable to open for reading or writing.
+ If not acceptable, write a message to stderr. */
+extern KPSEDLL boolean kpathsea_in_name_ok (kpathsea kpse, const_string fname);
+extern KPSEDLL boolean kpathsea_out_name_ok (kpathsea kpse, const_string fname);
+
+/* As above, but no error message. */
+extern KPSEDLL boolean kpathsea_in_name_ok_silent
+ (kpathsea kpse, const_string fname);
+extern KPSEDLL boolean kpathsea_out_name_ok_silent
+ (kpathsea kpse, const_string fname);
+
+/* Don't just look up the name, actually open the file. */
+extern KPSEDLL FILE *kpathsea_open_file (kpathsea kpse, const_string name,
+ kpse_file_format_type format);
+
+/* This function is used to set kpse_program_name (from progname.c) to
+ a different value. It will clear the path searching information, to
+ ensure that the search paths are appropriate to the new name. */
+extern KPSEDLL void kpathsea_reset_program_name (kpathsea kpse,
+ const_string progname);
+
+
+#if defined (KPSE_COMPAT_API)
+
+extern void kpse_init_fallback_resolutions (string envvar);
+
+extern KPSEDLL void kpse_set_program_enabled (kpse_file_format_type fmt,
+ boolean value, kpse_src_type level);
+
+extern KPSEDLL void kpse_maketex_option (const_string fmtname, boolean value);
+
+extern KPSEDLL void kpse_set_suffixes (kpse_file_format_type format,
+ boolean alternate, ...);
+
+extern KPSEDLL const_string kpse_init_format (kpse_file_format_type);
+
+extern KPSEDLL string kpse_find_file (const_string name,
+ kpse_file_format_type format, boolean must_exist);
+
+extern KPSEDLL string *kpse_find_file_generic
+ (const_string name, kpse_file_format_type format,
+ boolean must_exist, boolean all);
+
+extern KPSEDLL boolean kpse_in_name_ok (const_string fname);
+extern KPSEDLL boolean kpse_out_name_ok (const_string fname);
+
+/* Here are some abbreviations. */
+#define kpse_find_mf(name) kpse_find_file (name, kpse_mf_format, true)
+#define kpse_find_mft(name) kpse_find_file (name, kpse_mft_format, true)
+#define kpse_find_pict(name) kpse_find_file (name, kpse_pict_format, true)
+#define kpse_find_tex(name) kpse_find_file (name, kpse_tex_format, true)
+#define kpse_find_tfm(name) kpse_find_file (name, kpse_tfm_format, true)
+#define kpse_find_ofm(name) kpse_find_file (name, kpse_ofm_format, true)
+
+/* The `false' is correct for DVI translators, which should clearly not
+ require vf files for every font (e.g., cmr10.vf). But it's wrong for
+ VF translators, such as vftovp. */
+#define kpse_find_vf(name) kpse_find_file (name, kpse_vf_format, false)
+#define kpse_find_ovf(name) kpse_find_file (name, kpse_ovf_format, false)
+
+extern KPSEDLL FILE *kpse_open_file (const_string, kpse_file_format_type);
+
+extern KPSEDLL void kpse_reset_program_name (const_string progname);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_TEX_FILE_H */
diff --git a/Build/source/texk/kpathsea/tex-glyph.c b/Build/source/texk/kpathsea/tex-glyph.c
new file mode 100644
index 00000000000..aae1b6555ec
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-glyph.c
@@ -0,0 +1,424 @@
+/* tex-glyph.c: search for GF/PK files.
+
+ Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011, 2017, 2018 Karl Berry.
+ Copyright 1997, 1998, 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/absolute.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/fontmap.h>
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/tex-glyph.h>
+#include <kpathsea/tex-make.h>
+#include <kpathsea/variable.h>
+
+/* Routines are in bottom-up order. */
+
+/* Support both cmr10.300pk and dpi300/cmr10.pk. (Use the latter
+ instead of dpi300\cmr10.pk since DOS supports /'s, but Unix doesn't
+ support \'s.) */
+#define UNIX_BITMAP_SPEC "$KPATHSEA_NAME.$KPATHSEA_DPI$KPATHSEA_FORMAT"
+#define DPI_BITMAP_SPEC "dpi$KPATHSEA_DPI/$KPATHSEA_NAME.$KPATHSEA_FORMAT"
+#ifdef WIN32
+#define DOS_BITMAP_SPEC "$KPATHSEA_DPI/$KPATHSEA_NAME.$KPATHSEA_FORMAT"
+#endif
+
+/* Look up font $KPATHSEA_NAME at resolution $KPATHSEA_DPI in PATH,
+ with filename suffix EXTENSION. Return file found or NULL. */
+
+static string
+try_format (kpathsea kpse, kpse_file_format_type format)
+{
+ static const_string bitmap_specs[]
+ = { UNIX_BITMAP_SPEC, DPI_BITMAP_SPEC,
+#ifdef WIN32
+ DOS_BITMAP_SPEC,
+#endif
+ NULL };
+ const_string *spec;
+ boolean must_exist;
+ const_string *sfx;
+ string ret = NULL;
+ const_string path = kpse->format_info[format].path;
+ if (!path)
+ path = kpathsea_init_format (kpse, format);
+
+ /* Set the suffix on the name we'll be searching for. */
+ sfx = kpse->format_info[format].suffix;
+ if (sfx && *sfx)
+ kpathsea_xputenv (kpse, "KPATHSEA_FORMAT", *sfx);
+
+ /* OK, the limits on this for loop are a little hokey, but it saves
+ having to repeat the body. We want to do it once with `must_exist'
+ false to avoid looking on the disk for cmr10.600pk if
+ dpi600/cmr10.pk is in ls-R. (The time spent in the extra variable
+ expansions and db searches is negligible.) */
+ for (must_exist = false; !ret && must_exist <= true; must_exist++)
+ {
+ for (spec = bitmap_specs; !ret && *spec; spec++)
+ {
+ string name = kpathsea_var_expand (kpse, *spec);
+ ret = kpathsea_path_search (kpse, path, name, must_exist);
+ if (name != ret)
+ free (name);
+ }
+ }
+
+ return ret;
+}
+
+/* Look for FONTNAME at resolution DPI in format FORMAT. Search the
+ (entire) PK path first, then the GF path, if we're looking for both.
+ Return any filename found, and (if we succeeded) fill in GLYPH_FILE. */
+
+static string
+try_size (kpathsea kpse, const_string fontname, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file)
+{
+ kpse_file_format_type format_found;
+ string ret;
+ boolean try_gf = format == kpse_gf_format || format == kpse_any_glyph_format;
+ boolean try_pk = format == kpse_pk_format || format == kpse_any_glyph_format;
+
+ kpathsea_xputenv_int (kpse, "KPATHSEA_DPI", dpi);
+
+ /* Look for PK first (since it's more likely to be found), then GF. */
+ ret = try_pk ? try_format (kpse, kpse_pk_format) : NULL;
+ format_found = kpse_pk_format;
+
+ if (ret == NULL && try_gf) {
+ ret = try_format (kpse, kpse_gf_format);
+ format_found = kpse_gf_format;
+ }
+
+ if (ret != NULL) { /* Success. */
+ if (glyph_file) { /* Fill in the return info. */
+ glyph_file->name = fontname;
+ glyph_file->dpi = dpi;
+ glyph_file->format = format_found;
+ }
+ }
+
+ return ret;
+}
+
+/* Look for FONTNAME at resolution DPI, then at the resolutions within
+ KPSE_BITMAP_TOLERANCE of DPI. */
+
+static string
+try_resolution (kpathsea kpse, const_string fontname, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file)
+{
+ string ret = try_size (kpse, fontname, dpi, format, glyph_file);
+
+ if (!ret) {
+ unsigned r;
+ unsigned tolerance = KPSE_BITMAP_TOLERANCE (dpi);
+ /* Cast to unsigned to shut up stupid compilers. */
+ unsigned lower_bound = (int) (dpi - tolerance) < 0
+ ? 0 : (unsigned)(dpi - tolerance);
+ unsigned upper_bound = (unsigned)(dpi + tolerance);
+
+ /* Prefer scaling up to scaling down, since scaling down can omit
+ character features (Tom did this in dvips). */
+ for (r = lower_bound; !ret && r <= upper_bound; r++)
+ if (r != dpi)
+ ret = try_size (kpse, fontname, r, format, glyph_file);
+ }
+
+ return ret;
+}
+
+/* Look up *FONTNAME_PTR in format FORMAT at DPI in the texfonts.map files
+ that we can find, returning the filename found and GLYPH_FILE. Also
+ set *FONTNAME_PTR to the real name corresponding to the alias found
+ or the first alias, if that is not an alias itself. (This allows
+ mktexpk to only deal with real names.) */
+
+static string
+try_fontmap (kpathsea kpse, const_string *fontname_ptr, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file)
+{
+ const_string *mapped_names;
+ const_string fontname = *fontname_ptr;
+ string ret = NULL;
+
+ mapped_names = kpathsea_fontmap_lookup (kpse, fontname);
+ if (mapped_names) {
+ const_string mapped_name;
+ const_string first_name = *mapped_names;
+ while (!ret && (mapped_name = *mapped_names++)) {
+ kpathsea_xputenv (kpse, "KPATHSEA_NAME", mapped_name);
+ ret = try_resolution (kpse, mapped_name, dpi, format, glyph_file);
+ }
+ if (ret) {
+ /* If some alias succeeeded, return that alias. */
+ *fontname_ptr = xstrdup (mapped_name);
+ /* Return first alias name, unless that itself is an alias,
+ in which case do nothing. */
+ } else if (!kpathsea_fontmap_lookup (kpse, first_name)) {
+ *fontname_ptr = xstrdup (first_name);
+ }
+ }
+
+ return ret;
+}
+
+/* Look for FONTNAME in `kpse_fallback_resolutions', omitting DPI if we
+ happen across it. Return NULL if nothing found. Pass GLYPH_FILE
+ along as usual. Assume `kpse_fallback_resolutions' is sorted. */
+
+static string
+try_fallback_resolutions (kpathsea kpse,
+ const_string fontname, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file)
+{
+ unsigned s;
+ int loc, max_loc;
+ int lower_loc, upper_loc;
+ unsigned lower_diff, upper_diff;
+ unsigned closest_diff = UINT_MAX;
+ string ret = NULL; /* In case the only fallback resolution is DPI. */
+ loc = 0; /* -Wall */
+ /* First find the fallback size closest to DPI, even including DPI. */
+ for (s = 0; kpse->fallback_resolutions[s] != 0; s++)
+ {
+ unsigned this_diff =
+ kpse->fallback_resolutions[s] > dpi
+ ? kpse->fallback_resolutions[s] - dpi
+ : dpi - kpse->fallback_resolutions[s];
+ if (this_diff < closest_diff)
+ {
+ closest_diff = this_diff;
+ loc = s;
+ }
+ }
+ if (s == 0)
+ return ret; /* If nothing in list, quit now. */
+
+ max_loc = s;
+ lower_loc = loc - 1;
+ upper_loc = loc + 1;
+
+ for (;;)
+ {
+ unsigned fallback = kpse->fallback_resolutions[loc];
+ /* Don't bother to try DPI itself again. */
+ if (fallback != dpi)
+ {
+ ret = try_resolution (kpse, fontname, fallback, format, glyph_file);
+ if (ret)
+ break;
+ }
+
+ /* That didn't work. How far away are the locs above or below? */
+ lower_diff = lower_loc > -1
+ ? dpi - kpse->fallback_resolutions[lower_loc] : INT_MAX;
+ upper_diff = upper_loc < max_loc
+ ? kpse->fallback_resolutions[upper_loc] - dpi : INT_MAX;
+
+ /* But if we're at the end in both directions, quit. */
+ if (lower_diff == INT_MAX && upper_diff == INT_MAX)
+ break;
+
+ /* Go in whichever direction is closest. */
+ if (lower_diff < upper_diff)
+ {
+ loc = lower_loc;
+ lower_loc--;
+ }
+ else
+ {
+ loc = upper_loc;
+ upper_loc++;
+ }
+ }
+
+ return ret;
+}
+
+/* See the .h file for description. This is the entry point. */
+
+string
+kpathsea_find_glyph (kpathsea kpse,
+ const_string passed_fontname, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file)
+{
+ string ret;
+ kpse_glyph_source_type source;
+ const_string fontname = passed_fontname;
+
+ /* Start the search: try the name we're given. */
+ source = kpse_glyph_source_normal;
+ kpathsea_xputenv (kpse, "KPATHSEA_NAME", fontname);
+ ret = try_resolution (kpse, fontname, dpi, format, glyph_file);
+
+ /* Try all the various possibilities in order of preference. */
+ if (!ret) {
+ /* Maybe FONTNAME was an alias. */
+ source = kpse_glyph_source_alias;
+ ret = try_fontmap (kpse, &fontname, dpi, format, glyph_file);
+
+ /* If not an alias, try creating it on the fly with mktexpk,
+ unless FONTNAME is absolute or explicitly relative. */
+ if (!ret && !kpathsea_absolute_p (kpse, fontname, true)) {
+ source = kpse_glyph_source_maketex;
+ /* `try_resolution' leaves the envvar set randomly. */
+ kpathsea_xputenv_int (kpse, "KPATHSEA_DPI", dpi);
+ ret = kpathsea_make_tex (kpse, format, fontname);
+ }
+
+ /* If mktex... succeeded, set return struct. Doesn't make sense for
+ `kpse_make_tex' to set it, since it can only succeed or fail,
+ unlike the other routines. */
+ if (ret) {
+ if (glyph_file) {
+ KPSE_GLYPH_FILE_DPI (*glyph_file) = dpi;
+ KPSE_GLYPH_FILE_NAME (*glyph_file) = fontname;
+ }
+
+ /* If mktex... failed, try any fallback resolutions. */
+ } else {
+ if (kpse->fallback_resolutions) {
+ source = kpse_glyph_source_fallback_res;
+ ret = try_fallback_resolutions (kpse, fontname, dpi,format,glyph_file);
+ }
+
+ /* We're down to the font of last resort. */
+ if (!ret && kpse->fallback_font) {
+ const_string name = kpse->fallback_font;
+ source = kpse_glyph_source_fallback;
+ kpathsea_xputenv (kpse, "KPATHSEA_NAME", name);
+
+ /* As before, first try it at the given size. */
+ ret = try_resolution (kpse, name, dpi, format, glyph_file);
+
+ /* The fallback font at the fallback resolutions. */
+ if (!ret && kpse->fallback_resolutions) {
+ ret = try_fallback_resolutions (kpse, name, dpi, format, glyph_file);
+ }
+ }
+ }
+ }
+
+ /* If RET is null, then the caller is not supposed to look at GLYPH_FILE,
+ so it doesn't matter if we assign something incorrect. */
+ if (glyph_file)
+ KPSE_GLYPH_FILE_SOURCE (*glyph_file) = source;
+
+ /* FIXME: fontname may have been allocated, but (worse) it may also
+ have been assigned to struct that's passed out of this function.
+ if (fontname != passed_fontname)
+ free (fontname);
+ */
+
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_find_glyph (const_string passed_fontname, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file)
+{
+ return kpathsea_find_glyph (kpse_def, passed_fontname, dpi, format,
+ glyph_file);
+}
+#endif
+
+
+/* The tolerances change whether we base things on DPI1 or DPI2. */
+
+boolean
+kpathsea_bitmap_tolerance (kpathsea kpse, double dpi1, double dpi2)
+{
+ unsigned tolerance = KPSE_BITMAP_TOLERANCE (dpi2);
+ unsigned lower_bound = (int) (dpi2 - tolerance) < 0 ? 0 : dpi2 - tolerance;
+ unsigned upper_bound = dpi2 + tolerance;
+ (void)kpse; /* currenty not used */
+
+ return lower_bound <= dpi1 && dpi1 <= upper_bound;
+}
+
+#if defined (KPSE_COMPAT_API)
+boolean
+kpse_bitmap_tolerance (double dpi1, double dpi2)
+{
+ return kpathsea_bitmap_tolerance (kpse_def, dpi1, dpi2);
+}
+#endif
+
+
+#ifdef TEST
+
+void
+test_find_glyph (kpathsea kpse, const_string fontname, unsigned dpi)
+{
+ string answer;
+ kpse_glyph_file_type ret;
+
+ printf ("\nSearch for %s@%u:\n\t", fontname, dpi);
+
+ answer = kpathsea_find_glyph (kpse, fontname, dpi,
+ kpse_any_glyph_format, &ret);
+ if (answer)
+ {
+ string format = ret.format == kpse_pk_format ? "pk" : "gf";
+ if (!ret.name)
+ ret.name = "(nil)";
+ printf ("%s\n\t(%s@%u, %s)\n", answer, ret.name, ret.dpi, format);
+ }
+ else
+ puts ("(nil)");
+}
+
+
+int
+main (int argc, char **argv)
+{
+ kpathsea kpse = xcalloc(1,sizeof(kpathsea_instance));
+ kpathsea_set_program_name(kpse, argv[0], NULL);
+ test_find_glyph (kpse, "/usr/local/lib/tex/fonts/cm/cmr10", 300); /* abs. */
+ test_find_glyph (kpse, "cmr10", 300); /* normal */
+ test_find_glyph (kpse, "logo10", 300); /* find gf */
+ test_find_glyph (kpse, "cmr10", 299); /* find 300 */
+ test_find_glyph (kpse, "circle10", 300); /* in fontmap */
+ test_find_glyph (kpse, "none", 300); /* do not find */
+ kpse->kpse_fallback_font = "cmr10";
+ test_find_glyph (kpse, "fallback", 300); /* find fallback font cmr10 */
+ kpathsea_init_fallback_resolutions (kpse, "KPATHSEA_TEST_SIZES");
+ test_find_glyph (kpse, "fallbackdpi", 759); /* find fallback cmr10@300 */
+
+ kpathsea_xputenv (kpse,"GFFONTS", ".");
+ test_find_glyph (kpse, "cmr10", 300); /* different GFFONTS/TEXFONTS */
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST tex-glyph.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/tex-glyph.h b/Build/source/texk/kpathsea/tex-glyph.h
new file mode 100644
index 00000000000..ac3954bd3b4
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-glyph.h
@@ -0,0 +1,99 @@
+/* tex-glyph.h: look for a TeX glyph font (GF or PK).
+
+ Copyright 1993, 2008, 2009, 2011, 2018 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_TEX_GLYPH_H
+#define KPATHSEA_TEX_GLYPH_H
+
+#include <kpathsea/tex-file.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This type describes the origin of a glyph font. */
+
+typedef enum
+{
+ kpse_glyph_source_normal, /* the searched-for font: already existed */
+ kpse_glyph_source_alias, /* : was an alias for an existing file */
+ kpse_glyph_source_maketex, /* : was created on the fly */
+ kpse_glyph_source_fallback_res, /* : found at fallback resolutions */
+ kpse_glyph_source_fallback /* : wasn't found, but the fallback font was */
+} kpse_glyph_source_type;
+
+
+typedef struct
+{
+ const_string name; /* font name found */
+ unsigned dpi; /* size found, for glyphs */
+ kpse_file_format_type format; /* glyph format found */
+ kpse_glyph_source_type source; /* where we found it */
+} kpse_glyph_file_type;
+
+#define KPSE_GLYPH_FILE_NAME(f) ((f).name)
+#define KPSE_GLYPH_FILE_DPI(f) ((f).dpi)
+#define KPSE_GLYPH_FILE_FORMAT(f) ((f).format)
+#define KPSE_GLYPH_FILE_SOURCE(f) ((f).source)
+
+
+/* Search first for the font named FONT_NAME at resolution DPI in the
+ glyph format FORMAT (see `try_size' for details of format searching).
+ Then try resolutions within KPSE_BITMAP_TOLERANCE of DPI. Then if
+ FONT_NAME is an alias defined in a texfonts.map do all the above for
+ its real name. If not an alias, try creating it on the fly with
+ mktexpk. Then try the resolutions in `kpse_fallback_sizes', then
+ within the tolerance of each of those. Then try the above for
+ kpse_fallback_name. Then fail. Return either the filename found, or
+ NULL. Also return information about the file found in
+ *GLYPH_FILE. */
+extern KPSEDLL string kpathsea_find_glyph (kpathsea kpse,
+ const_string font_name, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file);
+
+
+/* Defines how far away a pixel file can be found from its stated size.
+ The DVI standard says any resolution within 0.2% of the stated size
+ is ok, but we are more forgiving. */
+#define KPSE_BITMAP_TOLERANCE(r) ((r) / 500.0 + 1)
+
+/* Check whether DPI1 is within KPSE_BITMAP_TOLERANCE of DPI2. */
+extern KPSEDLL boolean kpathsea_bitmap_tolerance (kpathsea kpse,
+ double dpi1, double dpi2);
+
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL string kpse_find_glyph (const_string font_name, unsigned dpi,
+ kpse_file_format_type format,
+ kpse_glyph_file_type *glyph_file);
+
+/* Look for a specific format only. */
+#define kpse_find_pk(font_name, dpi, glyph_file) \
+ kpse_find_glyph (font_name, dpi, kpse_pk_format, glyph_file)
+#define kpse_find_gf(font_name, dpi, glyph_file) \
+ kpse_find_glyph (font_name, dpi, kpse_gf_format, glyph_file)
+
+extern KPSEDLL boolean kpse_bitmap_tolerance (double dpi1, double dpi2);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_TEX_GLYPH_H */
diff --git a/Build/source/texk/kpathsea/tex-hush.c b/Build/source/texk/kpathsea/tex-hush.c
new file mode 100644
index 00000000000..6904f127c85
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-hush.c
@@ -0,0 +1,52 @@
+/* tex-hush.c: suppressing warnings?
+
+ Copyright 1996, 2008 Karl Berry.
+ Copyright 1998, 2000, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/pathsearch.h>
+#include <kpathsea/tex-hush.h>
+#include <kpathsea/variable.h>
+
+boolean
+kpathsea_tex_hush (kpathsea kpse, const_string what)
+{
+ string h;
+ string hush = kpathsea_var_value (kpse, "TEX_HUSH");
+ if (hush) {
+ if (STREQ (hush, "all"))
+ return true;
+ if (STREQ (hush, "none"))
+ return false;
+ for (h = kpathsea_path_element (kpse, hush); h;
+ h = kpathsea_path_element (kpse, NULL)) {
+ /* Don't do anything special with empty elements. */
+ if (STREQ (h, what))
+ return true;
+ }
+ }
+
+ return false;
+}
+
+#if defined (KPSE_COMPAT_API)
+boolean
+kpse_tex_hush (const_string what)
+{
+ return kpathsea_tex_hush (kpse_def, what);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/tex-hush.h b/Build/source/texk/kpathsea/tex-hush.h
new file mode 100644
index 00000000000..3eb7ba16a99
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-hush.h
@@ -0,0 +1,40 @@
+/* tex-hush.h: suppressing warnings?
+
+ Copyright 1996, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_TEX_HUSH_H
+#define KPATHSEA_TEX_HUSH_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return true if WHAT is included in the TEX_HUSH environment
+ variable/config value. */
+extern KPSEDLL boolean kpathsea_tex_hush (kpathsea kpse, const_string what);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL boolean kpse_tex_hush (const_string what);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_TEX_HUSH_H */
diff --git a/Build/source/texk/kpathsea/tex-make.c b/Build/source/texk/kpathsea/tex-make.c
new file mode 100644
index 00000000000..530c6ffe535
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-make.c
@@ -0,0 +1,556 @@
+/* tex-make.c: run external programs to make TeX-related files.
+
+ Copyright 1993, 1994, 1995, 1996, 1997, 2008-2020 Karl Berry.
+ Copyright 1997, 1998, 2001-05 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-fopen.h>
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/db.h>
+#include <kpathsea/fn.h>
+#include <kpathsea/magstep.h>
+#include <kpathsea/readable.h>
+#include <kpathsea/tex-make.h>
+#include <kpathsea/variable.h>
+
+#if !defined (AMIGA) && !(defined (MSDOS) && !defined(__DJGPP__)) && !defined (WIN32)
+#include <sys/wait.h>
+#endif
+
+
+/* We set the envvar MAKETEX_MAG, which is part of the default spec for
+ MakeTeXPK above, based on KPATHSEA_DPI and MAKETEX_BASE_DPI. */
+
+static void
+set_maketex_mag (kpathsea kpse)
+{
+ char q[MAX_INT_LENGTH * 3 + 3];
+ int m;
+ string dpi_str = getenv ("KPATHSEA_DPI");
+ string bdpi_str = getenv ("MAKETEX_BASE_DPI");
+ unsigned dpi = dpi_str ? atoi (dpi_str) : 0;
+ unsigned bdpi = bdpi_str ? atoi (bdpi_str) : 0;
+
+ /* If the environment variables aren't set, it's a bug. */
+ assert (dpi != 0 && bdpi != 0);
+
+ /* Fix up for roundoff error. Hopefully the driver has already fixed
+ up DPI, but may as well be safe, and also get the magstep number. */
+ (void) kpathsea_magstep_fix (kpse, dpi, bdpi, &m);
+
+ if (m == 0) {
+ if (bdpi <= 4000) {
+ sprintf(q, "%u+%u/%u", dpi / bdpi, dpi % bdpi, bdpi);
+ } else {
+ unsigned f = bdpi/4000;
+ unsigned r = bdpi%4000;
+
+ if (f > 1) {
+ if (r > 0) {
+ sprintf(q, "%u+%u/(%u*%u+%u)",
+ dpi/bdpi, dpi%bdpi, f, (bdpi - r)/f, r);
+ } else {
+ sprintf(q, "%u+%u/(%u*%u)", dpi/bdpi, dpi%bdpi, f, bdpi/f);
+ }
+ } else {
+ sprintf(q, "%u+%u/(4000+%u)", dpi/bdpi, dpi%bdpi, r);
+ }
+ }
+ } else {
+ /* m is encoded with LSB being a ``half'' bit (see magstep.h). Are
+ we making an assumption here about two's complement? Probably.
+ In any case, if m is negative, we have to put in the sign
+ explicitly, since m/2==0 if m==-1. */
+ const_string sign = "";
+ if (m < 0) {
+ m *= -1;
+ sign = "-";
+ }
+ sprintf(q, "magstep\\(%s%d.%d\\)", sign, m / 2, (m & 1) * 5);
+ }
+ kpathsea_xputenv (kpse, "MAKETEX_MAG", q);
+}
+
+/* This mktex... program was disabled, or the script failed. If this
+ was a font creation (according to FORMAT), append CMD
+ to a file missfont.log in the current directory. */
+
+static void
+misstex (kpathsea kpse, kpse_file_format_type format, string *args)
+{
+ string *s;
+
+ /* If we weren't trying to make a font, do nothing. Maybe should
+ allow people to specify what they want recorded? */
+ if (format != kpse_gf_format
+ && format != kpse_pk_format
+ && format != kpse_any_glyph_format
+ && format != kpse_tfm_format
+ && format != kpse_vf_format)
+ return;
+
+ /* If this is the first time, have to open the log file. But don't
+ bother logging anything if they were discarding errors. */
+ if (!kpse->missfont && !kpse->make_tex_discard_errors) {
+ const_string missfont_name = kpathsea_var_value (kpse, "MISSFONT_LOG");
+ if (!missfont_name || *missfont_name == '1') {
+ missfont_name = "missfont.log"; /* take default name */
+ } else if (missfont_name
+ && (*missfont_name == 0 || *missfont_name == '0')) {
+ missfont_name = NULL; /* user requested no missfont.log */
+ } /* else use user's name */
+
+ kpse->missfont
+ = missfont_name ? fopen (missfont_name, FOPEN_A_MODE) : NULL;
+ if (!kpse->missfont && kpathsea_var_value (kpse, "TEXMFOUTPUT")) {
+ missfont_name = concat3 (kpathsea_var_value (kpse, "TEXMFOUTPUT"),
+ DIR_SEP_STRING, missfont_name);
+ kpse->missfont = fopen (missfont_name, FOPEN_A_MODE);
+ }
+
+ if (kpse->missfont)
+ fprintf (stderr, "kpathsea: Appending font creation commands to %s.\n",
+ missfont_name);
+ }
+
+ /* Write the command if we have a log file. */
+ if (kpse->missfont) {
+ fputs (args[0], kpse->missfont);
+ for (s = &args[1]; *s != NULL; s++) {
+ putc(' ', kpse->missfont);
+ fputs (*s, kpse->missfont);
+ }
+ putc ('\n', kpse->missfont);
+ }
+}
+
+
+/* Assume the script outputs the filename it creates (and nothing
+ else) on standard output; hence, we run the script with `popen'. */
+
+static string
+maketex (kpathsea kpse, kpse_file_format_type format, string* args)
+{
+ /* New implementation, use fork/exec pair instead of popen, since
+ * the latter is virtually impossible to make safe.
+ */
+ unsigned len;
+ string *s;
+ string ret = NULL;
+ string fn;
+#if defined(WIN32)
+ char fullbin[256], *wrp;
+
+ wrp = kpathsea_var_value(kpse, "SELFAUTOLOC");
+ if(wrp == NULL) {
+ fprintf(stderr, "I cannot get SELFAUTOLOC\n");
+ exit(100);
+ }
+
+ strcpy(fullbin, wrp);
+ free(wrp);
+ for(wrp=fullbin; *wrp; wrp++) {
+ if(*wrp == '/') *wrp = '\\';
+ }
+ strcat(fullbin, "\\");
+ strcat(fullbin, args[0]);
+#endif
+ if (!kpse->make_tex_discard_errors) {
+ fprintf (stderr, "\nkpathsea: Running");
+ for (s = &args[0]; *s != NULL; s++)
+ fprintf (stderr, " %s", *s);
+ fputc('\n', stderr);
+ }
+
+#if defined (AMIGA)
+ /* Amiga has a different interface. */
+ {
+ string cmd;
+ string newcmd;
+ cmd = xstrdup(args[0]);
+ for (s = &args[1]; *s != NULL; s++) {
+ newcmd = concat(cmd, *s);
+ free (cmd);
+ cmd = newcmd;
+ }
+ ret = system(cmd) == 0 ? getenv ("LAST_FONT_CREATED"): NULL;
+ free (cmd);
+ }
+#elif defined (MSDOS) && !defined(__DJGPP__)
+#error Implement new MSDOS mktex call interface here
+#else /* WIN32 or Unix */
+ {
+#if defined (WIN32)
+ /* spawnvp(_P_NOWAIT, ...) and pipe --ak 2002/12/15 */
+
+ unsigned long nexitcode = STILL_ACTIVE;
+ HANDLE hchild;
+ int hstdout, childpipe[2];
+ int hstderr = -1;
+ FILE *Hnul = NULL;
+
+ fn = NULL;
+
+ if(_pipe(childpipe, 1024, O_TEXT | _O_NOINHERIT) == -1) {
+ perror("kpathsea: pipe()");
+ goto labeldone;
+ }
+
+ hstdout = _dup(fileno(stdout));
+ if(_dup2(childpipe[1], fileno(stdout)) != 0) {
+ close(hstdout);
+ close(childpipe[0]);
+ close(childpipe[1]);
+ goto labeldone;
+ }
+
+ close(childpipe[1]);
+
+ if(kpse->make_tex_discard_errors) {
+ Hnul = fopen("nul", "w");
+ if(!Hnul) {
+ perror("kpathsea: fopen(\"nul\")");
+ }
+ else {
+ hstderr = _dup(fileno(stderr));
+ _dup2(fileno(Hnul), fileno(stderr));
+ }
+ }
+ fprintf(stderr, "\nThe command name is %s\n", fullbin);
+ hchild = (HANDLE)_spawnvp(_P_NOWAIT, fullbin, (const char * const *) args);
+
+ _dup2(hstdout, fileno(stdout));
+ close(hstdout);
+
+ if(hchild == (HANDLE)(-1)) {
+ close(childpipe[0]);
+ goto labeldone;
+ }
+
+ if(hchild) {
+ char buf[1024+1];
+ int num;
+
+ fn = xstrdup("");
+ while(nexitcode == STILL_ACTIVE) {
+ num = read(childpipe[0], buf, sizeof(buf)-1);
+ if(num) {
+ string newfn;
+ buf[num] = '\0';
+ newfn = concat(fn, buf);
+ free(fn);
+ fn = newfn;
+ }
+ if(!GetExitCodeProcess(hchild, &nexitcode)) {
+ fn = NULL;
+ close(childpipe[0]);
+ goto labeldone;
+ }
+ }
+ close(childpipe[0]);
+ }
+
+ labeldone:
+ if(kpse->make_tex_discard_errors && Hnul) {
+ _dup2(hstderr, fileno(stderr));
+ close(hstderr);
+ fclose(Hnul);
+ }
+#else /* !WIN32 */
+ /* Standard input for the child. Set to /dev/null */
+ int childin;
+ /* Standard output for the child, what we're interested in. */
+ int childout[2];
+ /* Standard error for the child, same as parent or /dev/null */
+ int childerr;
+ /* Child pid. */
+ pid_t childpid;
+
+ /* Open the channels that the child will use. */
+ /* A fairly horrible uses of gotos for here for the error case. */
+ if ((childin = open("/dev/null", O_RDONLY)) < 0) {
+ perror("kpathsea: open(\"/dev/null\", O_RDONLY)");
+ goto error_childin;
+ }
+ if (pipe(childout) < 0) {
+ perror("kpathsea: pipe()");
+ goto error_childout;
+ }
+ if ((childerr = open("/dev/null", O_WRONLY)) < 0) {
+ perror("kpathsea: open(\"/dev/null\", O_WRONLY)");
+ goto error_childerr;
+ }
+ if ((childpid = fork()) < 0) {
+ perror("kpathsea: fork()");
+ close(childerr);
+ error_childerr:
+ close(childout[0]);
+ close(childout[1]);
+ error_childout:
+ close(childin);
+ error_childin:
+ fn = NULL;
+ } else if (childpid == 0) {
+ /* Child
+ *
+ * We can use vfork, provided we're careful about what we
+ * do here: do not return from this function, do not modify
+ * variables, call _exit if there is a problem.
+ *
+ * Complete setting up the file descriptors.
+ * We use dup(2) so the order in which we do this matters.
+ */
+ close(childout[0]);
+ /* stdin -- the child will not receive input from this */
+ if (childin != 0) {
+ close(0);
+ if (dup(childin) != 0) {
+ perror("kpathsea: dup(2) failed for stdin");
+ close(childin);
+ _exit(1);
+ }
+ close(childin);
+ }
+ /* stdout -- the output of the child's action */
+ if (childout[1] != 1) {
+ close(1);
+ if (dup(childout[1]) != 1) {
+ perror("kpathsea: dup(2) failed for stdout");
+ close(childout[1]);
+ _exit(1);
+ }
+ close(childout[1]);
+ }
+ /* stderr -- use /dev/null if we discard errors */
+ if (childerr != 2) {
+ if (kpse->make_tex_discard_errors) {
+ close(2);
+ if (dup(childerr) != 2) {
+ perror("kpathsea: dup(2) failed for stderr");
+ close(childerr);
+ _exit(1);
+ }
+ }
+ close(childerr);
+ }
+ /* FIXME: We could/should close all other file descriptors as well. */
+ /* exec -- on failure a call of _exit(2) it is the only option */
+ if (execvp(args[0], args))
+ perror(args[0]);
+ _exit(1);
+ } else {
+ /* Parent */
+ char buf[1024+1];
+ int num;
+
+ /* Clean up child file descriptors that we won't use anyway. */
+ close(childin);
+ close(childout[1]);
+ close(childerr);
+ /* Get stdout of child from the pipe. */
+ fn = xstrdup("");
+ while ((num = read(childout[0],buf,sizeof(buf)-1)) != 0) {
+ if (num == -1) {
+ if (errno != EINTR) {
+ perror("kpathsea: read()");
+ break;
+ }
+ } else {
+ string newfn;
+ buf[num] = '\0';
+ newfn = concat(fn, buf);
+ free(fn);
+ fn = newfn;
+ }
+ }
+ /* End of file on pipe, child should have exited at this point. */
+ close(childout[0]);
+ /* We don't really care about the exit status at this point. */
+ wait(NULL);
+ }
+#endif /* !WIN32 */
+
+ if (fn) {
+ len = strlen(fn);
+
+ /* Remove trailing newlines and returns. */
+ while (len && (fn[len - 1] == '\n' || fn[len - 1] == '\r')) {
+ fn[len - 1] = '\0';
+ len--;
+ }
+
+ ret = len == 0 ? NULL : kpathsea_readable_file (kpse, fn);
+ if (!ret && len > 1) {
+ WARNING2 ("kpathsea: %s output `%s' instead of a filename",
+ args[0], fn);
+ }
+
+ /* Free the name if we're not returning it. */
+ if (fn != ret)
+ free (fn);
+ }
+ }
+#endif /* WIN32 or Unix */
+
+ if (ret == NULL)
+ misstex (kpse, format, args);
+ else
+ kpathsea_db_insert (kpse, ret);
+
+ return ret;
+}
+
+
+
+/* Create BASE in FORMAT and return the generated filename, or
+ return NULL. We used to emit warnings for names we declined to pass
+ on to the scripts, but such names are common with system fonts, so
+ now we are silent (just returning NULL). That is arguably better
+ behavior anyway. Presumably the caller always reports "font not
+ found" anyway. */
+
+string
+kpathsea_make_tex (kpathsea kpse, kpse_file_format_type format,
+ const_string base)
+{
+ kpse_format_info_type spec; /* some compilers lack struct initialization */
+ string ret = NULL;
+
+ spec = kpse->format_info[format];
+ if (!spec.type) { /* Not initialized yet? */
+ kpathsea_init_format (kpse, format);
+ spec = kpse->format_info[format];
+ }
+
+ if (spec.program && spec.program_enabled_p) {
+ /* See the documentation for the envvars we're dealing with here. */
+ /* Number of arguments is spec.argc + 1, plus the trailing NULL. */
+ string *args = XTALLOC (spec.argc + 2, string);
+ /* Helpers */
+ int argnum;
+ int i;
+
+ /* Check whether the name we were given is likely to be a problem.
+ All could be fixed in the scripts and/or invocation, but in
+ practice our names are simple, so let's err on the side of strictness:
+ - may not start with a hyphen
+ - allowed are: alphanumeric, underscore, hyphen, period, plus
+ - also allowed: DIRSEP, as we can be fed that when creating pk fonts
+
+ For example, system fonts are likely to contain spaces, and
+ (for filename lookups) be enclosed in square brackets. We don't
+ want to try calling our mktex* scripts on those.
+ */
+ if (base[0] == '-' /* || IS_DIR_SEP(base[0]) */) {
+ return NULL;
+ }
+ for (i = 0; base[i]; i++) {
+ if (!ISALNUM(base[i])
+ && base[i] != '-'
+ && base[i] != '+'
+ && base[i] != '_'
+ && base[i] != '.'
+ && !IS_DIR_SEP(base[i]))
+ {
+ return NULL;
+ }
+ }
+
+ if (format == kpse_gf_format
+ || format == kpse_pk_format
+ || format == kpse_any_glyph_format)
+ set_maketex_mag (kpse);
+
+ /* Here's an awful kludge: if the mode is `/', mktexpk recognizes
+ it as a special case. `kpse_prog_init' sets it to this in the
+ first place when no mode is otherwise specified; this is so
+ when the user defines a resolution, they don't also have to
+ specify a mode; instead, mktexpk's guesses will take over.
+ They use / for the value because then when it is expanded as
+ part of the PKFONTS et al. path values, we'll wind up searching
+ all the pk directories. We put $MAKETEX_MODE in the path
+ values in the first place so that sites with two different
+ devices with the same resolution can find the right fonts; but
+ such sites are uncommon, so they shouldn't make things harder
+ for everyone else. */
+ for (argnum = 0; argnum < spec.argc; argnum++) {
+ args[argnum] = kpathsea_var_expand (kpse, spec.argv[argnum]);
+ }
+ args[argnum++] = xstrdup(base);
+ args[argnum] = NULL;
+
+ ret = maketex (kpse, format, args);
+
+ for (argnum = 0; args[argnum] != NULL; argnum++)
+ free (args[argnum]);
+ free (args);
+ }
+
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_make_tex (kpse_file_format_type format, const_string base)
+{
+ return kpathsea_make_tex (kpse_def, format, base);
+}
+#endif
+
+
+#ifdef TEST
+
+void
+test_make_tex (kpathsea kpse, kpse_file_format_type fmt, const_string base)
+{
+ string answer;
+
+ printf ("\nAttempting %s in format %d:\n", base, fmt);
+
+ answer = kpathsea_make_tex (kpse, fmt, base);
+ puts (answer ? answer : "(nil)");
+}
+
+
+int
+main (int argc, char **argv)
+{
+ kpathsea kpse = xcalloc(1, sizeof(kpathsea_instance));
+ kpathsea_set_program_name(kpse, argv[0], NULL);
+ kpathsea_xputenv (kpse, "KPATHSEA_DPI", "781"); /* call mktexpk */
+ kpathsea_xputenv (kpse,"MAKETEX_BASE_DPI", "300"); /* call mktexpk */
+ kpathsea_set_program_enabled(kpse, kpse_pk_format, 1, kpse_src_env);
+ test_make_tex (kpse, kpse_pk_format, "cmr10");
+
+ /* Fail with mktextfm. */
+ kpathsea_set_program_enabled(kpse, kpse_tfm_format, 1, kpse_src_env);
+ test_make_tex (kpse, kpse_tfm_format, "foozler99");
+
+ /* Call something disabled. */
+ test_make_tex (kpse, kpse_bst_format, "no-way");
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST tex-make.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/tex-make.h b/Build/source/texk/kpathsea/tex-make.h
new file mode 100644
index 00000000000..00902f7f101
--- /dev/null
+++ b/Build/source/texk/kpathsea/tex-make.h
@@ -0,0 +1,48 @@
+/* tex-make.h: declarations for executing external scripts.
+
+ Copyright 1993, 1994, 2008, 2010 Karl Berry.
+ Copyright 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_TEX_MAKE_H
+#define KPATHSEA_TEX_MAKE_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/tex-file.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Run a program to create a file named by BASE_FILE in format FORMAT.
+ Return the full filename to it, or NULL. Any other information about
+ the file is passed through environment variables. See the mktexpk
+ stuff in `tex-make.c' for an example. */
+
+extern KPSEDLL string kpathsea_make_tex (kpathsea kpse,
+ kpse_file_format_type format,
+ const_string base_file);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL string kpse_make_tex (kpse_file_format_type format,
+ const_string base_file);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_TEX_MAKE_H */
diff --git a/Build/source/texk/kpathsea/texmf.cnf b/Build/source/texk/kpathsea/texmf.cnf
new file mode 100644
index 00000000000..a58b3e6c990
--- /dev/null
+++ b/Build/source/texk/kpathsea/texmf.cnf
@@ -0,0 +1,906 @@
+% original texmf.cnf -- runtime path configuration file for kpathsea.
+% Public domain.
+%
+% If you modify this original file, YOUR CHANGES WILL BE LOST when it is
+% updated. Instead, put your changes -- and only your changes, not an
+% entire copy! -- in ../../texmf.cnf. That is, if this file is
+% installed in /some/path/to/texlive/2021/texmf-dist/web2c/texmf.cnf,
+% put your custom settings in /some/path/to/texlive/2021/texmf.cnf.
+% (Below, we use YYYY in place of the specific year.)
+%
+% What follows is a super-summary of what this .cnf file can
+% contain. Please read the Kpathsea manual for more information.
+%
+% Each statement in this file boils down to:
+% <variable>[.<program>] [=] <value>
+%
+% Neither the <variable> nor the <value> may be empty.
+% Any identifier (sticking to A-Za-z_ for names is safest) can be assigned.
+% The `=' (and surrounding spaces) is optional.
+% $foo (or ${foo}) in a value expands to the envvar or cnf value of foo.
+% Lines can be continued with a \; no whitespace removal is done.
+%
+% Earlier entries (in the same or another file) override later ones, and
+% an environment variable foo overrides any texmf.cnf definition of foo.
+%
+% All definitions are read before anything is expanded, so you can use
+% variables before they are defined.
+%
+% If a variable assignment is qualified with `.PROGRAM', it is ignored
+% unless the current executable (last filename component of argv[0]) is
+% named PROGRAM. This foo.PROGRAM construct is not recognized on the
+% right-hand side. For environment variables, use FOO_PROGRAM.
+%
+% Which file formats use which paths for searches is described in the
+% various programs' and the Kpathsea documentation (http://tug.org/kpathsea).
+%
+% // means to search subdirectories (recursively).
+% A leading !! means to look only in the ls-R db, never on the disk.
+% In this file, either ; or : can be used to separate path components.
+% A leading/trailing/doubled path separator in the paths will be
+% expanded into the compile-time default. Probably not what you want.
+%
+% Brace notation is supported, for example: /usr/local/{mytex,othertex}
+% expands to /usr/local/mytex:/usr/local/othertex.
+
+
+% Part 1: Search paths and directories.
+
+% This is the parent directory of our several trees, i.e.,
+% /usr/local/texlive/YYYY in the original TeX Live distribution.
+%
+% The path definitions here assume the directories are organized
+% according to the TeX Directory Structure (http://tug.org/tds).
+%
+% Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
+% Kpathsea sets (in kpathsea/progname.c):
+% SELFAUTOLOC (directory of the binary=/usr/local/texlive/YYYY/bin/i386-linux),
+% SELFAUTODIR (its parent = /usr/local/texlive/YYYY/bin),
+% SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
+% SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
+% Sorry for the off-by-one-generation names.
+TEXMFROOT = $SELFAUTOPARENT
+
+% The main tree of distributed packages and programs:
+TEXMFDIST = $TEXMFROOT/texmf-dist
+
+% We used to have a separate /texmf tree with some core programs and files.
+% Keep the variable name.
+TEXMFMAIN = $TEXMFDIST
+
+% Local additions to the distribution trees.
+TEXMFLOCAL = $SELFAUTOGRANDPARENT/texmf-local
+
+% TEXMFSYSVAR, where *-sys store cached runtime data.
+TEXMFSYSVAR = $TEXMFROOT/texmf-var
+
+% TEXMFSYSCONFIG, where *-sys store configuration data.
+TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
+
+% Per-user texmf tree(s) -- organized per the TDS, as usual. To define
+% more than one per-user tree, set this to a list of directories in
+% braces, as described above. (This used to be HOMETEXMF.) ~ expands
+% to %USERPROFILE% on Windows, $HOME otherwise.
+TEXMFHOME = ~/texmf
+
+% TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+TEXMFVAR = ~/.texlive2021/texmf-var
+
+% TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+TEXMFCONFIG = ~/.texlive2021/texmf-config
+
+% This is the value manipulated by tlmgr's auxtrees subcommand in the
+% root texmf.cnf. Kpathsea warns about a literally empty string for a
+% value, hence the empty braces.
+TEXMFAUXTREES = {}
+
+% List all the texmf trees. For an explanation of what they are, see the
+% TeX Live manual.
+%
+% For texconfig to work properly, TEXMFCONFIG and TEXMFVAR should be named
+% explicitly and before other trees.
+%
+% TEXMFLOCAL precedes TEXMFDIST because locally-installed versions
+% should take precedence over distribution files -- although it is
+% generally a source of confusion to have different versions of a
+% package installed, whatever the trees, so try to avoid it.
+%
+% The odd-looking $TEXMFAUXTREES$TEXMF... construct is so that if no auxtree is
+% ever defined (the 99% common case), no extra elements will be added to
+% the search paths. tlmgr takes care to end any value with a trailing comma.
+TEXMF = {$TEXMFAUXTREES$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFDIST}
+
+% Where to look for, and where mktexlsr creates, ls-R files. By default,
+% this is all and only the !! elements of TEXMF, so that mktexlsr does not
+% create ls-R files in the non-!! elements -- because if an ls-R is
+% present, it will be used, and the disk will not (usually) be searched,
+% regardless of !!. Although in principle a directory listed here need
+% not contain an ls-R file, in practice they all should.
+TEXMFDBS = {!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFDIST}
+
+% The system trees. These are the trees that are shared by all users.
+% If a tree appears in this list, the mktex* scripts will use
+% VARTEXFONTS for generated files, if the original tree isn't writable;
+% otherwise the current working directory is used.
+SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFDIST
+
+% First writable tree here is used by Lua(La)TeX for the font cache.
+% LuaLaTeX uses the value here, while ConTeXt uses the same variable but
+% from texmfcnf.lua; therefore the two values should be kept in sync.
+% (As should everything else in texmf.cnf <-> texmfcnf.lua.)
+TEXMFCACHE = $TEXMFSYSVAR;$TEXMFVAR
+
+% Where generated fonts may be written. This tree is used when the sources
+% were found in a system tree and either that tree wasn't writable, or the
+% varfonts feature was enabled in MT_FEATURES in mktex.cnf.
+VARTEXFONTS = $TEXMFVAR/fonts
+
+% On some systems, there will be a system tree which contains all the font
+% files that may be created as well as the formats. For example
+% TEXMFVAR = /var/lib/texmf
+% is used in many distros. In this case, set VARTEXFONTS like this
+%VARTEXFONTS = $TEXMFVAR/fonts
+% and do not mention it in TEXMFDBS (but _do_ mention TEXMFVAR).
+%
+% Remove $VARTEXFONTS from TEXMFDBS if the VARTEXFONTS directory is below
+% one of the TEXMF directories (avoids overlapping ls-R files).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Usually you will not need to edit any of the following variables.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% WEB2C is for Web2C specific files. The current directory may not be
+% a good place to look for them.
+WEB2C = $TEXMF/web2c
+
+% This variable exists only to be redefined; it is used in nearly all
+% search paths. If a document has source files not only in the current
+% directory but also in subdirectories, it is convenient to set
+% TEXMFDOTDIR=.// so that everything will be searched automatically.
+% On the other hand, if you never want the current directory to be
+% searched at all, setting TEXMFDOTDIR=/nonesuch should come close.
+%
+TEXMFDOTDIR = .
+
+% TEXINPUTS is for TeX input files -- i.e., anything to be found by \input
+% or \openin, including .sty, .eps, etc. We specify paths for all known
+% formats, past or present. Not all of them are built these days.
+
+% Plain TeX. Have the command tex check all directories as a last
+% resort, we may have plain-compatible stuff anywhere. Prefer
+% latex/ to latex-dev/, implying that we have to add a latex, element to
+% every TEXINPUTS tree that recursively searches $TEXMF/tex//, which is
+% all of them except ConTeXt.
+TEXINPUTS.tex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+
+% Fontinst needs to read afm files.
+TEXINPUTS.fontinst = $TEXMFDOTDIR;$TEXMF/{tex,fonts/afm}//
+
+% Other plain-based formats.
+TEXINPUTS.amstex = $TEXMFDOTDIR;$TEXMF/tex/{amstex,plain,generic,latex,}//
+TEXINPUTS.csplain = $TEXMFDOTDIR;$TEXMF/tex/{csplain,plain,generic,latex,}//
+TEXINPUTS.eplain = $TEXMFDOTDIR;$TEXMF/tex/{eplain,plain,generic,latex,}//
+TEXINPUTS.ftex = $TEXMFDOTDIR;$TEXMF/tex/{formate,plain,generic,latex,}//
+TEXINPUTS.mex = $TEXMFDOTDIR;$TEXMF/tex/{mex,plain,generic,latex,}//
+TEXINPUTS.texinfo = $TEXMFDOTDIR;$TEXMF/tex/{texinfo,plain,generic,latex,}//
+
+% LaTeX2e specific macros are stored in latex/, macros that can only be
+% used with 2.09 in latex209/. In addition, we look in the directory
+% latex209, useful for macros that were written for 2.09 and do not
+% mention 2e at all, but can be used with 2e. The latex-dev/ subtree
+% may contain release candidates for testing.
+TEXINPUTS.cslatex = $TEXMFDOTDIR;$TEXMF/tex/{cslatex,csplain,latex,generic,}//
+TEXINPUTS.latex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.latex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,latex,generic,}//
+TEXINPUTS.latex209 = $TEXMFDOTDIR;$TEXMF/tex/{latex209,generic,latex,}//
+TEXINPUTS.olatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+
+% MLTeX.
+TEXINPUTS.frlatex = $TEXMFDOTDIR;$TEXMF/tex/{french,latex,generic,}//
+TEXINPUTS.frtex = $TEXMFDOTDIR;$TEXMF/tex/{french,plain,generic,latex,}//
+TEXINPUTS.mllatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.mltex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+
+% e-TeX.
+TEXINPUTS.elatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.etex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+
+% pdfTeX.
+TEXINPUTS.pdfcslatex = $TEXMFDOTDIR;$TEXMF/tex/{cslatex,csplain,latex,generic,}//
+TEXINPUTS.pdfcsplain = $TEXMFDOTDIR;$TEXMF/tex/{csplain,plain,generic,latex,}//
+TEXINPUTS.pdflatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.pdflatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,latex,generic,}//
+TEXINPUTS.pdfmex = $TEXMFDOTDIR;$TEXMF/tex/{mex,plain,generic,latex,}//
+TEXINPUTS.utf8mex = $TEXMFDOTDIR;$TEXMF/tex/{mex,plain,generic,latex,}//
+TEXINPUTS.pdftex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+TEXINPUTS.pdftexinfo = $TEXMFDOTDIR;$TEXMF/tex/{texinfo,plain,generic,latex,}//
+TEXINPUTS.pdfamstex = $TEXMFDOTDIR;$TEXMF/tex/{amstex,plain,generic,latex,}//
+
+% pdfeTeX.
+TEXINPUTS.pdfelatex = $TEXMFDOTDIR;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.pdfetex = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+
+% LuaTeX.
+TEXINPUTS.luatex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}//
+TEXINPUTS.luajittex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}//
+TEXINPUTS.luahbtex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}//
+TEXINPUTS.luajithbtex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}//
+TEXINPUTS.dviluatex = $TEXMFDOTDIR;$TEXMF/tex/{luatex,plain,generic,latex,}//
+TEXINPUTS.lualatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.lualatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}//
+TEXINPUTS.luajitlatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.luahblatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.luahblatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}//
+TEXINPUTS.luajithblatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.dvilualatex = $TEXMFDOTDIR;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.dvilualatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}//
+
+% HarfTeX.
+TEXINPUTS.harftex = $TEXMFDOTDIR;$TEXMF/tex/{harftex,luatex,plain,generic,latex,}//
+TEXINPUTS.harflatex = $TEXMFDOTDIR;$TEXMF/tex/{harflatex,harftex,lualatex,latex,luatex,generic,}//
+TEXINPUTS.harflatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,harflatex,harftex,lualatex,latex,luatex,generic,}//
+
+% XeTeX.
+TEXINPUTS.xelatex = $TEXMFDOTDIR;$TEXMF/tex/{xelatex,latex,xetex,generic,}//
+TEXINPUTS.xelatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,xelatex,latex,xetex,generic,}//
+TEXINPUTS.xeplain = $TEXMFDOTDIR;$TEXMF/tex/{xeplain,eplain,plain,xetex,generic,latex,}//
+TEXINPUTS.xetex = $TEXMFDOTDIR;$TEXMF/tex/{xetex,plain,generic,latex,}//
+
+% Omega / Aleph.
+TEXINPUTS.aleph = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+TEXINPUTS.elambda = $TEXMFDOTDIR;$TEXMF/tex/{lambda,latex,generic,}//
+TEXINPUTS.eomega = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+TEXINPUTS.lambda = $TEXMFDOTDIR;$TEXMF/tex/{lambda,latex,generic,}//
+TEXINPUTS.lamed = $TEXMFDOTDIR;$TEXMF/tex/{lambda,latex,generic,}//
+TEXINPUTS.omega = $TEXMFDOTDIR;$TEXMF/tex/{plain,generic,latex,}//
+
+% p(La)TeX.
+TEXINPUTS.ptex = $TEXMFDOTDIR;$TEXMF/tex/{ptex,plain,generic,latex,}//
+TEXINPUTS.platex = $TEXMFDOTDIR;$TEXMF/tex/{platex,latex,generic,}//
+TEXINPUTS.platex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,platex,latex,generic,}//
+
+% epTeX, and use that engine for pmpost.
+TEXINPUTS.eptex = $TEXMFDOTDIR;$TEXMF/tex/{ptex,plain,generic,latex,}//
+TEX.pmpost = eptex
+
+% p(La)TeX-ng
+TEXINPUTS.ptex-ng = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}//
+TEXINPUTS.platex-ng = $TEXMFDOTDIR;$TEXMF/tex/{uplatex,platex,latex,generic,}//
+
+% (e)up(La)TeX, and for upmpost
+TEXINPUTS.uplatex = $TEXMFDOTDIR;$TEXMF/tex/{uplatex,platex,latex,generic,}//
+TEXINPUTS.uplatex-dev = $TEXMFDOTDIR;$TEXMF/tex/{latex-dev,uplatex,platex,latex,generic,}//
+TEXINPUTS.uptex = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}//
+TEXINPUTS.euptex = $TEXMFDOTDIR;$TEXMF/tex/{uptex,ptex,plain,generic,latex,}//
+TEX.upmpost = euptex
+
+% pBibTeX bibliographies and style files.
+BIBINPUTS.pbibtex = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bib//
+BSTINPUTS.pbibtex = $TEXMFDOTDIR;$TEXMF/{pbibtex,bibtex}/bst//
+
+% upBibTeX bibliographies and style files.
+BIBINPUTS.upbibtex = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bib//
+BSTINPUTS.upbibtex = $TEXMFDOTDIR;$TEXMF/{upbibtex,pbibtex,bibtex}/bst//
+
+% ConTeXt.
+TEXINPUTS.context = $TEXMFDOTDIR;$TEXMF/tex/{context,plain,generic,}//
+
+% jadetex.
+TEXINPUTS.jadetex = $TEXMFDOTDIR;$TEXMF/tex/{jadetex,latex,generic,latex,}//
+TEXINPUTS.pdfjadetex = $TEXMFDOTDIR;$TEXMF/tex/{jadetex,latex,generic,latex,}//
+
+% XMLTeX.
+TEXINPUTS.xmltex = $TEXMFDOTDIR;$TEXMF/tex/{xmltex,latex,generic,}//
+TEXINPUTS.pdfxmltex = $TEXMFDOTDIR;$TEXMF/tex/{xmltex,latex,generic,}//
+
+% Miscellany, no longer built.
+TEXINPUTS.lamstex = $TEXMFDOTDIR;$TEXMF/tex/{lamstex,plain,generic,latex,}//
+TEXINPUTS.lollipop = $TEXMFDOTDIR;$TEXMF/tex/{lollipop,plain,generic,latex,}//
+TEXINPUTS.frpdflatex = $TEXMFDOTDIR;$TEXMF/tex/{french,latex,generic,}//
+TEXINPUTS.frpdftex = $TEXMFDOTDIR;$TEXMF/tex/{french,plain,generic,latex,}//
+
+% Earlier entries override later ones, so put this generic one last.
+TEXINPUTS = $TEXMFDOTDIR;$TEXMF/tex/{$progname,generic,latex,}//
+
+% ttf2tfm.
+TTF2TFMINPUTS = $TEXMFDOTDIR;$TEXMF/ttf2pk//
+
+% Metafont, MetaPost inputs.
+MFINPUTS = $TEXMFDOTDIR;$TEXMF/metafont//;{$TEXMF/fonts,$VARTEXFONTS}/source//
+MPINPUTS = $TEXMFDOTDIR;$TEXMF/metapost//
+
+% Dump files (fmt/base/mem) for vir{tex,mf,mp} to read.
+% We want to find the engine-specific file, e.g., cont-en.fmt can
+% exist under both pdftex/ and xetex/. But just in case some formats
+% end up without an engine directory, look directly in web2c/ too.
+% We repeat the same definition three times because of the way fmtutil
+% is implemented; if we use ${TEXFORMATS}, the mpost/mf/etc. formats
+% will not be found.
+TEXFORMATS = $TEXMFDOTDIR;$TEXMF/web2c{/$engine,}
+MFBASES = $TEXMFDOTDIR;$TEXMF/web2c{/$engine,}
+MPMEMS = $TEXMFDOTDIR;$TEXMF/web2c{/$engine,}
+%
+% As of 2008, pool files don't exist any more (the strings are compiled
+% into the binaries), but just in case something expects to find these:
+TEXPOOL = $TEXMFDOTDIR;$TEXMF/web2c
+MFPOOL = ${TEXPOOL}
+MPPOOL = ${TEXPOOL}
+
+% support the original xdvi. Must come before the generic settings.
+PKFONTS.XDvi = $TEXMFDOTDIR;$TEXMF/%s;$VARTEXFONTS/pk/{%m,modeless}//
+VFFONTS.XDvi = $TEXMFDOTDIR;$TEXMF/%s
+PSHEADERS.XDvi = $TEXMFDOTDIR;$TEXMF/%q{dvips,fonts/type1}//
+TEXPICTS.XDvi = $TEXMFDOTDIR;$TEXMF/%q{dvips,tex}//
+
+% Device-independent font metric files.
+VFFONTS = $TEXMFDOTDIR;$TEXMF/fonts/vf//
+TFMFONTS = $TEXMFDOTDIR;{$TEXMF/fonts,$VARTEXFONTS}/tfm//
+
+% The $MAKETEX_MODE below means the drivers will not use a cx font when
+% the mode is ricoh. If no mode is explicitly specified, kpse_prog_init
+% sets MAKETEX_MODE to /, so all subdirectories are searched. See the manual.
+% The modeless part guarantees that bitmaps for PostScript fonts are found.
+PKFONTS = $TEXMFDOTDIR;{$TEXMF/fonts,$VARTEXFONTS}/pk/{$MAKETEX_MODE,modeless}//
+
+% Similarly for the GF format, which only remains in existence because
+% Metafont outputs it (and MF isn't going to change).
+GFFONTS = $TEXMFDOTDIR;$TEXMF/fonts/gf/$MAKETEX_MODE//
+
+% A backup for PKFONTS and GFFONTS. Not used for anything.
+GLYPHFONTS = $TEXMFDOTDIR;$TEXMF/fonts
+
+% A place to puth everything that doesn't fit the other font categories.
+MISCFONTS = $TEXMFDOTDIR;$TEXMF/fonts/misc//
+
+% font name map files. This isn't just fonts/map// because ConTeXt
+% wants support for having files with the same name in the different
+% subdirs. Maybe if the programs ever get unified to accepting the same
+% map file syntax the definition can be simplified again.
+TEXFONTMAPS = $TEXMFDOTDIR;$TEXMF/fonts/map/{$progname,pdftex,dvips,}//
+
+% BibTeX bibliographies and style files. bibtex8 also uses these.
+BIBINPUTS = $TEXMFDOTDIR;$TEXMF/bibtex/bib//
+BSTINPUTS = $TEXMFDOTDIR;$TEXMF/bibtex/{bst,csf}//
+
+% MlBibTeX.
+MLBIBINPUTS = $TEXMFDOTDIR;$TEXMF/bibtex/bib/{mlbib,}//
+MLBSTINPUTS = $TEXMFDOTDIR;$TEXMF/bibtex/{mlbst,bst}//
+
+% .ris and .bltxml bibliography formats.
+RISINPUTS = $TEXMFDOTDIR;$TEXMF/biber/ris//
+BLTXMLINPUTS = $TEXMFDOTDIR;$TEXMF/biber/bltxml//
+
+% MFT style files.
+MFTINPUTS = $TEXMFDOTDIR;$TEXMF/mft//
+
+% PostScript headers and prologues (.pro); unfortunately, some programs
+% also use this for acessing font files (enc, type1, truetype)
+TEXPSHEADERS = $TEXMFDOTDIR;$TEXMF/{dvips,fonts/{enc,type1,type42,type3}}//
+TEXPSHEADERS.gsftopk = $TEXMFDOTDIR;$TEXMF/{dvips,fonts/{enc,type1,type42,type3,truetype}}//
+
+% OSFONTDIR is to provide a convenient hook for allowing TeX to find
+% fonts installed on the system (outside of TeX). An empty default
+% value would add "//" to the search paths, so we give it a dummy value.
+OSFONTDIR = /please/set/osfontdir/in/the/environment
+
+% PostScript Type 1 outline fonts.
+T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
+
+% PostScript AFM metric files.
+AFMFONTS = $TEXMFDOTDIR;$TEXMF/fonts/afm//;$OSFONTDIR//
+
+% TrueType outline fonts.
+TTFONTS = $TEXMFDOTDIR;$TEXMF/fonts/{truetype,opentype}//;$OSFONTDIR//
+
+% OpenType outline fonts.
+OPENTYPEFONTS = $TEXMFDOTDIR;$TEXMF/fonts/{opentype,truetype}//;$OSFONTDIR//
+
+% Type 42 outline fonts.
+T42FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type42//
+
+% Ligature definition files.
+LIGFONTS = $TEXMFDOTDIR;$TEXMF/fonts/lig//
+
+% Dvips' config.* files (this name should not start with `TEX'!).
+TEXCONFIG = $TEXMF/dvips//
+
+% Makeindex style (.ist) files.
+INDEXSTYLE = $TEXMFDOTDIR;$TEXMF/makeindex//
+
+% mendex dictionary files. Used internally by mendex and upmendex.
+% It is not necessary to introduce a new format in Kpathsea.
+INDEXDICTIONARY = $TEXMFDOTDIR;$TEXMF/makeindex//
+
+% Font encoding files (.enc).
+ENCFONTS = $TEXMFDOTDIR;$TEXMF/fonts/enc//
+
+% CMap files.
+CMAPFONTS = $TEXMFDOTDIR;$TEXMF/fonts/cmap//
+
+% Subfont definition files.
+SFDFONTS = $TEXMFDOTDIR;$TEXMF/fonts/sfd//
+
+% OpenType feature files (.fea).
+FONTFEATURES=$TEXMFDOTDIR;$TEXMF/fonts/fea//
+
+% .cid and .cidmap
+FONTCIDMAPS=$TEXMFDOTDIR;$TEXMF/fonts/cid//
+
+% pdftex config files:
+PDFTEXCONFIG = $TEXMFDOTDIR;$TEXMF/pdftex/{$progname,}//
+
+% Used by DMP (ditroff-to-mpx), called by makempx -troff.
+TRFONTS = /usr{/local,}/share/groff/{current/font,site-font}/devps
+MPSUPPORT = $TEXMFDOTDIR;$TEXMF/metapost/support
+
+% For xdvi to find mime.types and .mailcap, if they do not exist in
+% ~. These are single directories, not paths.
+% (But the default mime.types, at least, may well suffice.)
+MIMELIBDIR = $TEXMFROOT/etc
+MAILCAPLIBDIR = $TEXMFROOT/etc
+
+% Default settings for the fontconfig library as used by the Windows
+% versions of xetex/xdvipdfmx. Not used by xetex on Unixish systems.
+% ConTeXT MkIV (all platforms) also use these values.
+%
+FONTCONFIG_FILE = fonts.conf
+FONTCONFIG_PATH = $TEXMFSYSVAR/fonts/conf
+FC_CACHEDIR = $TEXMFSYSVAR/fonts/cache
+
+% TeX documentation and source files, for use with texdoc and kpsewhich.
+TEXDOCS = $TEXMF/doc//
+TEXSOURCES = $TEXMFDOTDIR;$TEXMF/source//
+
+% Top-level directory for any string translations for the binaries, in
+% the same structure as the usual system locale/ directories. This is a
+% single directory, not a path.
+TEXMFLOCALEDIR = $TEXMFMAIN/locale
+
+% Web and CWeb input paths.
+WEBINPUTS = $TEXMFDOTDIR;$TEXMF/web//
+CWEBINPUTS = $TEXMFDOTDIR;$TEXMF/cweb//
+
+% Omega-related fonts and other files.
+OFMFONTS = $TEXMFDOTDIR;{$TEXMF/fonts,$VARTEXFONTS}/{ofm,tfm}//
+OPLFONTS = $TEXMFDOTDIR;{$TEXMF/fonts,$VARTEXFONTS}/opl//
+OVFFONTS = $TEXMFDOTDIR;{$TEXMF/fonts,$VARTEXFONTS}/{ovf,vf}//
+OVPFONTS = $TEXMFDOTDIR;{$TEXMF/fonts,$VARTEXFONTS}/ovp//
+OTPINPUTS = $TEXMFDOTDIR;$TEXMF/omega/otp//
+OCPINPUTS = $TEXMFDOTDIR;$TEXMF/omega/ocp//
+
+% Some additional input variables for several programs. If you add
+% a program that uses the `other text files' or `other binary files'
+% search formats, you'll want to add their variables here as well.
+T4HTINPUTS = $TEXMFDOTDIR;$TEXMF/tex4ht//
+
+%% t4ht utility, sharing files with TeX4ht
+TEX4HTFONTSET=alias,iso8859,unicode
+TEX4HTINPUTS = $TEXMFDOTDIR;$TEXMF/tex4ht/base//;$TEXMF/tex4ht/ht-fonts/{$TEX4HTFONTSET}//
+
+% TeXworks editor configuration and settings
+TW_LIBPATH = $TEXMFCONFIG/texworks
+TW_INIPATH = $TW_LIBPATH
+
+% For security, do not look in . for dvipdfmx.cfg, since the D option
+% would allow command execution.
+DVIPDFMXINPUTS = $TEXMF/dvipdfmx
+
+% Lua needs to look in TEXINPUTS for lua scripts distributed with packages.
+%
+% But we can't simply use $TEXINPUTS, since then if TEXINPUTS is set in
+% the environment with a colon, say, TEXINPUTS=/some/dir:, the intended
+% default expansion of TEXINPUTS will not happen and .lua files under
+% the /tex/ tree will not be found.
+%
+% So, duplicate the TEXINPUTS.*lualatex values as LUAINPUTS.*lualatex.
+% The default LUAINPUTS suffices for luatex and dviluatex.
+%
+LUAINPUTS.lualatex = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+LUAINPUTS.lualatex-dev = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}//
+%
+LUAINPUTS.luahblatex = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{luahblatex,luahbtex,lualatex,latex,luatex,generic,}//
+LUAINPUTS.luahblatex-dev = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{latex-dev,luahblatex,luahbtex,lualatex,latex,luatex,generic,}//
+%
+LUAINPUTS.dvilualatex = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+LUAINPUTS.dvilualatex-dev = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{latex-dev,lualatex,latex,luatex,generic,}//
+%
+LUAINPUTS.harflatex = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{harflatex,harftex,lualatex,latex,luatex,generic,}//
+LUAINPUTS.harflatex-dev = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{latex-dev,harflatex,harftex,lualatex,latex,luatex,generic,}//
+%
+LUAINPUTS = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{luatex,plain,generic,latex,}//
+
+% Lua needs to look for binary lua libraries distributed with packages.
+CLUAINPUTS = $TEXMFDOTDIR;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//
+
+% Architecture independent executables.
+TEXMFSCRIPTS = $TEXMF/scripts/{$progname,$engine,}//
+
+% Other languages.
+JAVAINPUTS = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/java//
+PERLINPUTS = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/perl//
+PYTHONINPUTS = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/python//
+RUBYINPUTS = $TEXMFDOTDIR;$TEXMF/scripts/{$progname,$engine,}/ruby//
+
+
+%% The mktex* scripts rely on KPSE_DOT. Do not set it in the environment.
+% KPSE_DOT = .
+
+% This definition isn't used from this .cnf file itself (that would be
+% paradoxical), but the compile-time default in paths.h is built from it.
+% The SELFAUTO* variables are set automatically from the location of
+% argv[0], in kpse_set_program_name.
+%
+% This main texmf.cnf file is installed, for a release YYYY, in a
+% directory such as /usr/local/texlive/YYYY/texmf-dist/web2c/texmf.cnf.
+% Since this file is subject to future updates, the TeX Live installer
+% or human administrator may also create a file
+% /usr/local/texlive/YYYY/texmf.cnf; any settings in this latter file
+% will take precedence over the distributed one.
+%
+% For security reasons, it is best not to include . in this path.
+%
+% The idea behind this lengthy definition: for each of
+% SELFAUTO{LOC,DIR,PARENT}, look in the directory,
+% then the subdirectories share/texmf-local, share/texmf-dist, share/texmf,
+% then the subdirectories ./texmf-local, texmf-dist, ./texmf.
+% At any given installation, most of these directories will not exist,
+% but they all turn out to be useful somewhere.
+%
+% Special addition -- we want to include one more directory: the
+% great-grandparent's texmf-local, because that is how TL is installed
+% by default. That is, given a binary
+% /usr/local/texlive/YYYY/bin/PLATFORM/kpsewhich, it should find
+% /usr/local/texlive/texmf-local/web2c/texmf.cnf. I.e., not under YYYY.
+%
+% As a result, we cannot use actual brace expansion in the definition,
+% since we don't want to scatter ../'s throughout the value. Hence we
+% explicitly list every directory. Arguably more understandable anyway.
+%
+TEXMFCNF = {\
+$SELFAUTOLOC,\
+$SELFAUTOLOC/share/texmf-local/web2c,\
+$SELFAUTOLOC/share/texmf-dist/web2c,\
+$SELFAUTOLOC/share/texmf/web2c,\
+$SELFAUTOLOC/texmf-local/web2c,\
+$SELFAUTOLOC/texmf-dist/web2c,\
+$SELFAUTOLOC/texmf/web2c,\
+\
+$SELFAUTODIR,\
+$SELFAUTODIR/share/texmf-local/web2c,\
+$SELFAUTODIR/share/texmf-dist/web2c,\
+$SELFAUTODIR/share/texmf/web2c,\
+$SELFAUTODIR/texmf-local/web2c,\
+$SELFAUTODIR/texmf-dist/web2c,\
+$SELFAUTODIR/texmf/web2c,\
+\
+$SELFAUTOGRANDPARENT/texmf-local/web2c,\
+$SELFAUTOPARENT,\
+\
+$SELFAUTOPARENT/share/texmf-local/web2c,\
+$SELFAUTOPARENT/share/texmf-dist/web2c,\
+$SELFAUTOPARENT/share/texmf/web2c,\
+$SELFAUTOPARENT/texmf-local/web2c,\
+$SELFAUTOPARENT/texmf-dist/web2c,\
+$SELFAUTOPARENT/texmf/web2c\
+}
+%
+% For reference, here is the old brace-using definition:
+%TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
+
+% kpathsea 3.5.3 and later sets these at runtime. To avoid empty
+% expansions from binaries linked against an earlier version of the
+% library, we set $progname and $engine to something non-empty:
+progname = unsetprogname
+engine = unsetengine
+
+
+% Part 2: Options.
+
+% If this option is set to true, `tex a.b' will look first for a.b.tex
+% (within each path element), and then for a.b, i.e., we try standard
+% extensions first. If this is false, we first look for a.b and then
+% a.b.tex, i.e., we try the name as-is first.
+%
+% Both names are always tried; the difference is the order in which they
+% are tried. The setting applies to all searches, not just .tex.
+%
+% This setting only affects names being looked up which *already* have
+% an extension. A name without an extension (e.g., `tex story') will
+% always have an extension added first.
+%
+% The default is true, because we already avoid adding the standard
+% extension(s) in the usual cases. E.g., babel.sty will only look for
+% babel.sty, not babel.sty.tex, regardless of this setting.
+try_std_extension_first = t
+
+% Enable system commands via \write18{...}. When enabled fully (set to
+% t), obviously insecure. When enabled partially (set to p), only the
+% commands listed in shell_escape_commands are allowed. Although this
+% is not fully secure either, it is much better, and so useful that we
+% enable it for everything but bare tex.
+shell_escape = p
+
+% No spaces in this command list.
+%
+% The programs listed here are as safe as any we know: they either do
+% not write any output files, respect openout_any, or have hard-coded
+% restrictions similar to or higher than openout_any=p. They also have
+% no features to invoke arbitrary other programs, and no known
+% exploitable bugs. All to the best of our knowledge. They also have
+% practical use for being called from TeX.
+%
+shell_escape_commands = \
+bibtex,bibtex8,\
+extractbb,\
+gregorio,\
+kpsewhich,\
+makeindex,\
+repstopdf,\
+r-mpost,\
+texosquery-jre8,\
+
+% we'd like to allow:
+% dvips - but external commands can be executed, need at least -R1.
+% epspdf, ps2pdf, pstopdf - need to respect openout_any,
+% and gs -dSAFER must be used and check for shell injection with filenames.
+% pygmentize - but is the filter feature insecure?
+% ps4pdf - but it calls an unrestricted latex.
+% rpdfcrop - maybe ok, but let's get experience with repstopdf first.
+% texindy,xindy - but is the module feature insecure?
+% ulqda - but requires optional SHA1.pm, so why bother.
+% tex, latex, etc. - need to forbid --shell-escape, and inherit openout_any.
+
+% plain "tex" should remain unenhanced.
+shell_escape.tex = f
+shell_escape.initex = f
+
+% This is used by the Windows script wrapper for restricting searching
+% for the purportedly safe shell_escape_commands above to system
+% directories.
+TEXMF_RESTRICTED_SCRIPTS = \
+ {!!$TEXMFLOCAL,!!$TEXMFDIST}/scripts/{$progname,$engine,}//
+
+% Do we allow TeX \input or \openin (openin_any), or \openout
+% (openout_any) on filenames starting with `.' (e.g., .rhosts) or
+% outside the current tree (e.g., /etc/passwd)?
+% a (any) : any file can be opened.
+% r (restricted) : disallow opening dot files
+% p (paranoid) : as `r' and disallow going to parent directories, and
+% restrict absolute paths to be under $TEXMFOUTPUT.
+openin_any = a
+openout_any = p
+
+% Write .log/.dvi/.aux/etc. files here, if the current directory is unwritable.
+%TEXMFOUTPUT = /tmp
+
+% If a dynamic file creation fails, log the command to this file, in
+% either the current directory or TEXMFOUTPUT. Set to the
+% empty string or 0 to avoid logging.
+MISSFONT_LOG = missfont.log
+
+% Set to a colon-separated list of words specifying warnings to suppress.
+% To suppress everything, use TEX_HUSH = all; this is currently equivalent to
+% TEX_HUSH = checksum:lostchar:readable:special
+% To suppress nothing, use TEX_HUSH = none or do not set the variable at all.
+TEX_HUSH = none
+
+% Allow TeX and MF to parse the first line of an input file for
+% the %&format construct.
+parse_first_line = t
+
+% But don't parse the first line if invoked as "tex", since we want that
+% to remain Knuth-compatible. The src_specials and
+% file_line_error_style settings, as well as the options -enctex,
+% -mltex, -8bit, etc., also affect this, but they are all off by default.
+parse_first_line.tex = f
+parse_first_line.initex = f
+
+% Normally we mention files created by \openout in the log file,
+% but again, trip-compatibility forbids this for (ini)tex.
+log_openout = t
+log_openout.tex = f
+log_openout.initex = f
+
+% Control file:line:error style messages.
+file_line_error_style = f
+
+% Enable the mktex... scripts by default? These must be set to 0 or 1.
+% Particular programs can and do override these settings, for example
+% dvips's -M option. Your first chance to specify whether the scripts
+% are invoked by default is at configure time.
+%
+% These values are ignored if the script names are changed; e.g., if you
+% set DVIPSMAKEPK to `foo', what counts is the value of the environment
+% variable/config value `FOO', not the `MKTEXPK' value.
+%
+%MKTEXTEX = 0
+%MKTEXPK = 0
+%MKTEXMF = 0
+%MKTEXTFM = 0
+%MKTEXFMT = 0
+%MKOCP = 0
+%MKOFM = 0
+
+% Used by makempx to run TeX. We use "etex" because MetaPost is
+% expecting DVI, and not "tex" because we want first line parsing.
+TEX = etex
+
+% Use Japanese eptex for Japanese pmpost.
+TEX.pmpost = eptex
+
+% These variables specify the external program called for the
+% interactive `e' option. %d is replaced by the line number and %s by
+% the current filename. The default is specified at compile-time, and
+% we let that stay in place since different platforms like different values.
+%TEXEDIT = vi +%d '%s' % default for Unix
+%TEXEDIT = texworks --position=+%d "%s" % default for Windows
+%MFEDIT = ${TEXEDIT}
+%MPEDIT = ${TEXEDIT}
+
+% The default `codepage and sort order' file for BibTeX8, when none is
+% given as command line option or environment variable.
+BIBTEX_CSFILE = 88591lat.csf
+
+% This variable is specific to Unix, to fall back to case-insensitive
+% search in non-system directories if there is no exact match. It is
+% enabled by default in texmf.cnf, but not enabled by default at
+% compile-time.
+%
+texmf_casefold_search = 1
+
+% This variable is specific to Windows. It must be set to 0 or 1. The
+% default is 0. Setting it to 1 tells the Windows script wrappers to
+% use an already installed Perl interpreter if one is found on the
+% search path, in preference to the Perl shipped with TeX Live. Thus,
+% it may be useful if you both (a) installed a full Perl distribution
+% for general use, and (b) need to run Perl programs from TL that use
+% additional modules we don't provide. The TL Perl does provide all the
+% standard Perl modules.
+%
+%TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 0
+
+
+% Part 3: Array and other sizes for TeX, Metafont, etc.
+%
+% If you want to change some of these sizes only for a certain TeX
+% variant, the usual dot notation works, as shown below for ConTeXt.
+% If a change here appears to be ignored, try redumping the format file.
+
+% Memory. Must be less than 8,000,000 total.
+%
+% main_memory is relevant only to initex, extra_mem_* only to non-ini.
+% Thus, have to redump the .fmt file after changing main_memory; to add
+% to existing fmt files, increase extra_mem_*. (To get an idea of how
+% much, try \tracingstats=2 in your TeX source file;
+% web2c/tests/memtest.tex might also be interesting.)
+%
+% To increase space for boxes (as might be needed by, e.g., PiCTeX),
+% increase extra_mem_bot.
+%
+% For some xy-pic samples, you may need as much as 700000 words of memory.
+% For the vast majority of documents, 60000 or less will do.
+%
+main_memory = 5000000 % words of inimemory available; also applies to inimf&mp
+extra_mem_top = 0 % extra high memory for chars, tokens, etc.
+extra_mem_bot = 0 % extra low memory for boxes, glue, breakpoints, etc.
+
+% ConTeXt needs lots of memory.
+extra_mem_top.context = 2000000
+extra_mem_bot.context = 4000000
+
+% Words of font info for TeX (total size of all TFM files, approximately).
+% Must be >= 20000 and <= 147483647 (without tex.ch changes).
+font_mem_size = 8000000
+
+% Total number of fonts. Must be >= 50 and <= 9000 (without tex.ch changes).
+font_max = 9000
+
+% Extra space for the hash table of control sequences.
+hash_extra = 600000
+
+% Max number of characters in all strings, including all error messages,
+% help texts, font names, control sequences. These values apply to TeX.
+pool_size = 6250000
+% Minimum pool space after TeX's own strings; must be at least
+% 25000 less than pool_size, but doesn't need to be nearly that large.
+string_vacancies = 90000
+% Maximum number of strings.
+max_strings = 500000
+% Min pool space left after loading .fmt.
+pool_free = 47500
+% Ensure at least this many strings are free after loading .fmt.
+strings_free = 100
+
+% Buffer size. TeX uses the buffer to contain input lines, but macro
+% expansion works by writing material into the buffer and reparsing the
+% line. As a consequence, certain constructs require the buffer to be
+% very large, even though most documents can be handled with a small value.
+buf_size = 200000
+
+% Hyphenation trie. The maximum possible is 4194303 (ssup_trie_size in
+% the sources), but we don't need that much. The value here suffices
+% for all known free hyphenation patterns to be loaded simultaneously
+% (as TeX Live does).
+%
+trie_size = 1000000
+
+hyph_size = 8191 % prime number of hyphenation exceptions, >610, <65535
+ % http://primes.utm.edu/curios/page.php/8191.html
+ % dynamically increased as necessary, so not important.
+nest_size = 500 % simultaneous semantic levels (e.g., groups)
+max_in_open = 15 % simultaneous input files and error insertions,
+ % also applies to MetaPost
+param_size = 10000 % simultaneous macro parameters, also applies to MP
+save_size = 200000 % for saving values outside current group
+stack_size = 5000 % simultaneous input sources
+
+% Limit on recursive expansion calls so TeX has a chance to quit nicely
+% before stack space runs out. The default is 10000. Normally there is no
+% reason to change it. The web2c manual has a bit more about this.
+%expand_depth = 10000
+
+% These are Omega-specific.
+ocp_buf_size = 500000 % character buffers for ocp filters.
+ocp_stack_size = 10000 % stacks for ocp computations.
+ocp_list_size = 1000 % control for multiple ocps.
+
+% For pdftex and luatex: default resolution for bitmaps;
+% commonly set via \pdfpkresolution when needed to be changed.
+%pk_dpi = 72
+
+% These work best if they are the same as the I/O buffer size, but it
+% doesn't matter much. Must be a multiple of 8.
+dvi_buf_size = 16384 % TeX
+gf_buf_size = 16384 % MF
+
+% It's probably inadvisable to change these. At any rate, we must have:
+% 45 < error_line < 255;
+% 30 < half_error_line < error_line - 15;
+% 60 <= max_print_line;
+% These apply to TeX, Metafont, and MetaPost.
+error_line = 79
+half_error_line = 50
+max_print_line = 79
+
+% Metafont only.
+screen_width.mf = 1664
+screen_depth.mf = 1200
+
+% BibTeX only (max_strings also determines hash_size and hash_prime).
+ent_str_size = 500
+glob_str_size = 200000
+max_strings.bibtex = 200000
+max_strings.bibtex8 = 200000
+max_strings.bibtexu = 200000
+max_strings.pbibtex = 200000
+max_strings.upbibtex= 200000
+
+% GFtype only.
+line_length.gftype = 500
+max_rows.gftype = 8191
+max_cols.gftype = 8191
+
+% Guess input encoding (SJIS vs. Unicode, etc.) in pTeX and friends?
+% Default is 1, to guess. Used on Windows only.
+guess_input_kanji_encoding = 1
+
+% command_line_encoding
+%
+% This variable is used on Windows only, and affects 4 TeX engines:
+% uptex, euptex, pdftex, xetex, and 2 drivers: dvips, [x]dvipdfmx.
+% Several applications also are affected by the variable:
+% dvi2tty.exe, disdvi.exe, dvibook.exe, dviconcat.exe, dviselect.exe,
+% dvitodvi.exe, and dvidvi.exe.
+% Only values utf8 or utf-8 are meaningful. Other values are simply
+% ignored. If file names in sources and DVI or XDV files are ASCII
+% only, the value of command_line_encoding is irrelevant.
+% If command_line_encoding = utf8 or command_line_encoding = utf-8,
+% file names in sources and DVI or XDV files are assumed to be UTF-8.
+% Default is utf-8, from 2019-07-24, to assume UTF-8 file names.
+% In order to switch off the function, define an environment variable:
+% set command_line_encoding=none
+% or write a line:
+% command_line_encoding = none
+% in a texmf.cnf prefered, for example $TEXMFLOCAL/web2c/texmf.cnf.
+command_line_encoding = utf-8
diff --git a/Build/source/texk/kpathsea/tilde.c b/Build/source/texk/kpathsea/tilde.c
new file mode 100644
index 00000000000..98cc93e79b2
--- /dev/null
+++ b/Build/source/texk/kpathsea/tilde.c
@@ -0,0 +1,198 @@
+/* tilde.c: expand user's home directories.
+
+ Copyright 1997, 1998, 2005, Olaf Weber.
+ Copyright 1993, 1995, 1996, 1997, 2008, 2011, 2016 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+#include <kpathsea/tilde.h>
+
+#undef USE_GETPWNAM
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#define USE_GETPWNAM 1
+#elif defined (WIN32) && !defined (__MINGW32__)
+#define USE_GETPWNAM 1
+#endif
+
+#ifdef WIN32
+#define HOMEVAR "USERPROFILE"
+#else
+#define HOMEVAR "HOME"
+#endif
+
+/* If NAME has a leading ~ or ~user, Unix-style, expand it to the user's
+ home directory, and return a new malloced string. If no ~, or no
+ <pwd.h>, just return NAME. */
+
+string
+kpathsea_tilde_expand (kpathsea kpse, string name)
+{
+ string expansion;
+ const_string home;
+ const_string prefix;
+#if defined(WIN32)
+ string p;
+#endif
+
+ (void)kpse; /* currenty not used */
+ assert (name);
+
+ /* If there is a leading "!!", set prefix to "!!", otherwise use
+ the empty string. After this, we can test whether a prefix was
+ found by checking *prefix, and it is safe to unconditionally
+ prepend it. */
+ if (name[0] == '!' && name[1] == '!') {
+ name += 2;
+ prefix = "!!";
+ } else {
+ prefix = "";
+ }
+
+ /* If no leading tilde, do nothing, and return the original string. */
+ if (*name != '~'
+#ifndef USE_GETPWNAM
+ /* Same for `~user' or `~user/', but no passwd database. */
+ || (name[1] && !IS_DIR_SEP (name[1]))
+#endif
+ ) {
+ if (*prefix)
+ name -= 2;
+ expansion = name;
+
+ } else {
+ /* If a bare tilde, return the home directory or `.'; if just `~user',
+ return that user's home directory or `.'. Very unlikely that the
+ directory name will do anyone any good, but ... */
+ unsigned c;
+
+#ifdef USE_GETPWNAM
+ /* If `~user' or `~user/', look up user in the passwd database. */
+ if (name[1] && !IS_DIR_SEP (name[1])) {
+ struct passwd *p;
+ string user;
+ c = 2;
+ while (!IS_DIR_SEP (name[c]) && name[c] != 0) { /* find user name */
+#if defined(WIN32)
+ if (kpathsea_IS_KANJI(kpse, name+c))
+ c++;
+#endif
+ c++;
+ }
+
+ user = (string) xmalloc (c);
+ strncpy (user, name + 1, c - 1);
+ user[c - 1] = 0;
+
+#if defined(WIN32) && !defined(__MINGW32__)
+ p = kpathsea_getpwnam (kpse, user);
+#else
+ /* We only need the cast here for (deficient) systems
+ which do not declare `getpwnam' in <pwd.h>. */
+ p = (struct passwd *) getpwnam (user);
+#endif
+ free (user);
+
+ /* If no such user, just use `.'. */
+ home = p ? p->pw_dir : ".";
+ } else
+#endif /* USE_GETPWNAM */
+ {
+ c = 1;
+ home = getenv (HOMEVAR);
+ if (!home)
+ home = ".";
+ }
+
+ /* handle leading // */
+ if (IS_DIR_SEP (*home) && IS_DIR_SEP (home[1]))
+ home++;
+
+ /* If HOME ends in /, omit the / in ~/ or ~user/. */
+ if (name[c]) {
+#if defined(WIN32)
+ const_string q;
+
+ for (q = home; *q; q++) {
+ if (IS_DIR_SEP (*q) && q[1] == 0)
+ c++;
+ else if (kpathsea_IS_KANJI(kpse, q))
+ q++;
+ }
+#else
+ if (IS_DIR_SEP (home[strlen (home) - 1]))
+ c++;
+#endif
+ }
+
+ expansion = concat3 (prefix, home, name + c);
+ }
+
+#if defined(WIN32)
+ for (p = expansion; *p; p++) {
+ if (*p == '\\')
+ *p = '/';
+ else if (kpathsea_IS_KANJI(kpse, p))
+ p++;
+ }
+#endif
+
+ /* We may return the same thing as the original, and then we might not
+ be returning a malloc-ed string. Callers beware. Sorry. */
+ return expansion;
+}
+
+#ifdef TEST
+
+void
+test_expand_tilde (const_string filename)
+{
+ string answer;
+
+ printf ("Tilde expansion of `%s':\t", filename ? filename : "(nil)");
+ answer = kpathsea_tilde_expand (kpse_def, (string)filename);
+ puts (answer);
+}
+
+int
+main (int argc, char **argv)
+{
+ string tilde_path = "tilde";
+ kpse_set_program_name(argv[0],NULL);
+ test_expand_tilde ("");
+ test_expand_tilde ("none");
+ test_expand_tilde ("~root");
+ test_expand_tilde ("~");
+ test_expand_tilde ("foo~bar");
+
+ test_expand_tilde ("!!");
+ test_expand_tilde ("!!none");
+ test_expand_tilde ("!!~root");
+ test_expand_tilde ("!!~");
+ test_expand_tilde ("!!foo~bar");
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST tilde.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/tilde.h b/Build/source/texk/kpathsea/tilde.h
new file mode 100644
index 00000000000..e570791482b
--- /dev/null
+++ b/Build/source/texk/kpathsea/tilde.h
@@ -0,0 +1,34 @@
+/* tilde.h: declare tilde expander.
+
+ Copyright 1993, 2008, 2010, 2011 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_TILDE_H
+#define KPATHSEA_TILDE_H
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+/* Replace a leading ~ or ~NAME in FILENAME with getenv ("HOME"), or
+ getenv ("USERPROFILE") on Windows, or with NAME's home directory,
+ respectively. Excise trailing slashes. FILENAME may not be null. */
+
+extern string kpathsea_tilde_expand (kpathsea kpse, string filename);
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not KPATHSEA_TILDE_H */
diff --git a/Build/source/texk/kpathsea/types.h b/Build/source/texk/kpathsea/types.h
new file mode 100644
index 00000000000..f62906dec0b
--- /dev/null
+++ b/Build/source/texk/kpathsea/types.h
@@ -0,0 +1,343 @@
+/* types.h: general types for kpathsea.
+
+ Copyright 1993, 1995, 1996, 2005, 2008-2014, 2016, 2019 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_TYPES_H
+#define KPATHSEA_TYPES_H
+
+/* Our string, boolean, etc. */
+#include <kpathsea/simpletypes.h>
+
+/* Required forever for any normal build, since we will never want to
+ remove the original interface. But to check that a program
+ only uses the new-style declarations, that is, is thread-safe,
+ could be useful to undefine. */
+#define KPSE_COMPAT_API 1
+
+#include <stdio.h> /* for FILE* */
+
+/* Declare int64_t and uint64_t, and define PRId64 etc. */
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if (!defined __cplusplus || defined __STDC_FORMAT_MACROS) && !defined PRId64
+# if SIZEOF_LONG == 8
+# define __PRI64_PREFIX "l"
+# else
+# define __PRI64_PREFIX "ll"
+# endif
+# define PRId64 __PRI64_PREFIX "d"
+# define PRIi64 __PRI64_PREFIX "i"
+# define PRIo64 __PRI64_PREFIX "o"
+# define PRIu64 __PRI64_PREFIX "u"
+# define PRIx64 __PRI64_PREFIX "x"
+# define PRIX64 __PRI64_PREFIX "X"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* function pointer prototype definitions for recorder */
+typedef void (*p_record_input) (const_string);
+typedef void (*p_record_output) (const_string);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* the cache structure from elt-dirs.c */
+#include <kpathsea/str-llist.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct
+{
+ const_string key;
+ str_llist_type *value;
+} cache_entry;
+
+/* from variable.c */
+typedef struct {
+ const_string var;
+ boolean expanding;
+} expansion_type;
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#include <kpathsea/hash.h>
+#include <kpathsea/str-list.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* from old tex-file.h */
+
+/* We put the glyphs first so we don't waste space in an array in
+ tex-glyph.c. Accompany a new format here with appropriate changes in
+ tex-file.c and kpsewhich.c (the suffix variable). */
+typedef enum
+{
+ kpse_gf_format,
+ kpse_pk_format,
+ kpse_any_glyph_format, /* ``any'' meaning gf or pk */
+ kpse_tfm_format,
+ kpse_afm_format,
+ kpse_base_format,
+ kpse_bib_format,
+ kpse_bst_format,
+ kpse_cnf_format,
+ kpse_db_format,
+ kpse_fmt_format,
+ kpse_fontmap_format,
+ kpse_mem_format,
+ kpse_mf_format,
+ kpse_mfpool_format,
+ kpse_mft_format,
+ kpse_mp_format,
+ kpse_mppool_format,
+ kpse_mpsupport_format,
+ kpse_ocp_format,
+ kpse_ofm_format,
+ kpse_opl_format,
+ kpse_otp_format,
+ kpse_ovf_format,
+ kpse_ovp_format,
+ kpse_pict_format,
+ kpse_tex_format,
+ kpse_texdoc_format,
+ kpse_texpool_format,
+ kpse_texsource_format,
+ kpse_tex_ps_header_format,
+ kpse_troff_font_format,
+ kpse_type1_format,
+ kpse_vf_format,
+ kpse_dvips_config_format,
+ kpse_ist_format,
+ kpse_truetype_format,
+ kpse_type42_format,
+ kpse_web2c_format,
+ kpse_program_text_format,
+ kpse_program_binary_format,
+ kpse_miscfonts_format,
+ kpse_web_format,
+ kpse_cweb_format,
+ kpse_enc_format,
+ kpse_cmap_format,
+ kpse_sfd_format,
+ kpse_opentype_format,
+ kpse_pdftex_config_format,
+ kpse_lig_format,
+ kpse_texmfscripts_format,
+ kpse_lua_format,
+ kpse_fea_format,
+ kpse_cid_format,
+ kpse_mlbib_format,
+ kpse_mlbst_format,
+ kpse_clua_format,
+ kpse_ris_format,
+ kpse_bltxml_format,
+ kpse_last_format /* one past last index */
+} kpse_file_format_type;
+
+
+/* Perhaps we could use this for path values themselves; for now, we use
+ it only for the program_enabled_p value. */
+typedef enum
+{
+ kpse_src_implicit, /* C initialization to zero */
+ kpse_src_compile, /* configure/compile-time default */
+ kpse_src_texmf_cnf, /* texmf.cnf, the kpathsea config file */
+ kpse_src_client_cnf, /* application config file, e.g., config.ps */
+ kpse_src_env, /* environment variable */
+ kpse_src_x, /* X Window System resource */
+ kpse_src_cmdline /* command-line option */
+} kpse_src_type;
+
+
+/* For each file format, we record the following information. The main
+ thing that is not part of this structure is the environment variable
+ lists. They are used directly in tex-file.c. We could incorporate
+ them here, but it would complicate the code a bit. We could also do
+ it via variable expansion, but not now, maybe not ever:
+ ${PKFONTS-${TEXFONTS-/usr/local/lib/texmf/fonts//}}. */
+
+typedef struct
+{
+ const_string type; /* Human-readable description. */
+ string path; /* The search path to use. */
+ const_string raw_path; /* Pre-$~ (but post-default) expansion. */
+ const_string path_source; /* Where the path started from. */
+ const_string override_path; /* From client environment variable. */
+ const_string client_path; /* E.g., from dvips's config.ps. */
+ const_string cnf_path; /* From texmf.cnf. */
+ const_string default_path; /* If all else fails. */
+ const_string *suffix; /* For kpse_find_file to check for/append. */
+ const_string *alt_suffix; /* More suffixes to check for. */
+ boolean suffix_search_only; /* Only search with a suffix? */
+ const_string program; /* ``mktexpk'', etc. */
+ int argc; /* Count of standard arguments. */
+ const_string *argv; /* Standard arguments to `program'. */
+ boolean program_enabled_p; /* Invoke `program'? */
+ kpse_src_type program_enable_level; /* Who said to invoke `program'. */
+ boolean binmode; /* Open files in binary mode? */
+} kpse_format_info_type;
+
+#if defined(WIN32) && !defined(__MINGW32__)
+struct passwd {
+ char *pw_name;
+ char *pw_passwd;
+ int pw_uid;
+ int pw_gid;
+ int pw_quota;
+ char *pw_gecos;
+ char *pw_dir;
+ char *pw_shell;
+};
+#endif /* WIN32 && !__MINGW32 */
+
+typedef struct kpathsea_instance *kpathsea;
+
+typedef struct kpathsea_instance {
+ /* from cnf.c */
+ p_record_input record_input; /* for --recorder */
+ p_record_output record_output; /* for --recorder */
+ hash_table_type cnf_hash; /* used by read_all_cnf */
+ boolean doing_cnf_init; /* for kpse_cnf_get */
+ /* from db.c */
+ hash_table_type db; /* The hash table for all ls-R's */
+ hash_table_type alias_db; /* The hash table for the aliases */
+ str_list_type db_dir_list; /* list of ls-R's */
+ /* from debug.c */
+ unsigned debug; /* for --kpathsea-debug */
+ /* from dir.c */
+ hash_table_type link_table; /* a hash of links-per-dir */
+ /* from elt-dir.c */
+ cache_entry *the_cache;
+ unsigned cache_length;
+ /* from fontmap.c */
+ hash_table_type map; /* the font mapping hash */
+ const_string map_path; /* path for kpse_fontmap_format */
+ /* from hash.c */
+ /* Print the hash values as integers if this is nonzero. */
+ boolean debug_hash_lookup_int;
+ /* from path-elt.c */
+ string elt; /* static buffer for return value */
+ unsigned elt_alloc;
+ const_string path; /* path we're currently working on */
+ /* from pathsearch.c */
+ boolean followup_search;
+ FILE *log_file;
+ boolean log_opened; /* Need to open the log file? */
+ /* from progname.c */
+ string invocation_name;
+ string invocation_short_name;
+ string program_name; /* pretended name */
+ int ll_verbose; /* for symlinks (conditional) */
+ /* from tex-file.c */
+ /* If non-NULL, try looking for this if can't find the real font. */
+ const_string fallback_font;
+ /* If non-NULL, default list of fallback resolutions comes from this
+ instead of the compile-time value. Set by dvipsk for the R config
+ cmd. *SIZES environment variables override/use as default. */
+ const_string fallback_resolutions_string;
+ /* If non-NULL, check these if can't find (within a few percent of) the
+ given resolution. List must end with a zero element. */
+ unsigned *fallback_resolutions;
+ kpse_format_info_type format_info[kpse_last_format];
+ /* from tex-make.c */
+ /* We never throw away stdout, since that is supposed to be the filename
+ found, if all is successful. This variable controls whether stderr
+ is thrown away. */
+ boolean make_tex_discard_errors;
+ FILE *missfont;
+ /* from variable.c */
+ expansion_type *expansions; /* sole variable of this type */
+ unsigned expansion_len ;
+ /* from xputenv.c */
+ /* These record the strings we've set and have to keep around.
+ This function can be called many times during a run, and this
+ allows us to reclaim memory we allocated. */
+ char **saved_env; /* keep track of changed items */
+ int saved_count;
+#if defined(WIN32) || defined(__CYGWIN__)
+ char **suffixlist;
+#endif /* WIN32 || __CYGWIN__ */
+
+#if defined(WIN32) && !defined(__MINGW32__)
+ char the_passwd_name[256];
+ char the_passwd_passwd[256];
+ char the_passwd_gecos[256];
+ char the_passwd_dir[256];
+ char the_passwd_shell[256];
+ struct passwd the_passwd;
+ int __system_allow_multiple_cmds;
+#endif /* WIN32 && !__MINGW32__ */
+#if defined(WIN32)
+ int Is_cp932_system;
+ int File_system_codepage, Win32_codepage;
+ int getc_len;
+ int getc_buff[4];
+ wchar_t wcbuf;
+ int st_len;
+ char st_buff[5];
+ char *st_str;
+#endif
+} kpathsea_instance;
+
+/* these come from kpathsea.c */
+extern KPSEDLL kpathsea kpathsea_new (void) ;
+extern KPSEDLL void kpathsea_finish (kpathsea kpse) ;
+
+#if defined (KPSE_COMPAT_API)
+
+#define kpse_bug_address kpathsea_bug_address
+
+extern KPSEDLL kpathsea_instance kpse_def_inst;
+extern KPSEDLL kpathsea kpse_def;
+
+#define kpathsea_debug kpse_def_inst.debug
+#define kpse_program_name kpse_def_inst.program_name
+#define kpse_record_input kpse_def_inst.record_input
+#define kpse_record_output kpse_def_inst.record_output
+#define kpse_make_tex_discard_errors kpse_def_inst.make_tex_discard_errors
+#define kpse_fallback_font kpse_def_inst.fallback_font
+#define kpse_fallback_resolutions_string kpse_def_inst.fallback_resolutions_string
+#define kpse_fallback_resolutions kpse_def_inst.fallback_resolutions
+#define kpse_format_info kpse_def_inst.format_info
+#define kpse_debug_hash_lookup_int kpse_def_inst.debug_hash_lookup_int
+
+#undef kpse_invocation_name
+#define kpse_invocation_name kpse_def_inst.invocation_name
+#undef kpse_invocation_short_name
+#define kpse_invocation_short_name kpse_def_inst.invocation_short_name
+
+#endif /* KPSE_COMPAT_API */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_TYPES_H */
diff --git a/Build/source/texk/kpathsea/uppercasify.c b/Build/source/texk/kpathsea/uppercasify.c
new file mode 100644
index 00000000000..9d96d381f77
--- /dev/null
+++ b/Build/source/texk/kpathsea/uppercasify.c
@@ -0,0 +1,35 @@
+/* uppercasify.c: change all lowercase letters to uppercase.
+
+ Copyright 1993, 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-ctype.h>
+
+
+string
+uppercasify (const_string s)
+{
+ string target;
+ string ret = xstrdup (s);
+
+ for (target = ret; *target; target++)
+ {
+ *target = TOUPPER (*target);
+ }
+
+ return ret;
+}
diff --git a/Build/source/texk/kpathsea/variable.c b/Build/source/texk/kpathsea/variable.c
new file mode 100644
index 00000000000..e19083de110
--- /dev/null
+++ b/Build/source/texk/kpathsea/variable.c
@@ -0,0 +1,310 @@
+/* variable.c: variable expansion.
+
+ Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011, 2012, 2016 Karl Berry.
+ Copyright 1997, 1999, 2001, 2002, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-ctype.h>
+#include <kpathsea/cnf.h>
+#include <kpathsea/fn.h>
+#include <kpathsea/expand.h>
+#include <kpathsea/variable.h>
+
+
+/* Here's the simple one, when a program just wants a value. */
+
+string
+kpathsea_var_value (kpathsea kpse, const_string var)
+{
+ string vtry, ret;
+ const_string value;
+
+ assert (kpse->program_name);
+
+ /* First look for VAR.progname. */
+ vtry = concat3 (var, ".", kpse->program_name);
+ value = getenv (vtry);
+ free (vtry);
+
+ if (!value || !*value) {
+ /* Now look for VAR_progname. */
+ vtry = concat3 (var, "_", kpse->program_name);
+ value = getenv (vtry);
+ free (vtry);
+ }
+
+ /* Just plain VAR. */
+ if (!value || !*value)
+ value = getenv (var);
+
+ /* Not in the environment; check a config file. */
+ if (!value || !*value)
+ value = kpathsea_cnf_get (kpse, var);
+
+ /* We have a value; do variable and tilde expansion. We want to use ~
+ in the cnf files, to adapt nicely to Windows and to avoid extra /'s
+ (see tilde.c), but we also want kpsewhich -var-value=foo to not
+ have any literal ~ characters, so our shell scripts don't have to
+ worry about doing the ~ expansion. */
+ ret = value ? kpathsea_expand (kpse, value) : NULL;
+
+#ifdef KPSE_DEBUG
+ if (KPATHSEA_DEBUG_P (KPSE_DEBUG_VARS))
+ DEBUGF2("variable: %s = %s\n", var, ret ? ret : "(nil)");
+#endif
+
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_var_value (const_string var)
+{
+ return kpathsea_var_value (kpse_def,var);
+}
+#endif
+
+
+/* We have to keep track of variables being expanded, otherwise
+ constructs like TEXINPUTS = $TEXINPUTS result in an infinite loop.
+ (Or indirectly recursive variables, etc.) Our simple solution is to
+ add to a list each time an expansion is started, and check the list
+ before expanding. */
+
+static void
+expanding (kpathsea kpse, const_string var, boolean xp)
+{
+ unsigned e;
+ for (e = 0; e < kpse->expansion_len; e++) {
+ if (STREQ (kpse->expansions[e].var, var)) {
+ kpse->expansions[e].expanding = xp;
+ return;
+ }
+ }
+
+ /* New variable, add it to the list. */
+ kpse->expansion_len++;
+ XRETALLOC (kpse->expansions, kpse->expansion_len, expansion_type);
+ kpse->expansions[kpse->expansion_len - 1].var = xstrdup (var);
+ kpse->expansions[kpse->expansion_len - 1].expanding = xp;
+}
+
+
+/* Return whether VAR is currently being expanding. */
+
+static boolean
+expanding_p (kpathsea kpse, const_string var)
+{
+ unsigned e;
+ for (e = 0; e < kpse->expansion_len; e++) {
+ if (STREQ (kpse->expansions[e].var, var))
+ return kpse->expansions[e].expanding;
+ }
+
+ return false;
+}
+
+/* Append the result of value of `var' to EXPANSION, where `var' begins
+ at START and ends at END. If `var' is not set, do not complain.
+ Return 1 if `var' was defined, 0 if not. This is a subroutine for
+ the `kpathsea_var_expand' function. */
+
+static boolean
+expand (kpathsea kpse, fn_type *expansion,
+ const_string start, const_string end)
+{
+ boolean ret = false;
+ const_string value;
+ unsigned len = end - start + 1;
+ string var = (string)xmalloc (len + 1);
+ strncpy (var, start, len);
+ var[len] = 0;
+
+ if (expanding_p (kpse, var)) {
+ WARNING1 ("kpathsea: variable `%s' references itself (eventually)", var);
+ } else {
+ string vtry = concat3 (var, "_", kpse->program_name);
+ /* Check for an environment variable. */
+ value = getenv (vtry);
+ free (vtry);
+
+ if (!value || !*value)
+ value = getenv (var);
+
+ /* If no envvar, check the config files. */
+ if (!value || !*value)
+ value = kpathsea_cnf_get (kpse, var);
+
+ if (value) {
+ string tmp;
+ ret = true;
+ expanding (kpse, var, true);
+ tmp = kpathsea_expand (kpse, value);
+ expanding (kpse, var, false);
+
+ fn_grow (expansion, tmp, strlen (tmp));
+ free (tmp);
+ }
+ }
+
+ free (var);
+ return ret;
+}
+
+/* Can't think of when it would be useful to change these (and the
+ diagnostic messages assume them), but ... */
+#ifndef IS_VAR_START /* starts all variable references */
+#define IS_VAR_START(c) ((c) == '$')
+#endif
+#ifndef IS_VAR_CHAR /* variable name constituent */
+#define IS_VAR_CHAR(c) (ISALNUM (c) || (c) == '_')
+#endif
+#ifndef IS_VAR_BEGIN_DELIMITER /* start delimited variable name (after $) */
+#define IS_VAR_BEGIN_DELIMITER(c) ((c) == '{')
+#endif
+#ifndef IS_VAR_END_DELIMITER
+#define IS_VAR_END_DELIMITER(c) ((c) == '}')
+#endif
+
+
+/* Maybe we should support some or all of the various shell ${...}
+ constructs, especially ${var-value}. We do do ~ expansion. */
+
+string
+kpathsea_var_expand (kpathsea kpse, const_string src)
+{
+ const_string s;
+ string ret;
+ fn_type expansion;
+ expansion = fn_init ();
+
+ /* Copy everything but variable constructs. */
+ for (s = src; *s; s++) {
+ if (IS_VAR_START (*s)) {
+ s++;
+
+ /* Three cases: `$VAR', `${VAR}', `$<anything-else>'. */
+ if (IS_VAR_CHAR (*s)) {
+ /* $V: collect name constituents, then expand. */
+ const_string var_end = s;
+
+ do {
+ var_end++;
+ } while (IS_VAR_CHAR (*var_end));
+
+ var_end--; /* had to go one past */
+ if (!expand (kpse, &expansion, s, var_end)) {
+ /* If no expansion, include the literal $x construct,
+ so filenames containing dollar signs can be read.
+ The first +1 is to get the full variable name,
+ the other +1 is to get the dollar sign; we've moved past it. */
+ fn_grow (&expansion, s - 1, var_end - s + 1 + 1);
+ }
+ s = var_end;
+
+ } else if (IS_VAR_BEGIN_DELIMITER (*s)) {
+ /* ${: scan ahead for matching delimiter, then expand. */
+ const_string var_end = ++s;
+
+ while (*var_end && !IS_VAR_END_DELIMITER (*var_end)) {
+#if defined(WIN32)
+ if (kpathsea_IS_KANJI(kpse, var_end))
+ var_end++;
+#endif
+ var_end++;
+ }
+
+ if (! *var_end) {
+ WARNING1 ("kpathsea: %s: No matching } for ${", src);
+ s = var_end - 1; /* will incr to null at top of loop */
+ } else {
+ expand (kpse, &expansion, s, var_end - 1);
+ s = var_end; /* will incr past } at top of loop*/
+ }
+
+ } else {
+ /* $<something-else>: warn, but preserve characters; again, so
+ filenames containing dollar signs can be read. */
+ WARNING2 ("kpathsea: %s: Unrecognized variable construct `$%c'",
+ src, *s);
+ fn_grow (&expansion, s - 1, 2); /* moved past the $ */
+ }
+ } else
+ fn_1grow (&expansion, *s);
+ }
+ fn_1grow (&expansion, 0);
+
+ ret = FN_STRING (expansion);
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+string
+kpse_var_expand (const_string src)
+{
+ return kpathsea_var_expand (kpse_def,src);
+}
+#endif
+
+
+#ifdef TEST
+
+static void
+test_var (string test, string right_answer)
+{
+ string result = kpse_var_expand (test);
+
+ printf ("expansion of `%s'\t=> %s", test, result);
+ if (!STREQ (result, right_answer))
+ printf (" [should be `%s']", right_answer);
+ putchar ('\n');
+}
+
+
+int
+main (int argc, char **argv)
+{
+ kpse_set_program_name(argv[0], NULL);
+ test_var ("a", "a");
+ test_var ("$foo", "");
+ test_var ("a$foo", "a");
+ test_var ("$foo a", " a");
+ test_var ("a$foo b", "a b");
+
+ xputenv ("FOO", "foo value");
+ test_var ("a$FOO", "afoo value");
+
+ xputenv ("Dollar", "$");
+ test_var ("$Dollar a", "$ a");
+
+ test_var ("a${FOO}b", "afoo valueb");
+ test_var ("a${}b", "ab");
+
+ test_var ("$$", ""); /* and error */
+ test_var ("a${oops", "a"); /* and error */
+
+ return 0;
+}
+
+#endif /* TEST */
+
+
+/*
+Local variables:
+standalone-compile-command: "gcc -g -I. -I.. -DTEST variable.c kpathsea.a"
+End:
+*/
diff --git a/Build/source/texk/kpathsea/variable.h b/Build/source/texk/kpathsea/variable.h
new file mode 100644
index 00000000000..6bd2a62bf98
--- /dev/null
+++ b/Build/source/texk/kpathsea/variable.h
@@ -0,0 +1,56 @@
+/* variable.h: declare variable expander.
+
+ Copyright 1993, 1995, 2008, 2019 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_VARIABLE_H
+#define KPATHSEA_VARIABLE_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the (variable-expanded) environment variable value or config
+ file value, or NULL. */
+extern KPSEDLL string kpathsea_var_value (kpathsea kpse, const_string var);
+
+/* Expand $VAR, ${VAR}, and ~ references in SRC, returning the (always newly
+ dynamically-allocated) result. An unterminated ${ or any other
+ character following $ produce error messages, and that part of SRC is
+ ignored. In the $VAR form, the variable name consists of consecutive
+ letters, digits, and underscores. In the ${VAR} form, the variable
+ name consists of whatever is between the braces.
+
+ In any case, ``expansion'' means calling `getenv'; if the variable is not
+ set, look in texmf.cnf files for a definition. If not set there, either,
+ the expansion of a $FOO construct is its literal text ("$FOO"), while
+ the expansion of a ${BAR} construct is the empty string. This is so
+ at least some file names containing $ characters will work. */
+extern KPSEDLL string kpathsea_var_expand (kpathsea kpse, const_string src);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL string kpse_var_value (const_string var);
+extern KPSEDLL string kpse_var_expand (const_string src);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_VARIABLE_H */
diff --git a/Build/source/texk/kpathsea/version.ac b/Build/source/texk/kpathsea/version.ac
new file mode 100644
index 00000000000..22ae3eb94ae
--- /dev/null
+++ b/Build/source/texk/kpathsea/version.ac
@@ -0,0 +1,23 @@
+dnl $Id$
+dnl Copyright 2016-2021 Karl Berry <tex-live@tug.org>
+dnl Copyright 2011-2015 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl --------------------------------------------------------
+dnl Keep Kpathsea package and shared library versions the same:
+dnl Only bug fixes:
+dnl a.b.c => a.b.c+1
+dnl Adding new interfaces (backwards compatible)
+dnl a.b.c => a.b+1.0
+dnl Modifying or revoking interfaces (not backwards compatible)
+dnl a.b.c => a+1.0.0
+dnl
+dnl After a release:
+dnl append "dev", to distinguish binaries built between releases.
+dnl --------------------------------------------------------
+dnl
+dnl This file is m4-included from configure.ac.
+m4_define([kpse_version], [6.3.3])
diff --git a/Build/source/texk/kpathsea/version.c b/Build/source/texk/kpathsea/version.c
new file mode 100644
index 00000000000..d4e5003160a
--- /dev/null
+++ b/Build/source/texk/kpathsea/version.c
@@ -0,0 +1,30 @@
+/* version.c: version number for libkpathsea.
+
+ Copyright 1993, 1996, 2008, 2009 Karl Berry.
+ Copyright 1997, 1999, 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/version.h>
+
+const char *kpathsea_version_string = KPSEVERSION;
+
+/* If you are redistributing a modified version of the original
+ distribution, please change this address here, among many other
+ places. Thanks. */
+
+const char *kpathsea_bug_address =
+ "Email bug reports to tex-k@tug.org.\n";
diff --git a/Build/source/texk/kpathsea/version.h b/Build/source/texk/kpathsea/version.h
new file mode 100644
index 00000000000..ef94be6434b
--- /dev/null
+++ b/Build/source/texk/kpathsea/version.h
@@ -0,0 +1,36 @@
+/* version.h: version number for libkpathsea.
+
+ Copyright 2009 Peter Breitenlohner.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_VERSION_H
+#define KPATHSEA_VERSION_H
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern KPSEDLL const char *kpathsea_version_string;
+
+extern KPSEDLL const char *kpathsea_bug_address;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_VERSION_H */
diff --git a/Build/source/texk/kpathsea/win32/ChangeLog b/Build/source/texk/kpathsea/win32/ChangeLog
new file mode 100644
index 00000000000..5a30293bb9b
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/ChangeLog
@@ -0,0 +1,129 @@
+2020-01-31 Akira Kakuto <kakuto@w32tex.org>
+
+ * mktextfm.c: if envvar MF_MODE_EXTRA_INFO is set, include the
+ codingscheme and other Xerox-world info in the .tfm; works
+ with modes.mf 4.0 and later.
+
+2019-02-20 Akira Kakuto <kakuto@w32tex.org>
+
+ * mktexpk.c: Remove unused definitions.
+ * mktexlsr.c, matextfm.c, mktexupdmain.c: Avoid buffer overflow.
+
+2017-06-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * mktexfmt.c: Use fmtutil-user for consistency with other platforms.
+
+2017-06-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * mktexfmt.c: Adapt to the new fmtutil.pl in TeX Live.
+
+2016-04-06 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * All *.c, *.h files: Copyright year 2016.
+
+2015-06-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dirutil.h, getdestdir.h, mktexupd.h (removed): Merged ...
+ * mktex.h (new): ... into this and define normalize().
+ * mkpaths.c (new): Define mkpaths() to handle TEXMFDBS.
+ * getdestdir.c, mktexpk.c, mktexupdmain.c: Use normalize().
+ * mktexlsr.c: Use normalize() and mkpaths().
+ * mktexupd.c: Use mkpaths().
+
+2015-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CPPFLAGS): WEB2C_KPSE_VERSION => WEB2CVERSION.
+ * dirutil.[ch], getdestdir.h, mktexupd.h: Add W32TeX Copyright.
+ * getdestdir.c, mktexfmt.c, mktexlsr.c, mktexmf.c, mktexupd.c,
+ mktexupdmain.c: Sync with W32TeX.
+ * mktexpk.c, mktextfm.c: Sync with W32TeX.
+ Use KPSEVERSION and WEB2CVERSION instead of WEB2C_KPSE_VERSION.
+
+2015-04-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (bin_PROGRAMS): Drop fmtutil, now a perl script.
+ * fmtutil.c: Removed.
+
+2014-07-15 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mktexfmt.c, mktexpk.c, mktextfm.c: Replace the deprecated
+ spawnvp() by _spawnvp(), they differ for 64-bit MinGW.
+
+2012-12-08 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * getdestdir.c: Correct return value of getdestdir().
+
+2012-10-04 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * dirutil.c: Use stat in int is_dir ().
+ * Makefile.am: Avoid use of deprecated INCLUDES.
+
+2012-08-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Install texhash.exe as copy of mktexlsr.exe.
+
+2012-08-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mktexfmt.c, mktexpk.c, mktextfm.c: Replace P_WAIT by _P_WAIT.
+
+2012-04-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (AM_CPPFLAGS): Define WEB2C_KPSE_VERSION.
+ * mktexpk.c, mktextfm.c: Drop WINWEB2CVERSION, WINKPSEVERSION,
+ use WEB2C_KPSE_VERSION with versions from configure.
+
+2011-08-29 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fmtutil.c: Add parens around assignment used as truth value.
+
+2011-08-11 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * fmtutil.c: Return zero or one (Errorcnt could be 256).
+
+2011-08-10 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * fmtutil.c: return a nonzero value if it fails to make a format.
+
+2011-08-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getdestdir.c, mktexmf.c, mktexpk.c, mktextfm.c, mktexupd.c,
+ mktexupdmain.c: No need to #include any standard headers, they
+ all come through <kpathsea/kpathsea.h>.
+ * getdestdir.c, mktexpk.c, mktextfm.c: Use IS_KANJI().
+
+ * dirutil.[ch]: New files extracted ...
+ * getdestdir.[ch]: ... from here.
+
+ * fmtutil.c, mktexfmt.c, mktexlsr.c: More new files from W32TeX.
+ Drop use of getlongname() for 8+3 names. Constify strings.
+ No need to #include any standard headers.
+ Declare functions as static. Drop unused variables.
+ Add parentheses around assignment used as truth value.
+
+ * fmtutil.c: Declare the array index Exenum as unsigned char.
+ (is_dir, make_dir, make_dir_p): Removed, use dirutil.c.
+
+ * mktexlsr.c: For MinGW #include "dirutil.h" and use is_dir(),
+ for native WIN32 #include <kpathsea/dirent.h> and use d_isdir.
+ (search): No need to slashify name. Remove return at end.
+
+2011-08-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * getdestdir.c, mktexmf.c, mktexpk.c, mktextfm.c, mktexupd.c,
+ mktexupdmain.c: New files from Akira's W32TeX.
+
+ * getdestdir.c (getdestdir): Replace kstrrchr() by strrchr().
+
+ * mktexmf.c (main), mktexpk.c (main), mktextfm.c (main),
+ mktexupdmain.c (main): Drop use of getlongname() for 8+3 names.
+
+ * mktexpk.c (main): Replace win32_popen() and win32_pclose() by
+ popen() and pclose().
+
+ * getdestdir.h, mktexupd.h: New headers with function prototypes.
+
+ * *.c: Drop extern declarations and #include these headers.
+ Declare functions as static. Drop unused variables.
+ Add parentheses around assignment used as truth value.
+ Add 'return 0' at end of non-void function. Constify strings.
+ * getdestdir.c (getdestdir): Initialize `Num' to avoid warning.
diff --git a/Build/source/texk/kpathsea/win32/Makefile.am b/Build/source/texk/kpathsea/win32/Makefile.am
new file mode 100644
index 00000000000..3447a3dbde5
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/Makefile.am
@@ -0,0 +1,73 @@
+## Makefile.am for the TeX Live subdirectory texk/kpathsea/win32/
+##
+## Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/..
+AM_CPPFLAGS += -DWEB2CVERSION='"$(WEB2CVERSION)"'
+AM_CFLAGS = $(WARNING_CFLAGS)
+
+# Build WIN32 replacements for Unix shell scripts.
+bin_PROGRAMS = \
+ mktexfmt \
+ mktexlsr \
+ mktexmf \
+ mktexpk \
+ mktextfm \
+ mktexupd
+
+mktexfmt_SOURCES = \
+ mktexfmt.c
+
+mktexlsr_SOURCES = \
+ dirutil.c \
+ mkpaths.c \
+ mktex.h \
+ mktexlsr.c
+
+mktexmf_SOURCES = \
+ dirutil.c \
+ getdestdir.c \
+ mkpaths.c \
+ mktex.h \
+ mktexmf.c \
+ mktexupd.c
+
+mktexpk_SOURCES = \
+ dirutil.c \
+ getdestdir.c \
+ mkpaths.c \
+ mktex.h \
+ mktexpk.c \
+ mktexupd.c
+
+mktextfm_SOURCES = \
+ dirutil.c \
+ getdestdir.c \
+ mkpaths.c \
+ mktex.h \
+ mktextfm.c \
+ mktexupd.c
+
+mktexupd_SOURCES = \
+ mkpaths.c \
+ mktex.h \
+ mktexupdmain.c \
+ mktexupd.c
+
+LDADD = ../libkpathsea.la
+
+install-exec-hook:
+ cp -p $(DESTDIR)$(bindir)/mktexlsr$(EXEEXT) $(DESTDIR)$(bindir)/texhash$(EXEEXT)
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(bindir)/texhash$(EXEEXT)
+
+## Rebuild libkpathsea
+../libkpathsea.la: ${top_srcdir}/../kpathsea/*.[ch] ../paths.h
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) rebuild
+../paths.h:
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) rebuild
+
+EXTRA_DIST = ChangeLog
+
diff --git a/Build/source/texk/kpathsea/win32/Makefile.in b/Build/source/texk/kpathsea/win32/Makefile.in
new file mode 100644
index 00000000000..feafad318ab
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/Makefile.in
@@ -0,0 +1,791 @@
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2020 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@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+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@
+bin_PROGRAMS = mktexfmt$(EXEEXT) mktexlsr$(EXEEXT) mktexmf$(EXEEXT) \
+ mktexpk$(EXEEXT) mktextfm$(EXEEXT) mktexupd$(EXEEXT)
+subdir = win32
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-common.m4 \
+ $(top_srcdir)/../../m4/kpse-lib-version.m4 \
+ $(top_srcdir)/../../m4/kpse-mktex.m4 \
+ $(top_srcdir)/../../m4/kpse-warnings.m4 \
+ $(top_srcdir)/../../m4/kpse-win32.m4 \
+ $(top_srcdir)/../../m4/libtool.m4 \
+ $(top_srcdir)/../../m4/ltoptions.m4 \
+ $(top_srcdir)/../../m4/ltsugar.m4 \
+ $(top_srcdir)/../../m4/ltversion.m4 \
+ $(top_srcdir)/../../m4/lt~obsolete.m4 $(top_srcdir)/version.ac \
+ $(top_srcdir)/../../version.ac $(top_srcdir)/ac/mktex.ac \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/c-auto.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_mktexfmt_OBJECTS = mktexfmt.$(OBJEXT)
+mktexfmt_OBJECTS = $(am_mktexfmt_OBJECTS)
+mktexfmt_LDADD = $(LDADD)
+mktexfmt_DEPENDENCIES = ../libkpathsea.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_mktexlsr_OBJECTS = dirutil.$(OBJEXT) mkpaths.$(OBJEXT) \
+ mktexlsr.$(OBJEXT)
+mktexlsr_OBJECTS = $(am_mktexlsr_OBJECTS)
+mktexlsr_LDADD = $(LDADD)
+mktexlsr_DEPENDENCIES = ../libkpathsea.la
+am_mktexmf_OBJECTS = dirutil.$(OBJEXT) getdestdir.$(OBJEXT) \
+ mkpaths.$(OBJEXT) mktexmf.$(OBJEXT) mktexupd.$(OBJEXT)
+mktexmf_OBJECTS = $(am_mktexmf_OBJECTS)
+mktexmf_LDADD = $(LDADD)
+mktexmf_DEPENDENCIES = ../libkpathsea.la
+am_mktexpk_OBJECTS = dirutil.$(OBJEXT) getdestdir.$(OBJEXT) \
+ mkpaths.$(OBJEXT) mktexpk.$(OBJEXT) mktexupd.$(OBJEXT)
+mktexpk_OBJECTS = $(am_mktexpk_OBJECTS)
+mktexpk_LDADD = $(LDADD)
+mktexpk_DEPENDENCIES = ../libkpathsea.la
+am_mktextfm_OBJECTS = dirutil.$(OBJEXT) getdestdir.$(OBJEXT) \
+ mkpaths.$(OBJEXT) mktextfm.$(OBJEXT) mktexupd.$(OBJEXT)
+mktextfm_OBJECTS = $(am_mktextfm_OBJECTS)
+mktextfm_LDADD = $(LDADD)
+mktextfm_DEPENDENCIES = ../libkpathsea.la
+am_mktexupd_OBJECTS = mkpaths.$(OBJEXT) mktexupdmain.$(OBJEXT) \
+ mktexupd.$(OBJEXT)
+mktexupd_OBJECTS = $(am_mktexupd_OBJECTS)
+mktexupd_LDADD = $(LDADD)
+mktexupd_DEPENDENCIES = ../libkpathsea.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/dirutil.Po ./$(DEPDIR)/getdestdir.Po \
+ ./$(DEPDIR)/mkpaths.Po ./$(DEPDIR)/mktexfmt.Po \
+ ./$(DEPDIR)/mktexlsr.Po ./$(DEPDIR)/mktexmf.Po \
+ ./$(DEPDIR)/mktexpk.Po ./$(DEPDIR)/mktextfm.Po \
+ ./$(DEPDIR)/mktexupd.Po ./$(DEPDIR)/mktexupdmain.Po
+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_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+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_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(mktexfmt_SOURCES) $(mktexlsr_SOURCES) $(mktexmf_SOURCES) \
+ $(mktexpk_SOURCES) $(mktextfm_SOURCES) $(mktexupd_SOURCES)
+DIST_SOURCES = $(mktexfmt_SOURCES) $(mktexlsr_SOURCES) \
+ $(mktexmf_SOURCES) $(mktexpk_SOURCES) $(mktextfm_SOURCES) \
+ $(mktexupd_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/../../build-aux/depcomp ChangeLog
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KPSEVERSION = @KPSEVERSION@
+KPSE_LT_VERSINFO = @KPSE_LT_VERSINFO@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_OBJDIR = @LT_OBJDIR@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+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@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WARNING_CFLAGS = @WARNING_CFLAGS@
+WEB2CVERSION = @WEB2CVERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+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@
+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@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = -I$(top_builddir)/.. -I$(top_srcdir)/.. \
+ -DWEB2CVERSION='"$(WEB2CVERSION)"'
+AM_CFLAGS = $(WARNING_CFLAGS)
+mktexfmt_SOURCES = \
+ mktexfmt.c
+
+mktexlsr_SOURCES = \
+ dirutil.c \
+ mkpaths.c \
+ mktex.h \
+ mktexlsr.c
+
+mktexmf_SOURCES = \
+ dirutil.c \
+ getdestdir.c \
+ mkpaths.c \
+ mktex.h \
+ mktexmf.c \
+ mktexupd.c
+
+mktexpk_SOURCES = \
+ dirutil.c \
+ getdestdir.c \
+ mkpaths.c \
+ mktex.h \
+ mktexpk.c \
+ mktexupd.c
+
+mktextfm_SOURCES = \
+ dirutil.c \
+ getdestdir.c \
+ mkpaths.c \
+ mktex.h \
+ mktextfm.c \
+ mktexupd.c
+
+mktexupd_SOURCES = \
+ mkpaths.c \
+ mktex.h \
+ mktexupdmain.c \
+ mktexupd.c
+
+LDADD = ../libkpathsea.la
+EXTRA_DIST = ChangeLog
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 win32/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign win32/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__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ 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
+
+mktexfmt$(EXEEXT): $(mktexfmt_OBJECTS) $(mktexfmt_DEPENDENCIES) $(EXTRA_mktexfmt_DEPENDENCIES)
+ @rm -f mktexfmt$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mktexfmt_OBJECTS) $(mktexfmt_LDADD) $(LIBS)
+
+mktexlsr$(EXEEXT): $(mktexlsr_OBJECTS) $(mktexlsr_DEPENDENCIES) $(EXTRA_mktexlsr_DEPENDENCIES)
+ @rm -f mktexlsr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mktexlsr_OBJECTS) $(mktexlsr_LDADD) $(LIBS)
+
+mktexmf$(EXEEXT): $(mktexmf_OBJECTS) $(mktexmf_DEPENDENCIES) $(EXTRA_mktexmf_DEPENDENCIES)
+ @rm -f mktexmf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mktexmf_OBJECTS) $(mktexmf_LDADD) $(LIBS)
+
+mktexpk$(EXEEXT): $(mktexpk_OBJECTS) $(mktexpk_DEPENDENCIES) $(EXTRA_mktexpk_DEPENDENCIES)
+ @rm -f mktexpk$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mktexpk_OBJECTS) $(mktexpk_LDADD) $(LIBS)
+
+mktextfm$(EXEEXT): $(mktextfm_OBJECTS) $(mktextfm_DEPENDENCIES) $(EXTRA_mktextfm_DEPENDENCIES)
+ @rm -f mktextfm$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mktextfm_OBJECTS) $(mktextfm_LDADD) $(LIBS)
+
+mktexupd$(EXEEXT): $(mktexupd_OBJECTS) $(mktexupd_DEPENDENCIES) $(EXTRA_mktexupd_DEPENDENCIES)
+ @rm -f mktexupd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(mktexupd_OBJECTS) $(mktexupd_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirutil.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdestdir.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkpaths.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktexfmt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktexlsr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktexmf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktexpk.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktextfm.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktexupd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktexupdmain.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.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
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(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
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ 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-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ 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"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(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
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; 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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+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."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/dirutil.Po
+ -rm -f ./$(DEPDIR)/getdestdir.Po
+ -rm -f ./$(DEPDIR)/mkpaths.Po
+ -rm -f ./$(DEPDIR)/mktexfmt.Po
+ -rm -f ./$(DEPDIR)/mktexlsr.Po
+ -rm -f ./$(DEPDIR)/mktexmf.Po
+ -rm -f ./$(DEPDIR)/mktexpk.Po
+ -rm -f ./$(DEPDIR)/mktextfm.Po
+ -rm -f ./$(DEPDIR)/mktexupd.Po
+ -rm -f ./$(DEPDIR)/mktexupdmain.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/dirutil.Po
+ -rm -f ./$(DEPDIR)/getdestdir.Po
+ -rm -f ./$(DEPDIR)/mkpaths.Po
+ -rm -f ./$(DEPDIR)/mktexfmt.Po
+ -rm -f ./$(DEPDIR)/mktexlsr.Po
+ -rm -f ./$(DEPDIR)/mktexmf.Po
+ -rm -f ./$(DEPDIR)/mktexpk.Po
+ -rm -f ./$(DEPDIR)/mktextfm.Po
+ -rm -f ./$(DEPDIR)/mktexupd.Po
+ -rm -f ./$(DEPDIR)/mktexupdmain.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+.MAKE: install-am install-exec-am install-strip uninstall-am
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-hook 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 \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-hook
+
+.PRECIOUS: Makefile
+
+
+install-exec-hook:
+ cp -p $(DESTDIR)$(bindir)/mktexlsr$(EXEEXT) $(DESTDIR)$(bindir)/texhash$(EXEEXT)
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(bindir)/texhash$(EXEEXT)
+
+../libkpathsea.la: ${top_srcdir}/../kpathsea/*.[ch] ../paths.h
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) rebuild
+../paths.h:
+ cd .. && $(MAKE) $(AM_MAKEFLAGS) rebuild
+
+# 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/Build/source/texk/kpathsea/win32/dirutil.c b/Build/source/texk/kpathsea/win32/dirutil.c
new file mode 100644
index 00000000000..658c5f30cee
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/dirutil.c
@@ -0,0 +1,78 @@
+/* dirutil.c
+
+ Copyright 2000, 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <kpathsea/kpathsea.h>
+#include "mktex.h"
+
+/* check a directory */
+int
+is_dir (char *buff)
+{
+ struct stat stats;
+
+ return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode);
+}
+
+/* make a directory */
+int
+make_dir (char *buff)
+{
+ if (_mkdir (buff)) {
+ fprintf(stderr, "mkdir %s error.\n", buff);
+ return (1);
+ }
+ if (_chmod (buff, _S_IREAD | _S_IWRITE)) {
+ fprintf(stderr, "chmod %s failed.\n", buff);
+ return (1);
+ }
+ return (0);
+}
+
+int
+make_dir_p(char *buff)
+{
+ int ret = 0;
+ int i = 0;
+ char *p = buff;
+
+ while (1) {
+ if(*p == '\0') {
+ ret = 0;
+ if(!is_dir(buff)) {
+ if(make_dir(buff)) {
+ ret = 1;
+ }
+ }
+ break;
+ }
+ if(*p == '/' && (i > 0 && *(p-1) != ':')) {
+ *p = '\0';
+ if(!is_dir(buff)) {
+ if(make_dir(buff)) {
+ ret = 1;
+ *p = '/';
+ break;
+ }
+ }
+ *p = '/';
+ }
+ p++;
+ i++;
+ }
+ return ret;
+}
diff --git a/Build/source/texk/kpathsea/win32/getdestdir.c b/Build/source/texk/kpathsea/win32/getdestdir.c
new file mode 100644
index 00000000000..7fd78dc4f7f
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/getdestdir.c
@@ -0,0 +1,248 @@
+/* getdestdir.c
+
+ Copyright 2000, 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+
+ from mktexmf:
+ argv[0] = "Dummy", argv[1] = "source", argv[2] = path
+ from mktexpk:
+ argv[0] = "Dummy", argv[1] = "pk", argv[2] = path, argv[3] = mode
+ from mktextfm:
+ argv[0] = "Dummy", argv[1] = "tfm", argv[2] = path
+*/
+
+#include <kpathsea/kpathsea.h>
+#include "mktex.h"
+
+#define NUMBUF 32
+#define LENBUF 128
+#define MPATH 256
+#define FTOP "fonts"
+
+/* error message */
+static void
+fatal (const char *s)
+{
+ fprintf (stderr, "%s\n", s);
+}
+
+char *
+getdestdir (int ac, char **av)
+{
+ static char buff[MPATH];
+ char *pb[NUMBUF];
+ char *p, *q;
+ char spec[32];
+ int i, Num = 0, ispk, k;
+ char *topdir;
+
+ ispk = 0;
+
+ for (i = 0; i < NUMBUF; i++) {
+ if (!(pb[i] = (char *) malloc (LENBUF))) {
+ fatal ("Memory allocation error.");
+ return (NULL);
+ }
+ }
+
+ if (ac != 3 && ac != 4) {
+ fatal ("Argument error.");
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+
+ strcpy (spec, av[1]);
+
+ normalize (av[2]); /* path */
+
+ p = av[2];
+ q = buff;
+
+/* UNC name support */
+
+ if (p[0] == '/' && p[1] == '/') {
+ *q++ = *p++;
+ *q++ = *p++;
+ }
+
+ while (*p) {
+ if (*p == '/') {
+ *q = *p;
+ while (*p == '/')
+ p++;
+ p--;
+ } else {
+ *q = *p;
+ }
+ p++;
+ q++;
+ }
+ *q = '\0'; /* now path name of ${name}.mf is in buff. */
+/*
+#ifdef TEST
+ return xstrdup(buff);
+#endif
+*/
+ if (ac == 4)
+ ispk = 1; /* called from mktexpk */
+
+ if (!(p = strrchr (buff, '/'))) {
+ fatal ("Invalid path name.");
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+
+ *p = '\0'; /* get directory name */
+
+ for (i = 0; i < NUMBUF; i++) {
+ if (!(p = strrchr (buff, '/'))) {
+ fatal ("Invalid path name.");
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+ *p = '\0';
+ p++;
+ strcpy (pb[i], p);
+ if (!stricmp (pb[i], FTOP)) {
+ Num = i;
+ break;
+ }
+ }
+
+ Num -= 2;
+ if (Num < 0) {
+ fprintf (stderr, "Font resources should be under a directory ");
+ fprintf (stderr, "with the name \"fonts\".\n");
+ fprintf (stderr, "Furthermore, there must be at least two directories ");
+ fprintf (stderr, "under the directory \"fonts\".\n");
+ fatal ("Invalid path name.");
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+
+ topdir = kpse_var_value ("MAKETEXPK_TOP_DIR");
+ if (topdir && *topdir && ispk) {
+ normalize (topdir);
+ i = (int)strlen (topdir);
+ while(topdir[i - 1] == '/')
+ i--;
+ topdir[i] = '\0';
+
+ if(!is_dir(topdir)) {
+ if(make_dir_p(topdir)) {
+ fprintf(stderr, "Failed to access %s.\n", topdir);
+ return NULL;
+ }
+ }
+#ifdef TEST
+ printf ("%s\n", topdir);
+#endif
+ if (strnicmp (&topdir[i - 3], "/pk", 3) != 0) {
+ strcat (topdir, "/pk");
+ if (!is_dir(topdir)) {
+ if (make_dir(topdir)) {
+ fprintf(stderr, "Faild to access %s.\n", topdir);
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+ }
+ }
+ strcpy (buff, topdir);
+ free(topdir);
+ } else {
+ if((topdir = kpse_var_value("TEXMFVAR")) != NULL) {
+ normalize (topdir);
+ i = (int)strlen (topdir);
+ while(topdir[i - 1] == '/')
+ i--;
+ topdir[i] = '\0';
+
+ if(!is_dir(topdir)) {
+ if(make_dir_p(topdir)) {
+ fprintf(stderr, "Failed to access %s.\n", topdir);
+ return NULL;
+ }
+ }
+
+ strcpy(buff, topdir);
+ free(topdir);
+ }
+
+ strcat (buff, "/fonts");
+ if (!is_dir (buff)) {
+ if (make_dir (buff)) {
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+ }
+ strcat (buff, "/");
+ strcat (buff, spec);
+ if (!is_dir (buff)) {
+ if (make_dir (buff)) {
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+ }
+ }
+
+ if (ispk) {
+ strcat (buff, "/");
+ strcat (buff, av[3]);
+ if (!is_dir (buff)) {
+ if (make_dir (buff)) {
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+ }
+ }
+
+ for (i = Num; i > -1; i--) {
+ strcat (buff, "/");
+ strcat (buff, pb[i]);
+ if (is_dir (buff))
+ continue;
+ else {
+ if (make_dir (buff)) {
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+ return (NULL);
+ }
+ }
+ }
+
+ for (k = 0; k < NUMBUF; k++)
+ free (pb[k]);
+
+ p = xstrdup(buff);
+ return p;
+}
+
+#ifdef TEST
+int
+main (int ac, char *av[])
+{
+ kpse_set_program_name (av[0], "getdestdir");
+ printf ("%s", getdestdir (ac, av));
+ return 0;
+}
+#endif
diff --git a/Build/source/texk/kpathsea/win32/mkpaths.c b/Build/source/texk/kpathsea/win32/mkpaths.c
new file mode 100644
index 00000000000..46c8c0071ef
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mkpaths.c
@@ -0,0 +1,95 @@
+/* mkpaths.c
+
+ Copyright 2015, 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <kpathsea/kpathsea.h>
+#include "mktex.h"
+
+char **
+mkpaths (int *numptr)
+{
+ char **pathbuff;
+ char *texmfdbs;
+ char *p, *pa, *pc;
+ int i;
+
+ if (!(p = kpse_var_value ("TEXMFDBS"))) {
+ fprintf (stderr, "No definition of TEXMFDBS.\n");
+ return NULL;
+ }
+
+ texmfdbs = kpse_brace_expand (p);
+ free (p);
+ if (!texmfdbs) {
+ fprintf (stderr, "I cannot expand braces in TEXMFDBS.\n");
+ return NULL;
+ }
+
+ p = texmfdbs;
+ i = 0;
+
+ while(*p) {
+ if(*p == '!' && *(p+1) == '!')
+ p += 2;
+ if(*p == ';')
+ while(*p == ';')
+ p++;
+ if(*p && *p != '!') {
+ while(*p != ';' && *p)
+ p++;
+ i++;
+ while(*p == ';')
+ p++;
+ }
+ }
+
+ if (!i) {
+ free (texmfdbs);
+ fprintf (stderr, "No database paths in TEXMFDBS.\n");
+ return NULL;
+ }
+
+ *numptr = i;
+ pathbuff = xmalloc(i * sizeof(char *));
+
+ p = texmfdbs;
+ i = 0;
+
+ while (*p) {
+ if (*p == '!' && *(p + 1) == '!')
+ p += 2;
+ if (*p == ';') {
+ while (*p == ';')
+ p++;
+ }
+ if(*p && *p != '!') {
+ pa = p;
+ while(*p != ';' && *p)
+ p++;
+ pc = p;
+ pathbuff[i] = xmalloc(pc - pa + 1);
+ strncpy(pathbuff[i], pa, pc - pa);
+ pathbuff[i][pc - pa] = 0;
+ i++;
+ while(*p == ';')
+ p++;
+ }
+ }
+
+ free(texmfdbs);
+ return pathbuff;
+}
diff --git a/Build/source/texk/kpathsea/win32/mktex.h b/Build/source/texk/kpathsea/win32/mktex.h
new file mode 100644
index 00000000000..a349aafb6b9
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktex.h
@@ -0,0 +1,54 @@
+/* mktex.h
+
+ Copyright 2000, 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef MKTEX_H
+#define MKTEX_H
+
+static inline void
+normalize (char *p) {
+ for (; *p; p++) {
+ if (IS_KANJI(p))
+ p++;
+ else if (*p == '\\')
+ *p = '/';
+ }
+}
+
+/* dirutil.c */
+extern int is_dir (char *buff);
+extern int make_dir (char *buff);
+extern int make_dir_p (char *buff);
+
+/* getdestdir.c
+
+ from mktexmf:
+ argv[0] = "Dummy", argv[1] = "source", argv[2] = path
+ from mktexpk:
+ argv[0] = "Dummy", argv[1] = "pk", argv[2] = path, argv[3] = mode
+ from mktextfm:
+ argv[0] = "Dummy", argv[1] = "tfm", argv[2] = path
+*/
+extern char *getdestdir (int ac, char **av);
+
+/* mkpaths.c */
+extern char **mkpaths (int *numptr);
+
+/* mktexupd.c*/
+extern void mktexupd (char *s);
+
+#endif
diff --git a/Build/source/texk/kpathsea/win32/mktexfmt.c b/Build/source/texk/kpathsea/win32/mktexfmt.c
new file mode 100644
index 00000000000..169e62f5d3a
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktexfmt.c
@@ -0,0 +1,140 @@
+/* mktexfmt.c
+
+ Copyright 2000, 2017 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ kpathsea functions
+*/
+#include <kpathsea/kpathsea.h>
+
+#define VERSION "0.2"
+
+int main(int ac, char **av)
+{
+ int savo, savi;
+ FILE *fnul;
+ char *fmtname;
+ char *p;
+ char orgname[256];
+
+ char texbindir[256];
+ char fullbin[256];
+
+ int is_w32tex;
+
+ kpse_set_program_name(av[0], NULL);
+
+ p = kpse_var_value("jtex_filetype");
+
+ if (p) {
+ is_w32tex = 1;
+ free(p);
+ } else {
+ is_w32tex = 0;
+ }
+
+ p = kpse_program_name;
+ if(ac != 2) {
+ fprintf(stderr,"%s : Usage %s formatname\n", p, p);
+ fprintf(stderr,"formatname : (foo.fmt, foo.base, foo.mem)\n");
+ return 1;
+ }
+ if(!strncmp(av[1], "-h", 2) || !strncmp(av[1], "--h", 3)) {
+ fprintf(stderr,"%s : Usage %s formatname\n", p, p);
+ fprintf(stderr,"formatname : (foo.fmt, foo.base, foo.mem)\n");
+ return 0;
+ }
+ if(!strncmp(av[1], "-v", 2) || !strncmp(av[1], "--v", 3)) {
+ fprintf(stderr,"%s : Version %s\n", p, VERSION);
+ return 0;
+ }
+
+ if(strlen(av[1]) > 127) {
+ fprintf(stderr, "\nToo long a format name.\n");
+ return 100;
+ }
+
+ p = kpse_var_value("SELFAUTOLOC");
+ if(p == 0) {
+ fprintf(stderr, "I cannot get SELFAUTOLOC\n");
+ exit(1);
+ }
+ strcpy(texbindir, p);
+ free(p);
+ for(p=texbindir; *p; p++) {
+ if(*p == '/') *p = '\\';
+ }
+ strcat(texbindir, "\\");
+
+ strcpy(orgname, av[1]);
+
+ p = strrchr(av[1], '.');
+ if(!p) {
+ fprintf(stderr, "formatname needs a suffix.\n");
+ return 1;
+ }
+
+ if(stricmp(p, ".fmt") && stricmp(p, ".base") && stricmp(p, ".mem")) {
+ fprintf(stderr, "%s : unknown format type.\n", av[1]);
+ return 1;
+ }
+
+ *p = '\0';
+
+/* save stdout and stdin */
+ savo = _dup(fileno(stdout));
+ savi = _dup(fileno(stdin));
+
+/* connect stdout to stderr */
+ _dup2(fileno(stderr), fileno(stdout));
+
+/* connect stdin to nul device */
+ if(!(fnul = fopen("nul", "r"))) {
+ fprintf(stderr, "Cannot open nul device to read\n");
+ exit(100);
+ }
+ _dup2(fileno(fnul), fileno(stdin));
+
+/* COMMAND */
+ strcpy(fullbin, texbindir);
+ if (is_w32tex) {
+ strcat(fullbin, "fmtutil.exe");
+ fprintf(stderr, "Running the command %s\n", fullbin);
+ _spawnlp(_P_WAIT, fullbin, "fmtutil", "--byfmt", av[1], NULL);
+ } else {
+ strcat(fullbin, "fmtutil-user.exe");
+ fprintf(stderr, "Running the command %s\n", fullbin);
+ _spawnlp(_P_WAIT, fullbin, "fmtutil-user", "--byfmt", av[1], NULL);
+ }
+/* END COMMAND */
+
+/* return to original stdout and stdin */
+ _dup2(savo, fileno(stdout));
+ close(savo);
+ _dup2(savi, fileno(stdin));
+ close(savi);
+
+/* close nul device */
+ fclose(fnul);
+
+ fmtname = kpse_find_file(orgname , kpse_fmt_format, 0);
+ if(fmtname) {
+ printf("%s\n", fmtname);
+ free(fmtname);
+ }
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/win32/mktexlsr.c b/Build/source/texk/kpathsea/win32/mktexlsr.c
new file mode 100644
index 00000000000..6273ed55949
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktexlsr.c
@@ -0,0 +1,201 @@
+/* mktexlsr.c
+
+ Copyright 2000, 2019 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+
+ Web2C 2010 (2010/08/22 --ak)
+*/
+
+#include <kpathsea/kpathsea.h>
+#ifndef __MINGW32__
+#include <kpathsea/dirent.h>
+#endif
+#include "mktex.h"
+
+/* magic header */
+#define HDL "%% ls-R -- filename database for kpathsea; do not change this line.\n"
+
+#define VARTEXFONTS "c:/var/tex/fonts/ls-R"
+#define TBUF 512
+
+FILE *ls_R;
+
+static void
+search(char *name)
+{
+ DIR *dp;
+ struct dirent *de;
+ char buff[TBUF];
+ int len;
+
+ normalize (name);
+
+ if((dp = opendir(name))) {
+ fprintf(ls_R, "\n%s:\n", name);
+ while((de = readdir(dp))) {
+ if(stricmp(de->d_name, ".") &&
+ stricmp(de->d_name, "..") &&
+ stricmp(de->d_name, ".bzr") &&
+ stricmp(de->d_name, ".git") &&
+ stricmp(de->d_name, ".hg") &&
+ stricmp(de->d_name, ".svn") &&
+ stricmp(de->d_name, "_bzr") &&
+ stricmp(de->d_name, "_git") &&
+ stricmp(de->d_name, "_hg") &&
+ stricmp(de->d_name, "_svn") &&
+ stricmp(de->d_name, "_darcs")) {
+ fprintf(ls_R, "%s\n", de->d_name);
+ }
+ }
+ closedir(dp);
+
+ len = (int)strlen(name);
+ strcpy(buff, name);
+ if(name[len-1] != '/') {
+ strcat(buff, "/");
+ len++;
+ }
+
+ dp = opendir(name);
+ while((de = readdir(dp))) {
+ if(stricmp(de->d_name, ".") &&
+ stricmp(de->d_name, "..") &&
+ stricmp(de->d_name, ".bzr") &&
+ stricmp(de->d_name, ".git") &&
+ stricmp(de->d_name, ".hg") &&
+ stricmp(de->d_name, ".svn") &&
+ stricmp(de->d_name, "_bzr") &&
+ stricmp(de->d_name, "_git") &&
+ stricmp(de->d_name, "_hg") &&
+ stricmp(de->d_name, "_svn") &&
+ stricmp(de->d_name, "_darcs")) {
+#ifdef __MINGW32__
+ strcpy(buff + len, de->d_name);
+ if(!is_dir(buff))
+ continue;
+#else
+ if(!de->d_isdir)
+ continue;
+ strcpy(buff + len, de->d_name);
+#endif
+ search(buff);
+ }
+ }
+ closedir(dp);
+ }
+}
+
+int Quiet = 0;
+
+char first_name[] = "./";
+
+int main(int ac, char **av)
+{
+ int cdrive, tdrive;
+ char ls_R_name[TBUF];
+ int i, numtree;
+ size_t len;
+ char *progname;
+ char **pathbuff;
+
+ kpse_set_program_name(av[0], NULL);
+ progname = kpse_program_name;
+
+ if(ac > 1 && (!strncmp(av[1], "-v", 2) || !strncmp(av[1], "--v", 3))) {
+ puts (kpathsea_version_string);
+ puts ("mktexlsr: (C version 1.1 --ak 2002-2015)");
+ exit (0);
+ }
+
+ if(ac > 1 && (!strncmp(av[1], "-h", 2) || !strncmp(av[1], "--h", 3))) {
+ printf("Usage: %s [--quiet|--silent] [DIRS ...]\n\n"
+"Rebuild all necessary ls-R filename databases completely. If one or\n"
+"more arguments DIRS are given, these are used as texmf directories to\n"
+"build ls-R for. Else all directories in the search path for ls-R files\n"
+"($TEXMFDBS) are used.", av[0]);
+ exit (0);
+ }
+
+ if(ac > 1) {
+ if(!strncmp(av[1], "-q", 2) || !strncmp(av[1], "--q", 3) ||
+ !strncmp(av[1], "-s", 2) || !strncmp(av[1], "--s", 3)) {
+ Quiet = 1;
+ ac--;
+ av++;
+ }
+ }
+
+ if(ac > 1) {
+ numtree = ac - 1;
+ pathbuff = xmalloc(numtree * sizeof(char *));
+ for(i=0; i < numtree; i++) {
+ pathbuff[i] = xstrdup(av[i+1]);
+ normalize (pathbuff[i]);
+ }
+ } else {
+ if (!(pathbuff = mkpaths (&numtree))) {
+ fprintf (stderr, "Maybe you are not using ls-R.\n");
+ exit (100);
+ }
+ }
+
+ for(i = 0; i < numtree; i++) {
+ if (strlen(pathbuff[i]) > (TBUF - 6)) {
+ fprintf (stderr, "Too long a directory name.\n");
+ exit (100);
+ }
+ strcpy(ls_R_name, pathbuff[i]);
+ len = strlen(ls_R_name);
+ if(ls_R_name[len-1] != '/') strcat(ls_R_name, "/");
+ strcat(ls_R_name, "ls-R");
+
+ ls_R = fopen(ls_R_name, "wb");
+ if(!ls_R) {
+ fprintf(stdout, "Cannot open %s to write.\n", ls_R_name);
+ if(!stricmp(ls_R_name, VARTEXFONTS))
+ fprintf(stdout, " (Don't mind this message.)\n");
+ continue;
+ }
+
+ cdrive = _getdrive();
+
+ if(ls_R_name[1] == ':') {
+ tdrive = tolower(ls_R_name[0]) - 'a' + 1;
+ _chdrive(tdrive);
+ }
+
+ _chdir(pathbuff[i]);
+ if(!Quiet)
+ fprintf(stdout, "%s: Updating %s...\n", progname, ls_R_name);
+ fprintf(ls_R, HDL);
+ search(first_name);
+
+ fclose(ls_R);
+ if(!Quiet)
+ fprintf(stdout, "%s: Updated %s.\n", progname, ls_R_name);
+ _chdrive(cdrive);
+ }
+
+ if(!Quiet)
+ fprintf(stdout, "%s: Done.\n", progname);
+
+ for(i = 0; i < numtree; i++) {
+ free(pathbuff[i]);
+ }
+
+ free (pathbuff);
+
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/win32/mktexmf.c b/Build/source/texk/kpathsea/win32/mktexmf.c
new file mode 100644
index 00000000000..9c5a47a657c
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktexmf.c
@@ -0,0 +1,374 @@
+/* mktexmf.c
+
+ Copyright 2000, 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <kpathsea/kpathsea.h>
+#include "mktex.h"
+
+#define SBUF 512
+
+static int
+test_file(char c, char * name)
+{
+/*
+ * c= 'z', 'f', 'd', 'r'
+ *
+*/
+ FILE *fp;
+
+ if (c == 'z') {
+ if (name == NULL) return 1;
+ else if (*name == '\0') return 1;
+ else if (_access(name, 0) != 0) return 1;
+ else if ((fp = (FILE *)fopen(name, "r")) == NULL) return 1;
+ else if (_filelength(_fileno(fp)) == 0L) {
+ fclose(fp);
+ return 1;
+ }
+ else {
+ fclose(fp);
+ return 0;
+ }
+ }
+ else if (c == 'f') {
+ if (name == NULL) return 0;
+ else if (*name == '\0') return 0;
+ else if (_access(name, 0) != 0) return 0;
+ else return 1;
+ }
+ else if (c == 'd') {
+ if (is_dir(name)) return 1;
+ else return 0;
+ }
+ else if (c == 'r') {
+ if (_access(name, 4) == 0) return 1;
+ else return 0;
+ }
+ /* never reaches here */
+ return 0;
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr, "Usage : mktexmf FONT.\n\n");
+ fprintf(stderr, "Makes the Metafont source file for FONT,"
+ " if possible. For example,\n");
+ fprintf(stderr, "`ecr12' or `cmr11'.\n");
+}
+
+/*
+ * Split a .mf name into root part and point size part.
+ * Root and point size are optional (may be NULL).
+ */
+
+static void
+split_mf_name(string name, string *base, string *root, string *ptsize)
+{
+ string p, q;
+ /* name = basename $1 .mf */
+ p = strrchr (name, '.');
+ if (p) {
+ if (stricmp (p, ".mf") == 0) *p = '\0';
+ }
+ p = name;
+
+ if (base)
+ *base = xstrdup(p);
+ /* rootname = `echo $name | sed 's/[0-9]*$//'` */
+ for (q = p + strlen(p); q > p && isdigit(q[-1]); q--);
+ /* ptsize = `echo $name | sed 's/^$rootname//'` */
+ if (ptsize)
+ *ptsize = xstrdup(q);
+ *q = '\0';
+ if (root)
+ *root = p;
+ else
+ free(p);
+}
+
+static void
+relmem (char **v)
+{
+ int j;
+ for (j = 0; j < 4; j++)
+ free (v[j]);
+ return;
+}
+
+int
+main (int argc, char **argv)
+{
+ string rootname, pointsize;
+ const_string realsize;
+ string name;
+ string sauterroot, rootfile;
+ string destdir = NULL;
+ FILE *f;
+ size_t ptsz_len;
+ char font[SBUF];
+ char *progname;
+ char mfname[SBUF];
+ char *arg[4];
+ int i;
+ char *ptr;
+
+ kpse_set_program_name (argv[0], NULL);
+ progname = kpse_program_name;
+
+ if (argc != 2) {
+ usage();
+ return 0;
+ }
+
+ if (strncmp(argv[1], "-v",2) == 0 || strncmp(argv[1], "--v",3) == 0) {
+ fprintf ( stderr, "%s, (C version 1.1 --ak 2006-2015)\n", progname);
+ return 0;
+ }
+
+ if (strncmp(argv[1], "-h",2) == 0 || strncmp(argv[1], "--h",3) == 0) {
+ fprintf ( stderr, "%s, Usage: %s FontBaseName\n", progname, progname);
+ return 0;
+ }
+
+ for (i=0; i < 4; i++) {
+ arg[i] = (char *)malloc(SBUF);
+ }
+
+ if(strlen(argv[1]) > SBUF - 1) {
+ fprintf(stderr, "\nToo long a font name.\n");
+ return 100;
+ }
+
+ strcpy (font, argv[1]);
+
+ split_mf_name(font, &name, &rootname, &pointsize);
+
+
+ fprintf(stderr, "name = %s, rootname = %s, pointsize = %s\n",
+ name, rootname, pointsize);
+
+
+ sauterroot = kpse_find_file(concat3("b-", rootname, ".mf"),
+ kpse_mf_format, false);
+
+ if (sauterroot && *sauterroot) {
+ rootfile = sauterroot;
+ rootname = concat("b-", rootname);
+ strcpy (arg[0], "Dummy");
+ strcpy (arg[1], "source");
+ strcpy (arg[2], sauterroot);
+ if (!(ptr = getdestdir (3, arg))) {
+ fprintf(stderr, "Cannot get destination directory name.\n");
+ relmem (arg);
+ return 100;
+ }
+ destdir = ptr;
+ }
+ else if (strlen(name) == 8
+ && FILESTRNCASEEQ(name, "csso12", 6)
+ && (name[6] >= '0' && name[6] <= '5')
+ && isdigit(name[7])) {
+ rootfile = xstrdup("");
+ }
+ else if (FILESTRNCASEEQ(rootname, "cs", 2)
+ || FILESTRNCASEEQ(rootname, "lcsss", 5)
+ || FILESTRNCASEEQ(rootname, "icscsc", 6)
+ || FILESTRNCASEEQ(rootname, "icstt", 5)
+ || FILESTRNCASEEQ(rootname, "ilcsss", 6)
+ ) {
+ rootfile = kpse_find_file("cscode.mf",
+ kpse_mf_format, false);
+ }
+ else if (strlen(rootname) >= 3
+ && ((FILESTRNCASEEQ(rootname, "wn", 2)
+ && strchr("bBcCdDfFiIrRsStTuUvV", rootname[2]))
+ || (FILESTRNCASEEQ(rootname, "rx", 2)
+ && strchr("bBcCdDfFiIoOrRsStTuUvVxX", rootname[2])
+ && strlen(rootname) >= 4
+ && strchr("bBcCfFhHiIlLmMoOsStTxX", rootname[3]))
+ || ((rootname[0] == 'l' || rootname[0] == 'L')
+ && strchr("aAbBcCdDhHlL", rootname[1])
+ && strchr("bBcCdDfFiIoOrRsStTuUvVxX", rootname[2])))) {
+ char lhprefix[64];
+ strncpy(lhprefix, name, 2);
+ lhprefix[2] = '\0';
+ strcat(lhprefix, "codes.mf");
+ rootfile = kpse_find_file(lhprefix, kpse_mf_format, false);
+ }
+ else {
+ string tem;
+ rootfile = kpse_find_file(tem = concat(rootname, ".mf"),
+ kpse_mf_format, false);
+ free(tem);
+ }
+
+ if (test_file('z', rootfile)) {
+ fprintf (stderr, "%s: empty or non-existent rootfile!\n", progname);
+ relmem (arg);
+ return 1;
+ }
+ if (!test_file('f', rootfile)) {
+ fprintf (stderr, "%s: rootfile %s does not exist!\n", progname, rootfile);
+ relmem (arg);
+ return 1;
+ }
+
+ if (!destdir) {
+ if (rootfile && *rootfile) {
+ strcpy (arg[0], "Dummy");
+ strcpy (arg[1], "source");
+ strcpy (arg[2], rootfile);
+ if (!(ptr = getdestdir (3, arg))) {
+ fprintf(stderr, "Cannot get destination directory name.\n");
+ relmem (arg);
+ return 1;
+ }
+ destdir = ptr;
+ }
+ }
+
+ if (!test_file('d', destdir)) {
+ relmem (arg);
+ return 1;
+ }
+
+ ptsz_len = strlen(pointsize);
+ if (ptsz_len == 0) {
+ fprintf(stderr, "%s: no pointsize.\n", progname);
+ relmem (arg);
+ return 1;
+ } else if (ptsz_len == 2) {
+ if (pointsize[0] == '1' && pointsize[1] == '1')
+ realsize = "10.95"; /* \magstephalf */
+ else if (pointsize[0] == '1' && pointsize[1] == '4')
+ realsize = "14.4"; /* \magstep2 */
+ else if (pointsize[0] == '1' && pointsize[1] == '7')
+ realsize = "17.28"; /* \magstep3 */
+ else if (pointsize[0] == '2' && pointsize[1] == '0')
+ realsize = "20.74"; /* \magstep4 */
+ else if (pointsize[0] == '2' && pointsize[1] == '5')
+ realsize = "24.88"; /* \magstep5 */
+ else if (pointsize[0] == '3' && pointsize[1] == '0')
+ realsize = "29.86"; /* \magstep6 */
+ else if (pointsize[0] == '3' && pointsize[1] == '6')
+ realsize = "35.83"; /* \magstep7 */
+ else
+ realsize = pointsize;
+ }
+ /* The new convention is to have three or four letters for the
+ font name and four digits for the pointsize. The number is
+ pointsize * 100. We effectively divide by 100 by inserting a
+ dot before the last two digits. */
+ else if (ptsz_len == 4 || ptsz_len == 5) {
+ /* realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'` */
+ string tempsize = (string)xmalloc(ptsz_len + 2);
+ strcpy(tempsize, pointsize);
+ /* The script doesn't check for last chars being digits, but we do! */
+ if (isdigit(tempsize[ptsz_len-1])
+ && isdigit(tempsize[ptsz_len-2])) {
+ tempsize[ptsz_len+1] = '\0';
+ tempsize[ptsz_len] = tempsize[ptsz_len-1];
+ tempsize[ptsz_len-1] = tempsize[ptsz_len-2];
+ tempsize[ptsz_len-2] = '.';
+ free(pointsize);
+ }
+ realsize = tempsize;
+ } else realsize = pointsize;
+
+/* mfname is the full name */
+ strcpy (mfname, destdir);
+ i = (int)strlen (mfname);
+ if (mfname[i-1] != '/') {
+ mfname[i] = '/';
+ mfname[i+1] = '\0';
+ }
+
+ strcat (mfname, name);
+ strcat (mfname, ".mf");
+
+ if (test_file('r', mfname)) {
+ fprintf(stderr, "%s: %s already exists.\n", progname, mfname);
+ fprintf(stdout, "%s\n", mfname);
+ if (destdir) free (destdir);
+ relmem (arg);
+ return 0;
+ }
+
+ if ((f = fopen(mfname, "wb")) == NULL) {
+ fprintf(stderr, "%s: can't write into the file %s/%s.\n",
+ progname, destdir, name);
+ if (destdir) free (destdir);
+ relmem (arg);
+ return 1;
+ }
+
+ if (FILESTRNCASEEQ(name, "ec", 2)
+ || FILESTRNCASEEQ(name, "tc", 2)) {
+ fprintf(f, "if unknown exbase: input exbase fi;\n");
+ fprintf(f, "gensize:=%s;\ngenerate %s;\n", realsize, rootname);
+ }
+ else if (FILESTRNCASEEQ(name, "dc", 2)) {
+ fprintf(f, "if unknown dxbase: input dxbase fi;\n");
+ fprintf(f, "gensize:=%s;\ngenerate %s;\n", realsize, rootname);
+
+ }
+ else if (FILESTRNCASEEQ(name, "cs", 2)
+ || FILESTRNCASEEQ(name, "lcsss", 5)
+ || FILESTRNCASEEQ(name, "icscsc", 6)
+ || FILESTRNCASEEQ(name, "icstt", 5)
+ || FILESTRNCASEEQ(name, "ilcsss", 6)
+ ) {
+ fprintf(f, "input cscode\nuse_driver;\n");
+ }
+ else if (strlen(name) >= 3
+ && ((FILESTRNCASEEQ(name, "wn", 2)
+ && strchr("bBcCdDfFiIrRsStTuUvV", name[2]))
+ || (FILESTRNCASEEQ(name, "rx", 2)
+ && strchr("bBcCdDfFiIoOrRsStTuUvVxX", name[2])
+ && strlen(name) >= 4
+ && strchr("bBcCfFhHiIlLmMoOsStTxX", name[3]))
+ || ((name[0] == 'l' || name[0] == 'L')
+ && strchr("aAbBcCdDhHlL", name[1])
+ && strchr("bBcCdDfFiIoOrRsStTuUvVxX", name[2])))) {
+ fprintf(f, "input fikparm;\n");
+ }
+ else if (strlen(name) >= 4 && strchr("gG", name[0])
+ && strchr("lLmMoOrRsStT", name[1])
+ && strchr("bBiIjJmMtTwWxX", name[2])
+ && strchr("cCiIlLnNoOrRuU", name[3])) {
+ /* A small superset of the names of the cbgreek fonts:
+ pattern `g[lmorst][bijmtwx][cilnou]*'.
+ This is only slightly more general than the exact set of patterns.
+ */
+ fprintf(f, "gensize:=%s;\ninput %s;\n", realsize, rootname);
+ }
+ else {
+ /* FIXME: this was in the previous versions */
+ /* fprintf(f, "if unknown %s: input %s fi;\n", base, base); */
+ fprintf(f, "design_size := %s;\ninput %s;\n",
+ realsize, rootname);
+ }
+
+ fclose(f);
+ fprintf(stdout, "%s\n", mfname);
+ fprintf(stderr, "%s: %s: successfully generated.\n", progname, mfname);
+ mktexupd (mfname);
+ if (destdir) free (destdir);
+ relmem (arg);
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/win32/mktexpk.c b/Build/source/texk/kpathsea/win32/mktexpk.c
new file mode 100644
index 00000000000..86734fab9ca
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktexpk.c
@@ -0,0 +1,1313 @@
+/* mktexpk.c
+
+ Copyright 2000, 2019 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+
+ %%----------------------------------------
+ % Special variables for mktexpk ( W32TeX )
+ % ----------------------------------------
+ % MAKETEXPK_STYLE = dosnames
+ % -----------------------------------------
+ % MAKETEXPK_TOP_DIR = $VARTEXFONTS
+ % -----------------------------------------
+ % MAKETEXPK_MODE = canonex
+ % -----------------------------------------
+ % MAKETEXPK_MODE_300 = cx
+ % MAKETEXPK_MODE_400 = nexthi
+ % MAKETEXPK_MODE_600 = canonex
+ % etc.
+ %%-----------------------------------------
+
+ Usage: mktexpk [OPTIONS] name,
+ Create a PK font.
+
+ --dpi DPI use resolution DPI.
+ --bdpi BDPI use base resolution BDPI.
+ --mag MAG use magnificiation MAG.
+ --mfmode MODE use MODE as the METAFONT mode.
+ --destdir DESTDIR write fonts in DESTDIR (absolute path).
+
+ The following old form is also supported:
+ Usage: mktexmk name dpi bdpi mag [mode]
+*/
+
+#include <kpathsea/kpathsea.h>
+#ifndef __MINGW32__
+#include <web2c/w2c/c-auto.h>
+#endif
+#include "mktex.h"
+
+#define TBUF 512
+
+/*
+Global variables
+*/
+
+char *progname;
+int UseAspectRatio = 0;
+int FileName = 0;
+double AspectRatio = 1.0;
+
+#define BBUFF_FUL 253
+#define FFILE_END 254
+#define LLINE_END 255
+
+static int
+ffgets(char *buf, int size, FILE *fi)
+{
+ char *p;
+ int c;
+ int n;
+
+ n = 0;
+ p = buf;
+ *p = '\0';
+
+ while(1) {
+ c = getc(fi);
+ if(c == 26)
+ continue;
+ n++;
+ if(c == EOF) {
+ n++;
+ *p++ = '\n';
+ *p = '\0';
+ return FFILE_END;
+ }
+ else if(c == 0x0d || c == 0x0a) {
+ n++;
+ *p++ = '\n';
+ *p = '\0';
+ if(c == 0x0d) {
+ c = getc(fi);
+ if(c != 0x0a)
+ ungetc(c, fi);
+ }
+ return LLINE_END;
+ }
+ else if(n == (size - 3)) {
+ *p++ = c; *p = '\0';
+ return BBUFF_FUL;
+ }
+ else *p++ = c;
+ }
+}
+
+static int
+isskip(char c)
+{
+ if((c == ' ') || (c == '\t'))
+ return 1;
+ else if((c == '<') || (c == '[')) {
+ FileName = 1;
+ return 1;
+ }
+ else
+ return 0;
+}
+
+static void
+skipchar(char **p)
+{
+ while(isskip(**p))
+ (*p)++;
+}
+
+static void
+version (void)
+{
+ fprintf (stderr, "%s, (C version 1.5 --ak 2006-2012)\n", progname);
+ fprintf (stderr, KPSEVERSION WEB2CVERSION "\n");
+}
+
+static void
+usage (void)
+{
+ fprintf (stderr, "Usage: %s [OPTIONS] NAME,\n\
+ Create a PK font.\n\n\
+--dpi DPI use resolution DPI.\n\
+--bdpi BDPI use base resolution BDPI.\n\
+--mag MAG use magnificiation MAG.\n\
+--mfmode MODE use MODE as the METAFONT mode.\n\
+--destdir DESTDIR write fonts in DESTDIR.\n", progname);
+}
+
+static void
+help (void)
+{
+ fprintf (stderr, "Usage: %s [OPTIONS] NAME,\n\
+ Create a PK font.\n\n\
+--dpi DPI use resolution DPI.\n\
+--bdpi BDPI use base resolution BDPI.\n\
+--mag MAG use magnificiation MAG.\n\
+--mfmode MODE use MODE as the METAFONT mode.\n\
+--destdir DESTDIR write fonts in DESTDIR.\n\n\
+Try to create a PK file for NAME at resolution DPI, with an assumed\n\
+device base resolution of BDPI, and a Metafont `mag' of MAG. Use MODE\n\
+for the METAFONT mode. Use DESTDIR for the root of where to install\n\
+into. DESTDIR must be an absolute directory name. If DESTDIR is not given,\n\
+suitable directory is determined according to the TDS.\n\n\
+Old form:\n\
+Usage: %s name dpi bdpi mag [mode]\n\
+is also supported.", progname, progname);
+}
+
+
+static void
+tpkerr (const char *s)
+{
+ fprintf (stderr, "%s\n", s);
+}
+
+
+static void
+relmem (char **v)
+{
+ int j;
+ for (j = 0; j < 4; j++)
+ free (v[j]);
+ return;
+}
+
+static void
+get_designsize(char *tfname, char *dsiz)
+{
+ FILE *f;
+ unsigned char a, b, c, d;
+ unsigned int n;
+ double x;
+ char *p;
+
+ strcpy(dsiz, "10.0"); /* default */
+
+ p = kpse_find_file (tfname, kpse_tfm_format, 0);
+ if(p) {
+ f = fopen(p, "rb");
+ free(p);
+ if(f) {
+ fseek(f, 28, SEEK_SET);
+ a = getc(f);
+ b = getc(f);
+ c = getc(f);
+ d = getc(f);
+ fclose(f);
+ n = (a << 24) + (b << 16) + (c << 8) + d;
+ x = n / 1048576.0;
+ sprintf(dsiz, "%.1lf", x);
+ }
+ }
+}
+
+int
+main (int ac, char **av)
+{
+ static char execfile[TBUF];
+ char rbuff[TBUF];
+ char buff[TBUF];
+ char cmd[TBUF];
+ char mfname[TBUF];
+ char tfname[TBUF];
+ char pkname[TBUF];
+
+ char name[TBUF];
+ char dpi[TBUF];
+ char ydpi[TBUF];
+ char bdpi[TBUF];
+ char mag[TBUF];
+ char mode[TBUF];
+ char destdir[TBUF];
+ char designsize[64];
+
+ char *arg[4];
+
+ char currdir[TBUF];
+ char kpsedot[TBUF];
+ char *tmp;
+ int cdrive, tdrive;
+
+ FILE *fr, *fw, *fnul, *tfmfileptr;
+
+ int i, savo, savi, ret;
+ int style;
+ int issetdest;
+ int app;
+ int oldform;
+ int ps2pkok;
+ char *env;
+ char *p, *fpp;
+
+ double Xdpi, Ydpi;
+
+ char texname[TBUF], pfbname[TBUF], slant[TBUF], extend[TBUF], encname[TBUF];
+
+ char texbindir[256];
+ char fullbin[512];
+
+/*
+ * style = 0 : MAKETEXPK_STYLE undefined or other than dosnames
+ * style = 1 : MAKETEXPK_STYLE = dosnames
+ */
+
+/*
+ * issetdest = 0 : no destdir
+ * issetdest = 1 : destdir
+ * issetdest = 2 : current working dir
+ */
+
+/*
+ * app = 0 : mf
+ * app = 1 : ps2pk
+ * app = 2 : gsftopk
+ * app = 3 : ttf2pk
+ * app = 4 : hbf2gf
+ */
+
+/*
+ * oldform = 0 : newform of the command line
+ * oldform = 1 : oldform of the command line
+ */
+
+/*
+ * TEMP | TMP | TMPDIR (necessary)
+ *
+ */
+
+ tmp = getenv ("TEMP");
+ if (!tmp)
+ tmp = getenv ("TMP");
+ if (!tmp)
+ tmp = getenv ("TMPDIR");
+ if (!tmp) {
+ tpkerr ("Please define TEMP | TMP | TMPDIR.");
+ return (100);
+ }
+ tmp = xstrdup(tmp);
+
+/*
+ * normalize directory separators
+ */
+ normalize (tmp);
+
+ for (i = 0; i < 4; i++)
+ arg[i] = (char *) malloc (TBUF);
+
+ kpse_set_program_name (av[0], NULL);
+ progname = kpse_program_name;
+
+/*
+ * get tex binary dir
+ *
+ */
+ p = kpse_var_value("SELFAUTOLOC");
+ if(p == 0) {
+ fprintf(stderr, "I cannot get SELFAUTOLOC\n");
+ exit(100);
+ }
+ strcpy(texbindir, p);
+ free(p);
+ for(p=texbindir; *p; p++) {
+ if(*p == '/') *p = '\\';
+ }
+ *p = '\\';
+ *(p+1) = '\0';
+
+ if (ac < 2) {
+ usage ();
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ issetdest = 0;
+ ps2pkok = 0;
+
+/*
+ * oldform or newform ?
+ *
+ */
+
+ if (av[1][0] == '-')
+ oldform = 0;
+ else
+ oldform = 1;
+
+
+/*
+ * Old form of the command line
+ */
+
+ if (oldform == 1) {
+ if (ac < 5) {
+ usage ();
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ if((strlen(av[1]) > TBUF -1 ) ||
+ (strlen(av[2]) > TBUF -1 ) ||
+ (strlen(av[3]) > TBUF -1 ) ||
+ (strlen(av[4]) > TBUF -1 )) {
+ fprintf(stderr, "\nToo long a string.\n");
+ free(tmp);
+ return 100;
+ }
+
+ strcpy (name, av[1]);
+ strcpy (dpi, av[2]);
+ strcpy (bdpi, av[3]);
+ strcpy (mag, av[4]);
+ if (ac > 5) {
+ if(strlen(av[5]) > TBUF -1) {
+ fprintf(stderr, "\nToo long a string.\n");
+ free(tmp);
+ return 100;
+ }
+ strcpy (mode, av[5]);
+ }
+ else
+ mode[0] = '\0';
+ } else {
+/*
+ * New form of the command line
+ */
+ name[0] = dpi[0] = bdpi[0] = mag[0] = mode[0] = destdir[0] = '\0';
+ i = 1;
+ while (i < ac) {
+ if(strlen(av[i]) > TBUF - 1) {
+ fprintf(stderr, "\nToo long a string.\n");
+ free(tmp);
+ return 100;
+ }
+ if (av[i][0] != '-') {
+ strcpy (name, av[i]);
+ break;
+ }
+ if (!strcmp (av[i], "--dpi") || !strcmp (av[i], "-dpi")) {
+ i++;
+ if (i >= ac) {
+ tpkerr ("Invalid arguments.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (dpi, av[i]);
+ i++;
+ } else if (!strcmp (av[i], "--bdpi") || !strcmp (av[i], "-bdpi")) {
+ i++;
+ if (i >= ac) {
+ tpkerr ("Invalid arguments.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (bdpi, av[i]);
+ i++;
+ } else if (!strcmp (av[i], "--mag") || !strcmp (av[i], "-mag")) {
+ i++;
+ if (i >= ac) {
+ tpkerr ("Invalid arguments.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (mag, av[i]);
+ i++;
+ } else if (!strcmp (av[i], "--mfmode") || !strcmp (av[i], "-mfmode")) {
+ i++;
+ if (i >= ac) {
+ tpkerr ("Invalid arguments.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (mode, av[i]);
+ i++;
+ } else if (!strcmp (av[i], "--destdir") || !strcmp (av[i], "-destdir")) {
+ i++;
+ if (i >= ac) {
+ tpkerr ("Invalid arguments.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (destdir, av[i]);
+ issetdest = 1;
+ i++;
+ } else if (!strcmp (av[i], "--version") || !strcmp (av[i], "-version")) {
+ version ();
+ relmem (arg);
+ free(tmp);
+ return (0);
+ } else if (!strcmp (av[i], "--help") || !strcmp (av[i], "-help")) {
+ help ();
+ relmem (arg);
+ free(tmp);
+ return (0);
+ } else {
+ tpkerr ("Argument error.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ }
+ } /* End of command line analysis */
+
+ env = kpse_var_value ("MAKETEXPK_STYLE");
+
+ if ((env == NULL) || !(*env) || (env && strcmp (env, "dosnames"))) {
+ style = 0;
+ } else
+ style = 1;
+
+/*
+ * Default program is mf
+ */
+
+ app = 0;
+
+/*
+ * check if mfmode and bdpi are consistent or not
+ */
+
+ if (bdpi[0] && mode[0] && mode[0] != '/') {
+ FILE *frd;
+ char buff[128];
+ int len;
+
+ strcpy (fullbin, texbindir);
+ strcat (fullbin, "mf-nowin.exe \"\\mode:=");
+ strcat (fullbin, mode);
+ strcat (fullbin, ";mode_setup;message");
+ strcat (fullbin, "(decimal round pixels_per_inch);");
+ strcat (fullbin, "end. <nul\"");
+
+ frd = popen (fullbin, "r");
+ if (!frd) {
+ tpkerr ("I cannot find METAFONT.\n");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ (void) fgets (buff, 126, frd);
+ (void) fgets (buff, 126, frd);
+ pclose (frd);
+ system("del /Q mfput.*");
+
+ len = (int)strlen (buff);
+ if (buff[len - 1] == '\n') {
+ buff[len - 1] = '\0';
+ if (buff[len - 2] == '\r')
+ buff[len - 2] = '\0';
+ }
+ if (strcmp (bdpi, buff)) {
+ fprintf(stderr, "mode_dpi %s and bdpi %s are inconsistent.\n", buff, bdpi);
+ fprintf(stderr, "therefore I reset mfmode.\n");
+ mode[0] = '\0';
+ }
+ }
+
+/*
+ * determine mfmode if not given
+ */
+
+ if (mode[0] == 0 || mode[0] == '/') {
+ if (bdpi[0] == 0) {
+ tpkerr ("Cannot determine the mode.");
+ tpkerr ("I will try other possibilities.");
+ app = 1;
+ } else {
+ strcpy (rbuff, "MAKETEXPK_MODE_");
+ strcat (rbuff, bdpi);
+ if ((env = kpse_var_value ("MAKETEXPK_MODE")) && *env)
+ strcpy (mode, env);
+ else if ((env = kpse_var_value (rbuff)))
+ strcpy (mode, env);
+ else if (!strcmp (bdpi, "85"))
+ strcpy (mode, "sun");
+ else if (!strcmp (bdpi, "100"))
+ strcpy (mode, "nextscrn");
+ else if (!strcmp (bdpi, "118"))
+ strcpy (mode, "pcprevw");
+ else if (!strcmp (bdpi, "160"))
+ strcpy (mode, "nectzo");
+ else if (!strcmp (bdpi, "180"))
+ strcpy (mode, "toshiba");
+ else if (!strcmp (bdpi, "200"))
+ strcpy (mode, "highfax");
+ else if (!strcmp (bdpi, "240"))
+ strcpy (mode, "canonlbp");
+ else if (!strcmp (bdpi, "300"))
+ strcpy (mode, "cx");
+ else if (!strcmp (bdpi, "320"))
+ strcpy (mode, "neclm");
+ else if (!strcmp (bdpi, "360"))
+ strcpy (mode, "epstylus");
+ else if (!strcmp (bdpi, "400"))
+ strcpy (mode, "nexthi");
+ else if (!strcmp (bdpi, "600"))
+ strcpy (mode, "ljfour");
+ else if (!strcmp (bdpi, "720"))
+ strcpy (mode, "epscszz");
+ else if (!strcmp (bdpi, "800"))
+ strcpy (mode, "lwpro");
+ else if (!strcmp (bdpi, "1000"))
+ strcpy (mode, "lmaster");
+ else if (!strcmp (bdpi, "1200"))
+ strcpy (mode, "ultre");
+ else if (!strcmp (bdpi, "1270"))
+ strcpy (mode, "linoone");
+ else if (!strcmp (bdpi, "1800"))
+ strcpy (mode, "vtftzz");
+ else if (!strcmp (bdpi, "2400"))
+ strcpy (mode, "supre");
+ else if (!strcmp (bdpi, "2540"))
+ strcpy (mode, "linotzzh");
+ else if (!strcmp (bdpi, "3386"))
+ strcpy (mode, "linolttz");
+ else if (!strcmp (bdpi, "8000"))
+ strcpy (mode, "dpdfezzz");
+ else if (!strcmp (bdpi, "9600"))
+ strcpy (mode, "ibx");
+ else {
+ tpkerr ("Cannot determine the mode.");
+ tpkerr ("I will try other possibilities.");
+ app = 1;
+ }
+ }
+ }
+
+ if (env) free (env);
+
+ if (name[0] == 0) {
+ tpkerr ("Font name is not given.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ if ((p = strrchr (name, '.')))
+ *p = '\0';
+
+ strcpy (mfname, name);
+ strcat (mfname, ".mf");
+
+ if (app == 0) {
+ if (!(p = kpse_var_value ("MFINPUTS"))) {
+ tpkerr ("Cannot get value of MFINPUTS.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ free (p);
+ xputenv("MKTEXMF", "1");
+ if (!(p = kpse_find_file (mfname, kpse_mf_format, 1))) {
+ fprintf (stderr, "Cannot find %s .\n", mfname);
+ tpkerr ("I try ps2pk --> gsftopk --> ttf2pk --> hbf2gf.");
+ app = 1;
+ }
+ }
+
+ if (app != 0) {
+ strcpy (mode, "modeless");
+ strcpy (tfname, name);
+ strcat (tfname, ".tfm");
+ if (!(p = kpse_var_value ("TFMFONTS"))) {
+ tpkerr ("Cannot get value of TFMFONTS.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ free (p);
+/*
+ I don't try to create nonexisting tfm here.
+*/
+ if (!(p = kpse_find_file (tfname, kpse_tfm_format, 0))) {
+ fprintf (stderr, "Cannot find %s .\n", tfname);
+ relmem (arg);
+ free(tmp);
+ return 100;
+ }
+ tfmfileptr = fopen (p, "rb");
+ if (!tfmfileptr) {
+ fprintf (stderr, "I cannot open %s.\n", p);
+ relmem (arg);
+ free(tmp);
+ return 100;
+ }
+ i = 256 * getc (tfmfileptr);
+ i += getc (tfmfileptr);
+ fclose (tfmfileptr);
+ if ((i == 9) || (i == 11)) {
+ fprintf (stderr, "Current font seems to be a Japanese one.\n");
+ fprintf (stderr, "I give up to create a PK font.\n");
+ relmem (arg);
+ free(tmp);
+ return 100;
+ }
+ }
+
+ if ((p[0] == '.') && (p[1] == '/') && (issetdest != 1))
+ issetdest = 2;
+
+ fpp = _getcwd (currdir, TBUF);
+ if (!fpp) {
+ fprintf (stderr, "Failed to get current working directory.\n");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ normalize (currdir);
+
+ i = (int)strlen (currdir);
+ if (currdir[i - 1] == '/')
+ currdir[i - 1] = '\0';
+
+ strcpy (kpsedot, "KPSE_DOT=.;");
+ strcat (kpsedot, currdir);
+ _putenv (kpsedot);
+
+ if (issetdest == 2) {
+ strcpy (destdir, currdir);
+ }
+
+ if (issetdest == 0) {
+ strcpy (arg[0], "Dummy");
+ strcpy (arg[1], "pk");
+ strcpy (arg[2], p);
+ strcpy (arg[3], mode);
+
+ if (!(p = getdestdir (4, arg))) {
+ tpkerr ("Cannot get destination directory name.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (rbuff, p);
+ } else
+ strcpy (rbuff, destdir);
+
+/*
+ * Change backslash into slash
+ */
+ normalize (rbuff);
+
+ p = rbuff;
+ i = (int)strlen (p);
+ if (p[i - 1] == '/')
+ p[i - 1] = '\0';
+
+ if (issetdest) {
+ if (!is_dir (p)) {
+ fprintf (stderr, "Destination %s is not found.\n", p);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ } else if (!is_dir (p)) {
+ if (make_dir (p)) {
+ tpkerr ("Error in make_dir.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ }
+
+ strcpy (buff, p);
+ p = buff;
+
+ i = (int)strlen (p);
+
+ if (p[i - 1] != '/')
+ strcat (p, "/");
+
+ if (dpi[0] == 0) {
+ tpkerr ("Cannot determine DPI.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ if (style == 1 && issetdest != 2) { /* dosnames */
+ strcat (p, "dpi");
+ strcat (p, dpi);
+ if (!is_dir (p)) {
+ if (make_dir (p)) {
+ tpkerr ("Error in make_dir.");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ }
+ strcat (p, "/");
+ }
+
+ strcat (p, name);
+ strcat (p, ".");
+
+ if (style != 1 || issetdest == 2)
+ strcat (p, dpi); /* long suffix */
+ strcat (p, "pk");
+
+/* Now buff and p is the full path name of pk file */
+/* check the existence of pk file */
+
+ if (_access (p, 0) == 0) {
+ fprintf (stderr, "%s exists.\n", p);
+ relmem (arg);
+ printf ("%s\n", p);
+ free(tmp);
+ return (0);
+ }
+
+/*
+ * Go to the temporary directory
+ */
+
+ cdrive = _getdrive ();
+ if (tmp[1] == ':') {
+ tdrive = tolower (*tmp) - 'a' + 1;
+ _chdrive (tdrive);
+ }
+ _chdir (tmp);
+
+/*
+ * save stdout and stdin
+ */
+ savo = _dup (fileno (stdout));
+ savi = _dup (fileno (stdin));
+
+/*
+ * connect stdout to stderr
+*/
+ _dup2 (fileno (stderr), fileno (stdout));
+
+/*
+ * connect stdin to nul
+ */
+ if (!(fnul = fopen ("nul", "rb"))) {
+ fprintf (stderr, "Cannot open nul device to read.\n");
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ _dup2 (fileno (fnul), fileno (stdin));
+
+/*
+ * pkname is the filename of PK font
+ */
+ sprintf (pkname, "%s.%spk", name, dpi);
+
+ if (app == 0) {
+/*
+ * METAFONT command line
+ */
+ if (mag[0] == 0) {
+ tpkerr ("Cannot determine MAG.");
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ sprintf (cmd,
+ "--progname=mf --base=mf \\mode:=%s; \\mag:=%s; nonstopmode; input %s;",
+ mode, mag, name);
+
+ strcpy (execfile, "mf-nowin.exe");
+ fprintf (stderr, "%s %s\n", execfile, cmd);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, cmd, NULL);
+
+ sprintf (cmd, "%s.%sgf", name, dpi);
+
+/*
+ * check the consistency
+ */
+ if (_access (cmd, 0) != 0) {
+ tpkerr ("Failed to make gf font by METAFONT.");
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+/*
+ * Change gf into pk
+ */
+ strcpy (execfile, "gftopk.exe");
+ fprintf (stderr, "%s %s %s\n", execfile, cmd, pkname);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, cmd, pkname, NULL);
+
+ if (_access (pkname, 0) != 0) {
+ tpkerr ("Failed to make pk from gf.");
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+/*
+ * erase gf file
+ */
+ remove (cmd);
+
+/*
+ * erase log file
+ */
+ sprintf (cmd, "%s.log", name);
+ remove (cmd);
+/*
+ * erase tfm file
+ */
+ sprintf (cmd, "%s.tfm", name);
+ remove (cmd);
+
+ goto finale;
+ }
+
+/*
+ * app = 1 : ps2pk --> gsftopk --> ttf2pk --> hbf2gf
+ */
+
+ p = kpse_find_file ("pspksupp.map", kpse_fontmap_format, 0);
+ if(p) {
+ fr = fopen (p, "r"); /* Read pspksupp.map */
+ free (p);
+
+ if (!fr) {
+ tpkerr ("Cannot open pspksupp.map to read.");
+ ps2pkok = 0;
+ goto do_ps2pk;
+ }
+
+ while (fgets (rbuff, TBUF, fr)) {
+ if (rbuff[0] == '%' || rbuff[0] == '#' || rbuff[0] == '\n')
+ continue;
+ texname[0] = pfbname[0] = slant[0] = extend[0] = encname[0] = '\0';
+ i = sscanf (rbuff, "%s %s %s %s %s", texname, pfbname, slant, extend,
+ encname);
+ if (i == 2 && !strncmp (texname, "AspectRatio", 11)) {
+ if (!sscanf (pfbname, "%lf", &AspectRatio)) {
+ tpkerr ("File format of pspksupp.map is wrong.");
+ fclose (fr);
+ ps2pkok = 0;
+ goto do_ps2pk;
+ }
+ UseAspectRatio = 1;
+ continue;
+ } else if (i > 0 && !stricmp (texname, name)) {
+ p = kpse_var_value ("T1FONTS");
+ if (!p) {
+ tpkerr ("T1FONTS is not defined.");
+ ps2pkok = 0;
+ break;
+ }
+ free (p);
+ p = kpse_find_file (pfbname, kpse_type1_format, 0);
+ if (!p) {
+ fprintf (stderr, "%s is not found.\n", pfbname);
+ ps2pkok = 0;
+ break;
+ }
+ free (p);
+ ps2pkok = 1;
+ if(bdpi[0] == 0)
+ i--;
+ break;
+ }
+ }
+ fclose (fr);
+ goto do_ps2pk;
+ } else {
+ char *q;
+ char a[TBUF];
+ char b[TBUF];
+ char psname[TBUF];
+ char pscommand[TBUF];
+ double slantval, extendval;
+
+ texname[0] = pfbname[0] = encname[0] = '\0';
+ a[0] = b[0] = psname[0] = pscommand[0] = '\0';
+ FileName = 0;
+ strcpy(slant, "0");
+ strcpy(extend, "1");
+
+ ps2pkok = 0;
+
+ p = kpse_find_file ("ps2pk.map", kpse_fontmap_format, 0);
+ if(!p) {
+ tpkerr("Necessary map file for ps2pk is not found.");
+ goto do_ps2pk;
+ }
+ fr = fopen(p,"rb");
+ free(p);
+ if (!fr) {
+ tpkerr ("Cannot open ps2pk.map to read.");
+ goto do_ps2pk;
+ }
+ while ((ret=ffgets (rbuff, TBUF, fr)) != FFILE_END) {
+ if(ret == BBUFF_FUL) {
+ fprintf(stderr, "A line in ps2pk.map seems to be too long.\n");
+ fprintf(stderr, "I try to continue. But something may be wrong.\n");
+ }
+ p = rbuff;
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ continue;
+ q = texname;
+ while(!isskip(*p) && (*p != '\n'))
+ *q++ = *p++;
+ *q = '\0';
+ if(stricmp(texname, name))
+ continue;
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n')) {
+ fprintf(stderr, "Incorrect line in \"ps2pk.map\".\n");
+ break;
+ }
+ if(FileName)
+ q = a;
+ else
+ q = psname;
+ while(!isskip(*p) && (*p != '\n'))
+ *q++ = *p++;
+ *q = '\0';
+ skipchar(&p);
+/*
+skip flag
+*/
+ if(!FileName) {
+ while(isdigit(*p))
+ p++;
+ skipchar(&p);
+ }
+ if((*p == '%') || (*p == '#') || (*p == '\n')) {
+ tpkerr("I cannot use ps2pk due to lack of data.");
+ break;
+ }
+ if(*p == '\"') {
+ q = pscommand;
+ *q++ = *p++;
+ while(*p != '\"')
+ *q++ = *p++;
+ *q++ = *p++;
+ *q = '\0';
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ break;
+ }
+ if(FileName && a[0] == '\0')
+ q = a;
+ else if(FileName && b[0] == '\0')
+ q = b;
+ else {
+ tpkerr("Incorrect line in ps2pk.map.");
+ break;
+ }
+ while(!isskip(*p) && (*p != '\n'))
+ *q++ = *p++;
+ *q = '\0';
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ break;
+ if(*p == '\"') {
+ q = pscommand;
+ *q++ = *p++;
+ while(*p != '\"')
+ *q++ = *p++;
+ *q++ = *p++;
+ *q = '\0';
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ break;
+ }
+ if (FileName && a[0] == '\0')
+ q = a;
+ else if (FileName && b[0] == '\0')
+ q = b;
+ else {
+ fprintf(stderr, "Incorrect line in \"ps2pk.map\".\n");
+ break;
+ }
+ while(!isskip(*p) && (*p != '\n'))
+ *q++ = *p++;
+ *q = '\0';
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ break;
+ if(*p == '\"') {
+ q = pscommand;
+ *q++ = *p++;
+ while(*p != '\"')
+ *q++ = *p++;
+ *q++ = *p++;
+ *q = '\0';
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ break;
+ }
+ skipchar(&p);
+ if((*p == '%') || (*p == '#') || (*p == '\n'))
+ break;
+ else {
+ fprintf(stderr, "Incorrect line in \"ps2pk.map\".\n");
+ break;
+ }
+ }
+ fclose(fr);
+
+ if(pscommand[0]) {
+ p = strstr(pscommand, "SlantFont");
+ if(p) {
+ p--;
+ while(*p == ' ' || *p == '\t') p--;
+ while(*p != ' ' && *p != '\t' && *p != '\"') p--;
+ p++;
+ sscanf(p, "%lf SlantFont", &slantval);
+ sprintf(slant, "%lf", slantval);
+ p = slant + strlen(slant) - 1;
+ while(*p == '0') {
+ *p = '\0';
+ p--;
+ }
+ }
+ p = strstr(pscommand, "ExtendFont");
+ if(p) {
+ p--;
+ while(*p == ' ' || *p == '\t') p--;
+ while(*p != ' ' && *p != '\t' && *p != '\"') p--;
+ p++;
+ sscanf(p, "%lf ExtendFont", &extendval);
+ sprintf(extend, "%lf", extendval);
+ p = extend + strlen(extend) - 1;
+ while(*p == '0') {
+ *p = '\0';
+ p--;
+ }
+ }
+ }
+ if(a[0]) {
+ p = strrchr(a, '.');
+ if(p && !stricmp(p, ".enc")) {
+ *p = '\0';
+ strcpy(encname, a);
+ }
+ else if(p && !stricmp(p, ".pfb")) {
+ *p = '\0';
+ strcpy(pfbname, a);
+ }
+ }
+ if(b[0]) {
+ p = strrchr(b, '.');
+ if(p && !stricmp(p, ".enc")) {
+ *p = '\0';
+ strcpy(encname, b);
+ }
+ else if(p && !stricmp(p, ".pfb")) {
+ *p = '\0';
+ strcpy(pfbname, b);
+ }
+ }
+ if(pfbname[0] == '\0')
+ goto do_ps2pk;
+ p = kpse_find_file (pfbname, kpse_type1_format, 0);
+ if(!p)
+ goto do_ps2pk;
+ free(p);
+ ps2pkok = 1;
+ if(encname[0] && bdpi[0]) {
+ i = 5;
+ } else if(!encname[0] && !bdpi[0]) {
+ i = 3;
+ } else {
+ i = 4;
+ }
+ }
+
+ do_ps2pk:
+
+ if (ps2pkok) {
+ if (UseAspectRatio) {
+ sscanf (dpi, "%lf", &Xdpi);
+ Ydpi = Xdpi * AspectRatio;
+ sprintf (ydpi, "%d", (int) Ydpi);
+ } else
+ strcpy (ydpi, dpi);
+
+ strcpy(tfname, name);
+ strcat(tfname, ".tfm");
+ get_designsize(tfname, designsize);
+
+ if (i == 3) {
+ sprintf (cmd, "-X%s -Y%s -S%s -E%s -P%s %s %s",
+ dpi, ydpi, slant, extend, designsize, pfbname, pkname);
+ } else if (i == 4 && bdpi[0]) {
+ sprintf (cmd, "-X%s -Y%s -R%s -S%s -E%s -P%s %s %s",
+ dpi, ydpi, bdpi, slant, extend, designsize, pfbname, pkname);
+ } else if (i == 4 && encname[0]) {
+ sprintf (cmd, "-e%s -X%s -Y%s -S%s -E%s -P%s %s %s",
+ encname, dpi, ydpi, slant, extend, designsize, pfbname, pkname);
+ } else if (i == 5) {
+ sprintf (cmd, "-e%s -X%s -Y%s -R%s -S%s -E%s -P%s %s %s",
+ encname, dpi, ydpi, bdpi, slant, extend, designsize, pfbname, pkname);
+ } else {
+ tpkerr ("File format of pspksupp.map is wrong.");
+ goto do_gsftopk;
+ }
+
+ strcpy (execfile, "ps2pk.exe");
+ fprintf (stderr, "%s %s\n", execfile, cmd);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, cmd, NULL);
+
+ if (_access (pkname, 0) != 0) {
+ tpkerr ("ps2pk failed to make pk font.");
+ goto do_gsftopk;
+ }
+ goto finale;
+ }
+
+/*
+ * ps2pk is impossible to use
+ */
+
+ do_gsftopk:
+
+ tpkerr ("ps2pk cannot be used.");
+ tpkerr ("I try gsftopk.");
+ app = 2;
+
+ strcpy (execfile, "gsftopk.exe");
+ fprintf (stderr, "%s %s %s\n", execfile, name, dpi);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, name, dpi, NULL);
+
+ if (_access (pkname, 0) != 0) {
+ tpkerr ("gsftopk cannot be used.");
+ tpkerr ("Next I try ttf2pk.");
+ app = 3;
+ strcpy (execfile, "ttf2pk.exe");
+ fprintf (stderr, "%s -q %s %s\n", execfile, name, dpi);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, "-q", name, dpi, NULL);
+
+ if (_access (pkname, 0) != 0) {
+ tpkerr ("ttf2pk failed.");
+ tpkerr ("Finally I try hbf2gf.");
+ app = 4;
+ strcpy (execfile, "hbf2gf.exe");
+ fprintf (stderr, "%s -q -p %s %s\n", execfile, name, dpi);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, "-q -p", name, dpi, NULL);
+
+ sprintf (cmd, "%s.%sgf", name, dpi);
+ if (_access (cmd, 0) != 0) {
+ tpkerr ("All trials failed.");
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (execfile, "gftopk.exe");
+ fprintf (stderr, "%s %s %s\n", execfile, cmd, pkname);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, cmd, pkname, NULL);
+
+ if (_access (pkname, 0) != 0) {
+ tpkerr ("All trials failed.");
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ remove (cmd);
+ }
+ }
+
+ finale:
+
+/*
+ * return to original stdout and stdin
+ */
+ _dup2 (savo, fileno (stdout));
+ close (savo);
+ _dup2 (savi, fileno (stdin));
+ close (savi);
+
+/*
+ * close nul device
+ */
+ fclose (fnul);
+
+/*
+ * copy the pk file
+ */
+ if (!(fr = fopen (pkname, "rb"))) {
+ fprintf (stderr, "Cannot open %s to read.\n", pkname);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ if (!(fw = fopen (buff, "wb"))) {
+ fprintf (stderr, "Cannot open %s to write.\n", buff);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ while ((i = (int)fread (rbuff, 1, TBUF, fr)))
+ fwrite (rbuff, 1, i, fw);
+
+ fclose (fr);
+ fclose (fw);
+ remove (pkname);
+
+ relmem (arg);
+
+/*
+ * update ls-R if it exists
+ */
+ mktexupd (buff);
+
+/*
+ * tell kpathsea
+ */
+
+ printf ("%s\n", buff);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ free(tmp);
+
+ return (0);
+}
diff --git a/Build/source/texk/kpathsea/win32/mktextfm.c b/Build/source/texk/kpathsea/win32/mktextfm.c
new file mode 100644
index 00000000000..e09e99237b2
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktextfm.c
@@ -0,0 +1,441 @@
+/* mktextfm.c
+
+ Copyright 2000, 2020 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+
+ Assumes the ljfour mode in mf.base .
+ Usage: mktextfm [--destdir DESTDIR] name
+*/
+
+#include <kpathsea/kpathsea.h>
+#ifndef __MINGW32__
+#include <web2c/w2c/c-auto.h>
+#endif
+#include "mktex.h"
+
+#define TBUF 512
+
+char *progname;
+
+static void
+usage (void)
+{
+ fprintf (stderr, "Usage: %s [--destdir destdir] name\n", progname);
+ return;
+}
+
+static void
+version (void)
+{
+ fprintf (stderr, "%s, (C version 1.6 --ak 2009-2020)\n", progname);
+ fprintf (stderr, KPSEVERSION WEB2CVERSION "\n");
+ return;
+}
+
+static void
+help (void)
+{
+ fprintf (stderr, "Usage (1): %s name\n", progname);
+ fprintf (stderr, " tfm is saved following TDS\n");
+ fprintf (stderr, "Usage (2): %s --destdir destdir name\n", progname);
+ fprintf (stderr, " destdir must be an absolute path of dir\n");
+ fprintf (stderr, "Usage (3): %s --version\n", progname);
+ fprintf (stderr, "Usage (4): %s --help\n", progname);
+
+ return;
+}
+
+static void
+relmem (char **v)
+{
+ int j;
+ for (j = 0; j < 4; j++)
+ free (v[j]);
+ return;
+}
+
+int
+main (int ac, char **av)
+{
+ char rbuff[TBUF];
+ char buff[TBUF];
+ char savebuff[TBUF];
+ char cmd[TBUF];
+ char mffile[TBUF];
+ char *arg[4];
+ static char execfile[TBUF];
+
+ char kpsedot[TBUF];
+ char currdir[TBUF];
+ char *tmp;
+ int cdrive, tdrive;
+
+ FILE *fr, *fw, *fnul;
+
+ int i, savo, savi;
+ char *p, *fp, *fpp;
+ int issetdest;
+ char fontname[TBUF];
+
+ char texbindir[TBUF];
+ char fullbin[TBUF];
+ char *extra_info;
+
+ kpse_set_program_name (av[0], NULL);
+ progname = kpse_program_name;
+
+/*
+ * get tex binary dir
+ *
+ */
+ p = kpse_var_value("SELFAUTOLOC");
+ if(p == 0) {
+ fprintf(stderr, "I cannot get SELFAUTOLOC\n");
+ exit(100);
+ }
+ strcpy(texbindir, p);
+ free(p);
+ for(p=texbindir; *p; p++) {
+ if(*p == '/') *p = '\\';
+ }
+ *p = '\\';
+ *(p+1) = '\0';
+
+ tmp = getenv ("TEMP");
+ if (!tmp)
+ tmp = getenv ("TMP");
+ if (!tmp)
+ tmp = getenv ("TMPDIR");
+ if (!tmp) {
+ fprintf (stderr, "Please define TEMP | TMP | TMPDIR.\n");
+ return (100);
+ }
+
+ tmp = xstrdup(tmp);
+
+ for (fpp = tmp; *fpp; fpp++) {
+ if (IS_KANJI(fpp))
+ fpp++;
+ else if (*fpp == '\\')
+ *fpp = '/';
+ }
+/*
+issetdest = 0 : TDS
+issetdest = 1 : user setting
+issetdest = 2 : current directory
+*/
+
+ issetdest = 0;
+
+ if (ac < 2) {
+ usage ();
+ free(tmp);
+ return (100);
+ }
+
+ if ((!strcmp (av[1], "--version")) || (!strcmp (av[1], "-version"))) {
+ version ();
+ free(tmp);
+ return (100);
+ }
+
+ if ((!strcmp (av[1], "--help")) || (!strcmp (av[1], "-help"))) {
+ help ();
+ free(tmp);
+ return (100);
+ }
+
+ for (i = 0; i < 4; i++)
+ arg[i] = (char *) malloc (TBUF);
+
+ if ((!strcmp (av[1], "--destdir")) || (!strcmp (av[1], "-destdir"))) {
+ if (ac != 4) {
+ usage ();
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ issetdest = 1;
+ if (strlen(av[2]) > TBUF - 1 || strlen(av[3]) > TBUF - 150) {
+ fprintf (stderr, "Too long a string.\n");
+ return (100);
+ }
+ strcpy (buff, av[2]);
+ strcpy (fontname, av[3]);
+ for (p = buff; *p; p++) {
+ if (IS_KANJI(p))
+ p++;
+ else if (*p == '\\')
+ *p = '/';
+ }
+ } else {
+ if (strlen(av[1]) > TBUF - 150) {
+ fprintf (stderr, "Too long a string.\n");
+ return (100);
+ }
+ strcpy (fontname, av[1]);
+ }
+
+
+ /* fontname = font name
+ */
+ if ((p = strrchr (fontname, '.')))
+ *p = '\0';
+
+ /* mffile is METAFONT file name
+ */
+ strcpy (mffile, fontname);
+ strcat (mffile, ".mf");
+
+ if (!(fp = kpse_var_value ("MFINPUTS"))) {
+ fprintf (stderr, "Cannot get value of MFINPUTS\n");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ free (fp);
+
+ xputenv("MKTEXMF", "1");
+ if (!(p = kpse_find_file (mffile, kpse_mf_format, 1))) {
+ fprintf (stderr, "Cannot find %s.\n", mffile);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ fpp = _getcwd (currdir, TBUF);
+ if (!fpp) {
+ fprintf (stderr, "Failed to get current working directory.\n");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ for (fpp = currdir; *fpp; fpp++) {
+ if (IS_KANJI(fpp))
+ fpp++;
+ else if (*fpp == '\\')
+ *fpp = '/';
+ }
+
+ i = (int)strlen (currdir);
+ if (currdir[i - 1] == '/')
+ currdir[i - 1] = '\0';
+ strcpy (kpsedot, "KPSE_DOT=.;");
+ strcat (kpsedot, currdir);
+ _putenv (kpsedot);
+
+ if ((p[0] == '.') && (p[1] == '/') && (issetdest != 1)) {
+ issetdest = 2;
+ strcpy (buff, currdir);
+ }
+
+ if (issetdest == 0) {
+ /* now path of ${name}.mf is in p */
+ strcpy (arg[0], "Dummy");
+ strcpy (arg[1], "tfm");
+ strcpy (arg[2], p);
+
+ if (!(p = getdestdir (3, arg))) {
+ fprintf (stderr, "Cannot get destination directory name.\n");
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ strcpy (buff, p);
+ }
+
+/* Now buff is the destdir */
+ p = buff;
+
+ i = (int)strlen (p);
+
+ if (p[i - 1] != '/')
+ strcat (p, "/");
+ strcat (p, fontname);
+ strcat (p, ".tfm");
+
+/* now p (or buff) is the full path name of the tfm font */
+/* check if it exists */
+ if (_access (p, 0) == 0) {
+ fprintf (stderr, "%s exists\n", p);
+ printf ("%s\n", p);
+ relmem (arg);
+ free(tmp);
+ return (0);
+ }
+
+ cdrive = _getdrive ();
+ if (tmp[1] == ':') {
+ tdrive = tolower (*tmp) - 'a' + 1;
+ _chdrive (tdrive);
+ }
+ _chdir (tmp);
+
+/* save stdout and stdin */
+ savo = _dup (fileno (stdout));
+ savi = _dup (fileno (stdin));
+
+/* connect stdout to stderr */
+ _dup2 (fileno (stderr), fileno (stdout));
+
+/* connect stdin to nul device */
+ if (!(fnul = fopen ("nul", "r"))) {
+ fprintf (stderr, "Cannot open nul device to read\n");
+ relmem (arg);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ free(tmp);
+ return (100);
+ }
+ _dup2 (fileno (fnul), fileno (stdin));
+
+/* METAFONT command line */
+/*
+The idea here is to provide a programmatic way to get the
+codingscheme and other so-called Xerox-world information into the
+tfm: if the envvar MF_MODE_EXTRA_INFO is set, then modes.mf (as of
+the 3.9 release in January 2020) will arrange for that. We do not
+do this by default because Knuth objected.
+*/
+ extra_info = getenv("MF_MODE_EXTRA_INFO");
+ strcpy (cmd, "--progname=mf --base=mf ");
+ strcat (cmd, "\\mode:=ljfour; mag:=1; ");
+ if (extra_info) {
+ strcat(cmd, "if known mode_include_extra_info_available: ");
+ strcat(cmd, "mode_include_extra_info fi; ");
+ }
+ strcat (cmd, "nonstopmode; input ");
+ strcat (cmd, fontname);
+ strcat (cmd, ";");
+
+ strcpy (execfile, "mf-nowin.exe");
+ fprintf (stderr, "%s %s\n", execfile, cmd);
+ strcpy(fullbin, texbindir);
+ strcat(fullbin, execfile);
+ (void) _spawnlp (_P_WAIT, fullbin, execfile, cmd, NULL);
+
+/* return to original stdout and stdin */
+ _dup2 (savo, fileno (stdout));
+ close (savo);
+ _dup2 (savi, fileno (stdin));
+ close (savi);
+
+/* close nul device */
+ fclose (fnul);
+
+/* check consistency */
+ strcpy (cmd, fontname);
+ strcat (cmd, ".600gf");
+
+ if (_access (cmd, 0) == -1) {
+ fprintf (stderr, "METAFONT failed to make gf font.\n");
+ relmem (arg);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ free(tmp);
+ return (100);
+ }
+
+ remove (cmd);
+
+ strcpy (cmd, fontname);
+ strcat (cmd, ".tfm");
+
+/* copy the tfm file */
+ if (!(fr = fopen (cmd, "rb"))) {
+ fprintf (stderr, "Cannot open %s to read\n", cmd);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ if (!(fw = fopen (buff, "wb"))) {
+ fprintf (stderr, "Cannot open %s to write\n", buff);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+
+ while ((i = (int)fread (rbuff, 1, TBUF, fr)))
+ fwrite (rbuff, 1, i, fw);
+ fclose (fr);
+ fclose (fw);
+
+ strcpy(savebuff, buff);
+
+/*
+ copy log file into the current directory
+ in the case that issetdest == 2,
+ because feynmf package requires the
+ log file.
+*/
+
+ if(issetdest == 2) {
+ i = (int)strlen(buff);
+ if(i > 3) {
+ i -= 4;
+ buff[i] = '\0';
+ strcat(buff, ".log");
+ strcpy(cmd, fontname);
+ strcat(cmd, ".log");
+ if (!(fr = fopen (cmd, "rb"))) {
+ fprintf (stderr, "Cannot open %s to read\n", cmd);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ if (!(fw = fopen (buff, "wb"))) {
+ fprintf (stderr, "Cannot open %s to write\n", buff);
+ _chdrive (cdrive);
+ _chdir (currdir);
+ relmem (arg);
+ free(tmp);
+ return (100);
+ }
+ while ((i = (int)fread (rbuff, 1, TBUF, fr)))
+ fwrite (rbuff, 1, i, fw);
+ fclose (fr);
+ fclose (fw);
+ }
+ }
+
+ relmem (arg);
+ if(issetdest != 2)
+ mktexupd (savebuff);
+
+/* erase files */
+ strcpy (cmd, fontname);
+ strcat (cmd, ".log");
+ remove (cmd);
+
+ strcpy (cmd, fontname);
+ strcat (cmd, ".tfm");
+ remove (cmd);
+
+ _chdrive (cdrive);
+ _chdir (currdir);
+
+/* send message to Kpathsea */
+ printf ("%s\n", savebuff);
+ free(tmp);
+
+ return (0);
+}
diff --git a/Build/source/texk/kpathsea/win32/mktexupd.c b/Build/source/texk/kpathsea/win32/mktexupd.c
new file mode 100644
index 00000000000..343891f979f
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktexupd.c
@@ -0,0 +1,94 @@
+/* mktexupd.c
+
+ Copyright 2000, 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <kpathsea/kpathsea.h>
+#include "mktex.h"
+
+#define MBUF 512
+#define SBUF 512
+#define LBUF 512
+
+void
+mktexupd (char *s)
+{
+ char fname[MBUF];
+ char lsrname[SBUF];
+ char path[LBUF];
+ char **pathbuff;
+ int i, j, numtree;
+ char *pa, *pb;
+ int existflag = 0;
+ FILE *f;
+
+ if (!(pathbuff = mkpaths (&numtree))) {
+ fprintf (stderr, "Maybe you are not using ls-R.\n");
+ return;
+ }
+
+ for (i = 0; i < numtree; i++) {
+ j = (int)strlen (pathbuff[i]);
+ if (pathbuff[i][j - 1] == '/')
+ pathbuff[i][j - 1] = '\0';
+ }
+
+ strcpy (path, s);
+ pa = strrchr (path, '/');
+ if (pa == NULL) {
+ fprintf (stderr, "Path name of the file may be incorrect.\n");
+ for (i = 0; i < numtree; i++)
+ free (pathbuff[i]);
+ free (pathbuff);
+ return;
+ }
+
+ *pa = '\0';
+ pa++;
+ strcpy (fname, pa);
+
+ for (i = 0; i < numtree; i++) {
+ j = (int)strlen (pathbuff[i]);
+ if (j && strnicmp (path, pathbuff[i], j) == 0) {
+ existflag = 1;
+ break;
+ }
+ }
+
+ if (existflag) {
+ strcpy (lsrname, pathbuff[i]);
+ strcat (lsrname, "/ls-R");
+ if (_access (lsrname, 0) != 0) {
+ for (j = 0; j < numtree; j++)
+ free (pathbuff[j]);
+ free (pathbuff);
+ return;
+ }
+ pa = path;
+ pb = pathbuff[i];
+ while (tolower (*pa) == tolower (*pb) && *pb) {
+ pa++;
+ pb++;
+ }
+ f = fopen (lsrname, "ab");
+ fprintf (f, "\n.%s:\n%s\n", pa, fname);
+ fclose (f);
+ } else
+ fprintf(stderr, "mktexupd failed\n");
+ for (i = 0; i < numtree; i++)
+ free (pathbuff[i]);
+ free (pathbuff);
+}
diff --git a/Build/source/texk/kpathsea/win32/mktexupdmain.c b/Build/source/texk/kpathsea/win32/mktexupdmain.c
new file mode 100644
index 00000000000..ccc2fdea642
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32/mktexupdmain.c
@@ -0,0 +1,52 @@
+/* mktexupdmain.c
+
+ Copyright 2000, 2019 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <kpathsea/kpathsea.h>
+#include "mktex.h"
+
+#define TBUF 512
+
+int main(int argc, char **argv)
+{
+ char dir[TBUF];
+ char file[TBUF];
+ char path[TBUF];
+ size_t i;
+
+ kpse_set_program_name (argv[0], NULL);
+ if(argc != 3) {
+ fprintf(stderr, "%s:: usage: %s DIR FILE\n", argv[0], argv[0]);
+ return 1;
+ }
+ if (strlen(argv[1]) + strlen(argv[2]) > TBUF - 2) {
+ fprintf (stderr, "Too long a string.\n");
+ exit (100);
+ }
+ strcpy(dir, argv[1]);
+ strcpy(file, argv[2]);
+ normalize (dir);
+ i = strlen(dir);
+ while(dir[i-1] == '/')
+ i--;
+ dir[i] = '\0';
+ strcpy(path, dir);
+ strcat(path, "/");
+ strcat(path, file);
+ mktexupd(path);
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/win32lib.c b/Build/source/texk/kpathsea/win32lib.c
new file mode 100644
index 00000000000..2e4f0f01493
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32lib.c
@@ -0,0 +1,490 @@
+/* win32lib.c: bits and pieces for win32 and msvc.
+
+ Copyright 2006, 2011-2017 Akira Kakuto.
+ Copyright 1996, 1997, 1998, 1999 Fabrice Popineau.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/concatn.h>
+#include <kpathsea/variable.h>
+#include <kpathsea/c-stat.h>
+
+static int is_include_space(const char *s)
+{
+ char *p;
+ p = strchr(s, ' ');
+ if(p) return 1;
+ p = strchr(s, '\t');
+ if(p) return 1;
+ return 0;
+}
+
+double win32_floor (double x)
+{
+ return floor (x);
+}
+
+FILE * win32_popen (const char *cmd, const char *fmode)
+{
+ char mode[3];
+ char *p, *q;
+ const char *cmd2;
+ FILE *ret;
+
+ mode[0] = fmode[0];
+ mode[1] = 'b';
+ mode[2] = '\0';
+
+ if (is_include_space (cmd)) {
+ cmd2 = xmalloc (strlen (cmd) + 3);
+ q = (char *)cmd2;
+ p = (char *)cmd;
+ *q++= '\"';
+ while(*p)
+ *q++ = *p++;
+ *q++ = '\"';
+ *q = '\0';
+ ret = _popen (cmd2, mode);
+ free ((char *)cmd2);
+ return ret;
+ } else {
+ return _popen (cmd, mode);
+ }
+}
+
+int win32_pclose (FILE *f)
+{
+ return _pclose (f);
+}
+
+/* large file support */
+
+__int64
+xftell64 (FILE *f, const char *filename)
+{
+#if _MSC_VER > 1200
+ __int64 where;
+ where = _ftelli64(f);
+ if (where < (__int64)0)
+ FATAL_PERROR(filename);
+#else
+ __int64 where, filepos;
+ int fd;
+
+ fd = fileno(f);
+ if(f->_cnt < 0)
+ f->_cnt = 0;
+ if((filepos = _lseeki64(fd, (__int64)0, SEEK_CUR)) < (__int64)0) {
+ FATAL_PERROR(filename);
+ return (__int64)(-1);
+ }
+ if(filepos == (__int64)0)
+ where = (__int64)(f->_ptr - f->_base);
+ else
+ where = filepos - f->_cnt;
+#endif
+ return where;
+}
+
+void
+xfseek64 (FILE *f, __int64 offset, int wherefrom, const char *filename)
+{
+#if _MSC_VER > 1200
+ if (_fseeki64(f, offset, wherefrom) < (__int64)0)
+ FATAL_PERROR(filename);
+#else
+ if(wherefrom == SEEK_CUR) {
+ offset += xftell64(f, filename);
+ wherefrom = SEEK_SET;
+ }
+ fflush(f);
+ if (_lseeki64(fileno(f), offset, wherefrom) < (__int64)0)
+ FATAL_PERROR(filename);
+#endif
+}
+
+
+/* special TeXLive Ghostscript */
+
+static int is_dir (char *buff)
+{
+ struct stat stats;
+
+ return stat (buff, &stats) == 0 && S_ISDIR (stats.st_mode);
+}
+
+/*
+ TeXlive uses its own gs in
+ $SELFAUTOPARENT/tlpkg/tlgs
+*/
+void texlive_gs_init(void)
+{
+ char *nptr, *path;
+ char tlgsbindir[512];
+ char tlgslibdir[512];
+ char resourcedir[512];
+ nptr = kpse_var_value("TEXLIVE_WINDOWS_EXTERNAL_GS");
+ if (nptr == NULL || *nptr == '0' || *nptr == 'n' || *nptr == 'f') {
+ if (nptr)
+ free (nptr);
+ nptr = kpse_var_value("SELFAUTOPARENT");
+ if (nptr) {
+ strcpy(tlgsbindir, nptr);
+ strcat(tlgsbindir,"/tlpkg/tlgs");
+ strcpy(resourcedir, tlgsbindir);
+ strcat(resourcedir, "/Resource");
+ if(is_dir(tlgsbindir)) {
+ strcpy(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/lib;");
+ if(is_dir(resourcedir)) {
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/fonts;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/Resource/Init;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/Resource;");
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/kanji");
+ } else {
+ strcat(tlgslibdir, tlgsbindir);
+ strcat(tlgslibdir, "/fonts");
+ }
+ strcat(tlgsbindir, "/bin;");
+ free(nptr);
+ for(nptr = tlgsbindir; *nptr; nptr++) {
+ if(*nptr == '/') *nptr = '\\';
+ }
+ nptr = getenv("PATH");
+ path = (char *)malloc(strlen(nptr) + strlen(tlgsbindir) + 6);
+ strcpy(path, tlgsbindir);
+ strcat(path, nptr);
+ xputenv("PATH", path);
+ xputenv("GS_LIB", tlgslibdir);
+ }
+ }
+ } else {
+ free (nptr);
+ }
+}
+
+/*
+ path name in char *input is changed into the long
+ name format and returned in char *buff.
+ return value: 0 if failed
+ 1 if succeeded
+*/
+
+int kpathsea_getlongpath(kpathsea kpse, char *buff, char *input, int len)
+{
+ HANDLE hnd;
+ WIN32_FIND_DATA ffd;
+ int cnt = 0;
+ char *p, *q, *r;
+
+ buff[0] = '\0';
+/*
+temporarily change directory separators into back slashs
+*/
+ for(p = input; *p; p++) {
+ if(*p == '/')
+ *p = '\\';
+ }
+
+ p = q = input;
+ r = buff;
+
+/*
+UNC name
+*/
+ if(q[0] == '\\' && q[1] == '\\') {
+ cnt += 2;
+ if(cnt > len) return 0;
+ buff[0] = '/';
+ buff[1] = '/';
+ p += 2;
+ r += 2;
+ while(*p != '\\' && *p) {
+ if (kpathsea_IS_KANJI(kpse, p)) {
+ cnt++;
+ if(cnt > len) return 0;
+ *r++ = *p++;
+ }
+ cnt++;
+ if(cnt > len) return 0;
+ *r++ = *p++;
+ }
+ cnt++;
+ if(cnt > len) return 0;
+ *r++ = '/';
+ if(*p) p++;
+ while(*p != '\\' && *p) {
+ if (kpathsea_IS_KANJI(kpse, p)) {
+ cnt++;
+ if(cnt > len) return 0;
+ *r++ = *p++;
+ }
+ cnt++;
+ if(cnt > len) return 0;
+ *r++ = *p++;
+ }
+ cnt++;
+ if(cnt > len) return 0;
+ *r++ = '/';
+ *r= '\0';
+ if(*p) p++;
+/*
+drive name
+*/
+ } else if(isalpha(q[0]) && q[1] == ':' && q[2] == '\\') {
+ *r++ = q[0];
+ *r++ = ':';
+ *r++ = '/';
+ *r = '\0';
+ p += 3;
+ cnt += 3;
+ if(cnt > len) return 0;
+ }
+
+ for( ; *p; p++) {
+ if(kpathsea_IS_KANJI(kpse, p)) {
+ p++;
+ continue;
+ }
+ if(*p == '\\') {
+ *p = '\0';
+ if((*(p-2) == '\\' || p-1 == q) && *(p-1) == '.') {
+ cnt += 2;
+ if(cnt > len) return 0;
+ strcat(buff, "./");
+ } else if((*(p-3) == '\\' || p-2 == q) && *(p-2) == '.' && *(p-1) == '.') {
+ cnt += 3;
+ if(cnt > len) return 0;
+ strcat(buff, "../");
+ } else {
+ if((hnd = FindFirstFile(q, &ffd)) == INVALID_HANDLE_VALUE) {
+ return 0;
+ }
+ FindClose(hnd);
+ cnt += strlen(ffd.cFileName);
+ cnt++;
+ if(cnt > len) return 0;
+ strcat(buff, ffd.cFileName);
+ strcat(buff, "/");
+ }
+ *p = '\\';
+ }
+ }
+
+/*
+file itself
+*/
+ if((hnd = FindFirstFile(q, &ffd)) == INVALID_HANDLE_VALUE) {
+ return 0;
+ }
+ FindClose(hnd);
+ cnt += strlen(ffd.cFileName);
+ if(cnt > len) return 0;
+ strcat(buff, ffd.cFileName);
+ return 1;
+}
+
+/* user info */
+
+/* Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au> */
+/* Sync'ed with Emacs 19.34.6 by Marc Paquette <marcpa@cam.org> */
+/* Adapted to fpTeX 0.4 by Fabrice Popineau <Fabrice.Popineau@supelec.fr> */
+
+char * kpathsea_get_home_directory(kpathsea kpse)
+{
+ char *p;
+ char *home = getenv("HOME");
+ if(!home)
+ home = getenv("USERPROFILE");
+ if(home) {
+ home = xstrdup(home);
+ for(p = home; *p; p++) {
+ if(kpathsea_IS_KANJI(kpse, p)) {
+ p++;
+ continue;
+ }
+ if(*p == '\\')
+ *p = '/';
+ }
+ }
+ return home;
+}
+
+int
+kpathsea_getuid (kpathsea kpse)
+{
+ return kpse->the_passwd.pw_uid;
+}
+
+int
+kpathsea_getgid (kpathsea kpse)
+{
+ return kpse->the_passwd.pw_gid;
+}
+
+struct passwd *
+kpathsea_getpwuid (kpathsea kpse, int uid)
+{
+ if (uid == kpse->the_passwd.pw_uid)
+ return &kpse->the_passwd;
+ return NULL;
+}
+
+struct passwd *
+kpathsea_getpwnam (kpathsea kpse, char *name)
+{
+ struct passwd *pw;
+
+ pw = kpathsea_getpwuid (kpse, kpathsea_getuid (kpse));
+ if (!pw)
+ return pw;
+
+ if (stricmp (name, pw->pw_name))
+ return NULL;
+
+ return pw;
+}
+
+void
+kpathsea_init_user_info (kpathsea kpse)
+{
+ char *home;
+ DWORD nSize = 256;
+
+ if (!GetUserName (kpse->the_passwd.pw_name, &nSize))
+ strcpy (kpse->the_passwd.pw_name, "unknown");
+ kpse->the_passwd.pw_uid = 123;
+ kpse->the_passwd.pw_gid = 123;
+
+ /* Ensure HOME and SHELL are defined. */
+
+ home = kpathsea_get_home_directory(kpse);
+ if (home) {
+ putenv(concat("HOME=", home));
+ }
+ else {
+ putenv ("HOME=c:/");
+ }
+
+ if (getenv ("SHELL") == NULL)
+ putenv ((GetVersion () & 0x80000000) ? "SHELL=command" : "SHELL=cmd");
+
+ {
+ /* If TEXMFTEMP is defined, then use it as the TEMP and TMP variables. */
+ char *p;
+ if ((p = getenv("TEXMFTEMP")) != NULL) {
+ putenv(concat("TEMP=", p));
+ putenv(concat("TMP=", p));
+ }
+ }
+
+ /* Set dir and shell from environment variables. */
+ strcpy (kpse->the_passwd.pw_dir, kpathsea_get_home_directory(kpse));
+ strcpy (kpse->the_passwd.pw_shell, getenv ("SHELL"));
+}
+
+/* win32_system */
+int win32_system(const char *cmd)
+{
+ const char *p;
+ char *q;
+ char *av[4];
+ int len, ret;
+ int spacep = 0;
+
+ if(cmd == NULL)
+ return 1;
+
+ av[0] = xstrdup("cmd.exe");
+ av[1] = xstrdup("/c");
+
+ len = strlen(cmd) + 3;
+ spacep = is_include_space(cmd);
+ av[2] = malloc(len);
+ q = av[2];
+ if(spacep)
+ *q++ = '"';
+ for(p = cmd; *p; p++, q++) {
+ if(*p == '\'')
+ *q = '"';
+ else
+ *q = *p;
+ }
+ if(spacep)
+ *q++ = '"';
+ *q = '\0';
+ av[3] = NULL;
+ ret = _spawnvp(_P_WAIT, av[0], av);
+ free(av[0]);
+ free(av[1]);
+ free(av[2]);
+ return ret;
+}
+
+#if defined (KPSE_COMPAT_API)
+int getlongpath(char *buff, char *input, int len)
+{
+ return kpathsea_getlongpath(kpse_def, buff, input, len);
+}
+
+char * get_home_directory(void)
+{
+ return kpathsea_get_home_directory(kpse_def);
+}
+
+int
+getuid (void)
+{
+ return kpathsea_getuid(kpse_def);
+}
+
+int
+geteuid (void)
+{
+ /* I could imagine arguing for checking to see whether the user is
+ in the Administrators group and returning a UID of 0 for that
+ case, but I don't know how wise that would be in the long run. */
+ return getuid ();
+}
+
+int
+getgid (void)
+{
+ return kpathsea_getgid (kpse_def);
+}
+
+int
+getegid (void)
+{
+ return getgid ();
+}
+
+struct passwd *
+getpwuid (int uid)
+{
+ return kpathsea_getpwuid (kpse_def, uid);
+}
+
+struct passwd *
+getpwnam (char *name)
+{
+ return kpathsea_getpwnam (kpse_def, name);
+}
+
+#endif /* KPSE_COMPAT_API */
diff --git a/Build/source/texk/kpathsea/win32lib.h b/Build/source/texk/kpathsea/win32lib.h
new file mode 100644
index 00000000000..005ee92bc62
--- /dev/null
+++ b/Build/source/texk/kpathsea/win32lib.h
@@ -0,0 +1,294 @@
+/* win32lib.h: bits and pieces for win32 and msvc.
+
+ Copyright 2006, 2010-2016 Akira Kakuto.
+ Copyright 1996, 1997, 1998, 1999 Fabrice Popineau.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+
+#ifndef KPATHSEA_WIN32LIB_H
+#define KPATHSEA_WIN32LIB_H
+
+#ifndef KPSE_COMPAT_API
+#define KPSE_COMPAT_API 1
+#endif
+
+#pragma warning( disable : 4007 4096 4018 4244 )
+
+#include <kpathsea/c-auto.h>
+#include <kpathsea/c-proto.h>
+
+/*
+ * Define symbols to identify the version of Unix this is.
+ * Define all the symbols that apply correctly.
+ */
+
+#ifndef DOSISH
+#define DOSISH
+#endif
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN _MAX_PATH
+#endif
+
+#define HAVE_DUP2 1
+#define HAVE_RENAME 1
+#define HAVE_RMDIR 1
+#define HAVE_MKDIR 1
+#define HAVE_GETHOSTNAME 1
+#define HAVE_RANDOM 1
+#define USE_UTIME 1
+#define HAVE_MOUSE 1
+#define HAVE_TZNAME 1
+
+/* These have to be defined because our compilers treat __STDC__ as being
+ defined (most of them anyway). */
+
+#if !defined(__cplusplus)
+#define access _access
+#define alloca _alloca
+#define chdir _chdir
+#define chmod _chmod
+#define close _close
+#define creat _creat
+#define daylight _daylight
+#define dup _dup
+#define dup2 _dup2
+#define execlp _execlp
+#define execvp _execvp
+#define fcloseall _fcloseall
+#define fdopen _fdopen
+#define fileno _fileno
+#define flushall _flushall
+#define fstat _fstat
+#define ftime _ftime
+#define getpid _getpid
+#define getcwd _getcwd
+#define inline __inline
+#define isascii __isascii
+#define isatty _isatty
+#define itoa _itoa
+#define link _link
+#define lseek _lseek
+#define memicmp _memicmp
+#define mktemp _mktemp
+#define open _open
+#define putenv _putenv
+#define read _read
+#define rmdir _rmdir
+#define setmode _setmode
+#define spawnlp _spawnlp
+#define stat _stat
+#define stricmp _stricmp
+#define strdup _strdup
+#define strlwr _strlwr
+#define strnicmp _strnicmp
+#define tempnam _tempnam
+#define timeb _timeb
+#define timezone _timezone
+#define unlink _unlink
+#define umask _umask
+#define utime _utime
+#define write _write
+#endif /* !__cplusplus */
+
+#define getwd(dir) GetCurrentDirectory(MAXPATHLEN, dir)
+
+#ifdef strcasecmp
+#undef strcasecmp
+#endif
+#ifdef strncasecmp
+#undef strncasecmp
+#endif
+#define strcasecmp _stricmp
+#define strncasecmp _strnicmp
+
+#ifndef S_IFMT
+#define S_IFMT _S_IFMT
+#endif
+#ifndef S_IFDIR
+#define S_IFDIR _S_IFDIR
+#endif
+#ifndef S_IFCHR
+#define S_IFCHR _S_IFCHR
+#endif
+#ifndef S_IFIFO
+#define S_IFIFO _S_IFIFO
+#endif
+#ifndef S_IFREG
+#define S_IFREG _S_IFREG
+#endif
+#ifndef S_IREAD
+#define S_IREAD _S_IREAD
+#endif
+#ifndef S_IWRITE
+#define S_IWRITE _S_IWRITE
+#endif
+#define S_IEXEC _S_IEXEC
+#ifndef S_IXUSR
+#define S_IXUSR _S_IEXEC
+#endif
+#ifndef S_IXGRP
+#define S_IXGRP _S_IEXEC
+#endif
+#ifndef S_IXOTH
+#define S_IXOTH _S_IEXEC
+#endif
+#ifndef S_IRUSR
+#define S_IRUSR _S_IREAD
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR _S_IWRITE
+#endif
+#ifndef S_IROTH
+#define S_IROTH _S_IREAD
+#endif
+#ifndef S_IWOTH
+#define S_IWOTH _S_IWRITE
+#endif
+#ifndef S_IRGRP
+#define S_IRGRP _S_IREAD
+#endif
+#ifndef S_IWGRP
+#define S_IWGRP _S_IWRITE
+#endif
+#ifndef O_RDWR
+#define O_RDWR _O_RDWR
+#endif
+#ifndef O_CREAT
+#define O_CREAT _O_CREAT
+#endif
+#ifndef O_TRUNC
+#define O_TRUNC _O_TRUNC
+#endif
+#ifndef O_RDONLY
+#define O_RDONLY _O_RDONLY
+#endif
+#ifndef O_WRONLY
+#define O_WRONLY _O_WRONLY
+#endif
+#ifndef O_APPEND
+#define O_APPEND _O_APPEND
+#endif
+#ifndef O_TEXT
+#define O_TEXT _O_TEXT
+#endif
+#ifndef O_BINARY
+#define O_BINARY _O_BINARY
+#endif
+#ifndef O_EXCL
+#define O_EXCL _O_EXCL
+#endif
+
+#if defined (S_IFBLK) && !defined (S_ISBLK)
+#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */
+#endif
+
+#if defined (S_IFCHR) && !defined (S_ISCHR)
+#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */
+#endif
+
+#if defined (S_IFDIR) && !defined (S_ISDIR)
+#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */
+#endif
+
+#if defined (S_IFREG) && !defined (S_ISREG)
+#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */
+#endif
+
+#if defined (S_IFIFO) && !defined (S_ISFIFO)
+#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */
+#endif
+
+#if defined (S_IFLNK) && !defined (S_ISLNK)
+#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */
+#endif
+
+#if defined (S_IFSOCK) && !defined (S_ISSOCK)
+#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */
+#endif
+
+/* Define this so that winsock.h definitions don't get included when
+ windows.h is... For this to have proper effect, config.h must
+ always be included before windows.h. */
+#if !defined(_WINSOCKAPI_) && !defined(WWW_WIN_DLL)
+#define _WINSOCKAPI_ 1
+#endif
+
+#define boolean saved_boolean
+#include <windows.h>
+#undef boolean
+
+#include <kpathsea/types.h>
+
+/* Defines size_t and alloca (). */
+#include <malloc.h>
+
+/* For proper declaration of environ. */
+#include <stdlib.h>
+#include <io.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <process.h>
+
+/* For _getcwd. */
+#include <direct.h>
+
+/* Web2C takes care of ensuring that these are defined. */
+#ifdef max
+#undef max
+#undef min
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern KPSEDLL double win32_floor (double x);
+extern KPSEDLL FILE *win32_popen (const char *cmd, const char *mode);
+extern KPSEDLL int win32_pclose (FILE *f);
+extern KPSEDLL struct passwd *kpathsea_getpwnam (kpathsea kpse, char *name);
+extern KPSEDLL int win32_system(const char *cmd);
+extern KPSEDLL void kpathsea_init_user_info (kpathsea kpse);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL struct passwd *getpwnam (char *name);
+#endif /* KPSE_COMPAT_API */
+
+#define system(p) win32_system(p)
+#define popen(cmd, mode) win32_popen(cmd, mode)
+#define pclose(file) win32_pclose(file)
+/* Functions for WIN32 */
+extern KPSEDLL FILE *popen(const char * str, const char * str2);
+extern KPSEDLL int pclose(FILE * f);
+extern KPSEDLL int system(const char * cmd);
+
+extern KPSEDLL void texlive_gs_init(void);
+extern KPSEDLL int kpathsea_getlongpath (kpathsea kpse, char *output, char *input, int len);
+extern KPSEDLL char *kpathsea_get_home_directory (kpathsea kpse);
+
+#if defined (KPSE_COMPAT_API)
+extern KPSEDLL int getlongpath (char *output, char *input, int len);
+extern KPSEDLL char *get_home_directory (void);
+#endif
+
+#define off_t __int64
+#define xfseeko xfseek64
+#define xftello xftell64
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not KPATHSEA_WIN32LIB_H */
diff --git a/Build/source/texk/kpathsea/xbasename.c b/Build/source/texk/kpathsea/xbasename.c
new file mode 100644
index 00000000000..2d3a692e889
--- /dev/null
+++ b/Build/source/texk/kpathsea/xbasename.c
@@ -0,0 +1,61 @@
+/* xbasename.c: return the last element in a path.
+
+ Copyright 1992, 1994, 1995, 1996, 2008, 2011, 2016, 2017 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+/* Have to include this first to get c-auto.h. */
+#include <kpathsea/config.h>
+
+#include <kpathsea/c-pathch.h>
+
+/* Return NAME with any leading path stripped off. This returns a
+ pointer into NAME. For example, `basename ("/foo/bar.baz")'
+ returns "bar.baz". */
+
+const_string
+xbasename (const_string name)
+{
+ const_string base = name;
+ const_string p;
+
+ if (NAME_BEGINS_WITH_DEVICE(name))
+ base += 2;
+
+ else if (IS_UNC_NAME(name)) {
+ unsigned limit;
+
+ for (limit = 2; name[limit] && !IS_DIR_SEP (name[limit]); limit++)
+ ;
+ if (name[limit++] && name[limit] && !IS_DIR_SEP (name[limit])) {
+ for (; name[limit] && !IS_DIR_SEP (name[limit]); limit++)
+ ;
+ } else
+ /* malformed UNC name, backup */
+ limit = 0;
+ base += limit;
+ }
+
+ for (p = base; *p; p++) {
+ if (IS_DIR_SEP(*p))
+ base = p + 1;
+#if defined(WIN32) && defined (KPSE_COMPAT_API)
+ else if (IS_KANJI(p))
+ p++;
+#endif
+ }
+
+ return base;
+}
diff --git a/Build/source/texk/kpathsea/xcalloc.c b/Build/source/texk/kpathsea/xcalloc.c
new file mode 100644
index 00000000000..aca15548a53
--- /dev/null
+++ b/Build/source/texk/kpathsea/xcalloc.c
@@ -0,0 +1,35 @@
+/* xcalloc.c: calloc with error checking.
+
+ Copyright 1992, 1993, 2008, 2010 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+void *
+xcalloc (size_t nelem, size_t elsize)
+{
+ void *new_mem = (void*)calloc(nelem ? nelem : 1, elsize ? elsize : 1);
+
+ if (new_mem == NULL) {
+ fprintf(stderr,
+ "xcalloc: request for %lu elements of size %lu failed.\n",
+ (unsigned long)nelem, (unsigned long)elsize);
+ exit(EXIT_FAILURE);
+ }
+
+ return new_mem;
+}
diff --git a/Build/source/texk/kpathsea/xdirname.c b/Build/source/texk/kpathsea/xdirname.c
new file mode 100644
index 00000000000..cc6600928ad
--- /dev/null
+++ b/Build/source/texk/kpathsea/xdirname.c
@@ -0,0 +1,108 @@
+/* xdirname.c: return the directory part of a path.
+
+ Copyright 1999, 2008, 2011, 2016, 2017 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+/* Return directory for NAME. This is "." if NAME contains no directory
+ separators (should never happen for selfdir), else whatever precedes
+ the final directory separator, but with multiple separators stripped.
+ For example, `xdirname ("/foo//bar.baz")' returns "/foo". Always
+ return a new string. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/c-pathch.h>
+
+string
+xdirname (const_string name)
+{
+ string ret;
+ unsigned limit = 0, loc;
+#if defined(WIN32)
+ string p;
+#endif
+
+ /* Ignore a NULL name. */
+ if (!name)
+ return NULL;
+
+ if (NAME_BEGINS_WITH_DEVICE(name)) {
+ limit = 2;
+ } else if (IS_UNC_NAME(name)) {
+ for (limit = 2; name[limit] && !IS_DIR_SEP (name[limit]); limit++)
+ ;
+ if (name[limit++] && name[limit] && !IS_DIR_SEP (name[limit])) {
+ for (; name[limit] && !IS_DIR_SEP (name[limit]); limit++)
+ ;
+ limit--;
+ } else
+ /* malformed UNC name, backup */
+ limit = 0;
+ }
+
+#if defined(WIN32) && defined (KPSE_COMPAT_API)
+ for (loc = strlen (name); loc > limit &&
+ (!IS_DIR_SEP (name[loc-1]) ||
+ (loc > 1 && IS_KANJI(name+loc-2))); loc--)
+ ;
+#else
+ for (loc = strlen (name); loc > limit && !IS_DIR_SEP (name[loc-1]); loc--)
+ ;
+#endif
+
+ if (loc == limit) {
+ if (limit == 0)
+ ret = xstrdup (".");
+ else if (limit == 2) {
+ ret = (string)xmalloc(4);
+ ret[0] = name[0];
+ ret[1] = name[1];
+ ret[2] = '.';
+ ret[3] = '\0';
+ } else {
+ /* UNC name is "//server/share". */
+ ret = xstrdup (name);
+ }
+ } else {
+ /* If have ///a, must return /, so don't strip off everything. */
+#if defined(WIN32) && defined (KPSE_COMPAT_API)
+ while (loc > limit+1 && IS_DIR_SEP (name[loc-1])) {
+ if (loc > 1 && IS_KANJI(name+loc-2))
+ break;
+ loc--;
+ }
+#else
+ while (loc > limit+1 && IS_DIR_SEP (name[loc-1])) {
+ loc--;
+ }
+#endif
+ ret = (string)xmalloc(loc+1);
+ strncpy(ret, name, loc);
+ ret[loc] = '\0';
+ }
+
+#if defined(WIN32)
+ for (p = ret; *p; p++) {
+ if (*p == '\\')
+ *p = '/';
+#if defined (KPSE_COMPAT_API)
+ else if (IS_KANJI(p))
+ p++;
+#endif
+ }
+#endif
+
+ return ret;
+}
diff --git a/Build/source/texk/kpathsea/xdirtest.c b/Build/source/texk/kpathsea/xdirtest.c
new file mode 100644
index 00000000000..1c657fc15fe
--- /dev/null
+++ b/Build/source/texk/kpathsea/xdirtest.c
@@ -0,0 +1,158 @@
+/* xdirtest.c: standalone program to test xdirname() and xbasename().
+
+ Copyright 1999 Karl Berry.
+ Copyright 2005 Olaf Weber.
+ Copyright 2011 Peter Breitenlohner.
+ Copyright 2016 Akira Kakuto.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+static const char *tab[] = {
+/* UNC names */
+#if defined (WIN32)
+ "\\\\neuromancer\\fptex\\bin\\win32\\kpsewhich.exe",
+ "\\\\neuromancer\\fptex\\win32\\kpsewhich.exe",
+ "\\\\neuromancer\\fptex\\kpsewhich.exe",
+ "\\\\neuromancer\\kpsewhich.exe",
+ "//server.host/share/file",
+ "//server.host/share/file/",
+ "//server.host/share/",
+ "//server.host//share", /* malformed */
+ "//server.host", /* malformed */
+ "//.host/share", /* not UNC name */
+#endif
+ "//neuromancer/kpsewhich.exe",
+/* names with device */
+#if defined (WIN32)
+ "p:\\bin\\win32\\kpsewhich.exe",
+ "p:\\bin\\win32\\\\",
+ "p:\\win32\\kpsewhich.exe",
+ "p:\\win32\\",
+ "p:\\kpsewhich.exe",
+ "p:\\",
+ "p:bin\\win32\\kpsewhich.exe",
+ "p:win32\\kpsewhich.exe",
+#endif
+ "p:win32//kpsewhich.exe",
+ "p:win32/",
+ "p:kpsewhich.exe",
+ "p:///kpsewhich.exe",
+/* 'normal' names */
+ "/usr/bin/win32/kpsewhich.exe",
+ "/usr/bin/win32//",
+ "/usr/bin/kpsewhich.exe",
+ "/usr/bin/",
+ "///usr/kpsewhich.exe",
+ "/usr/kpsewhich.exe",
+ "///kpsewhich.exe",
+ "/kpsewhich.exe",
+ "",
+ NULL
+};
+
+#if defined (WIN32)
+static const char *ktab[] = {
+/* UNC names */
+ "\\\\serverK\\\\shareK\\\\file",
+ "\\\\serverKK\\shareKK\\file",
+ "\\\\serverK\\\\shareK\\",
+ "\\\\serverKK\\shareKK",
+/* 'normal' names */
+ "\\abcK\\deKKfK\\\\hijK\\",
+ "\\abcKKdeKKfKK\\hijKK",
+ "\\abcK\\deKKfK\\",
+ "\\abcKKdeKKfKK",
+ NULL
+};
+
+static char *
+to_kanji (const char *str) {
+ char *p, *ret = xstrdup(str);
+
+ for (p = ret; *p; p++)
+ if (*p == 'K')
+ *p = 0x81;
+
+ return ret;
+}
+
+static char *
+from_kanji (char *str) {
+ char *p;
+
+ for (p = str; *p; p++)
+ if ((unsigned char) *p == 0x81)
+ *p = 'K';
+
+ return str;
+}
+
+static void
+do_kanji (kpathsea kpse) {
+ const char **p;
+
+ printf("\nAssuming CP %s 932\n", kpse->Is_cp932_system ? "is" : "is not");
+
+ for (p = ktab; *p; p++) {
+ char *q = to_kanji(*p);
+ char *r = xdirname(q);
+
+ printf("%s -> %s + %s\n", *p, from_kanji(r), *p + (xbasename(q)-q));
+
+ free (r);
+ free (q);
+ }
+}
+
+static void
+kanji_test(kpathsea kpse) {
+ int save_cp932 = kpse->Is_cp932_system;
+
+ printf("\nTesting 2-Byte Kanji (CP 932, SJIS) codes with 'K' representing 0x81\n");
+
+ kpse->Is_cp932_system = 932; /* pretend CP is 932 */
+ do_kanji(kpse);
+
+ kpse->Is_cp932_system = 0; /* pretend CP is not 932 */
+ do_kanji(kpse);
+
+ kpse->Is_cp932_system = save_cp932;
+}
+#endif
+
+int main(int argc, char **argv)
+{
+ const char **p;
+ kpathsea kpse = kpathsea_new();
+
+ kpathsea_set_program_name (kpse, argv[0], NULL);
+
+ printf("\n%s: name -> xdirname(name) + xbasename(name)\n\n",
+ kpse->invocation_short_name);
+
+ for (p = tab; *p; p++) {
+ char *q = xdirname(*p);
+
+ printf("%s -> %s + %s\n", *p, q, xbasename(*p));
+ free (q);
+ }
+
+#if defined (WIN32)
+ kanji_test(kpse);
+#endif
+
+ return 0;
+}
diff --git a/Build/source/texk/kpathsea/xfopen.c b/Build/source/texk/kpathsea/xfopen.c
new file mode 100644
index 00000000000..00bec3da043
--- /dev/null
+++ b/Build/source/texk/kpathsea/xfopen.c
@@ -0,0 +1,48 @@
+/* xfopen.c: fopen and fclose with error checking.
+
+ Copyright 1992, 1993, 1995, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+/* These routines just check the return status from standard library
+ routines and abort if an error happens. */
+
+FILE *
+xfopen (const_string filename, const_string mode)
+{
+ FILE *f;
+
+ assert(filename && mode);
+
+ f = fopen(filename, mode);
+ if (f == NULL)
+ FATAL_PERROR(filename);
+
+ return f;
+}
+
+
+void
+xfclose (FILE *f, const_string filename)
+{
+ assert(f);
+
+ if (fclose(f) == EOF)
+ FATAL_PERROR(filename);
+
+}
diff --git a/Build/source/texk/kpathsea/xfseek.c b/Build/source/texk/kpathsea/xfseek.c
new file mode 100644
index 00000000000..1a1bfa0726a
--- /dev/null
+++ b/Build/source/texk/kpathsea/xfseek.c
@@ -0,0 +1,27 @@
+/* xfseek.c: fseek with error checking.
+
+ Copyright 1992, 1995, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+void
+xfseek (FILE *f, long offset, int wherefrom, const_string filename)
+{
+ if (fseek (f, offset, wherefrom) < 0) {
+ FATAL_PERROR(filename);
+ }
+}
diff --git a/Build/source/texk/kpathsea/xfseeko.c b/Build/source/texk/kpathsea/xfseeko.c
new file mode 100644
index 00000000000..8d836441d17
--- /dev/null
+++ b/Build/source/texk/kpathsea/xfseeko.c
@@ -0,0 +1,26 @@
+/* xfseeko.c: fseeko with error checking.
+
+ Copyright 2008 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+void
+xfseeko (FILE *f, off_t offset, int wherefrom, const_string filename)
+{
+ if (fseeko (f, offset, wherefrom) < 0) {
+ FATAL_PERROR(filename);
+ }
+}
diff --git a/Build/source/texk/kpathsea/xftell.c b/Build/source/texk/kpathsea/xftell.c
new file mode 100644
index 00000000000..123f49a75b9
--- /dev/null
+++ b/Build/source/texk/kpathsea/xftell.c
@@ -0,0 +1,30 @@
+/* xftell.c: ftell with error checking.
+
+ Copyright 1992, 1993, 1995, 2008, 2011 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+long
+xftell (FILE *f, const_string filename)
+{
+ long where = ftell (f);
+
+ if (where < 0)
+ FATAL_PERROR(filename);
+
+ return where;
+}
diff --git a/Build/source/texk/kpathsea/xftello.c b/Build/source/texk/kpathsea/xftello.c
new file mode 100644
index 00000000000..a01b42a5622
--- /dev/null
+++ b/Build/source/texk/kpathsea/xftello.c
@@ -0,0 +1,31 @@
+/* xftello.c: ftello with error checking.
+
+ Copyright 1992, 1993, 1995, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+off_t
+xftello (FILE *f, const_string filename)
+{
+ off_t where = ftello (f);
+
+ if (where < 0)
+ FATAL_PERROR(filename);
+
+ return where;
+}
diff --git a/Build/source/texk/kpathsea/xgetcwd.c b/Build/source/texk/kpathsea/xgetcwd.c
new file mode 100644
index 00000000000..044731dbd1b
--- /dev/null
+++ b/Build/source/texk/kpathsea/xgetcwd.c
@@ -0,0 +1,159 @@
+/* xgetcwd.c: a from-scratch version of getwd. Ideas from tcsh 5.20 source.
+
+ Copyright 1992, 1994, 1996, 2008, 2011, 2016 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#if (defined (HAVE_GETCWD) && !defined (GETCWD_FORKS)) || defined (HAVE_GETWD)
+#include <kpathsea/c-pathmx.h>
+#else /* (not HAVE_GETCWD || GETCWD_FORKS) && not HAVE_GETWD */
+#include <kpathsea/c-dir.h>
+#include <kpathsea/xopendir.h>
+#include <kpathsea/xstat.h>
+
+
+static void
+xchdir (string dirname)
+{
+ if (chdir(dirname) != 0)
+ FATAL_PERROR(dirname);
+}
+
+#endif /* (not HAVE_GETCWD || GETCWD_FORKS) && not HAVE_GETWD */
+
+
+/* Return the pathname of the current directory, or give a fatal error. */
+
+string
+xgetcwd (void)
+{
+ /* If the system provides getcwd, use it. If not, use getwd if
+ available. But provide a way not to use getcwd: on some systems
+ getcwd forks, which is expensive and may in fact be impossible for
+ large programs like tex. If your system needs this define and it
+ is not detected by configure, let me know.
+ -- Olaf Weber <infovore@xs4all.nl */
+#if defined (HAVE_GETCWD) && !defined (GETCWD_FORKS)
+ char path[PATH_MAX + 1];
+#if defined(WIN32)
+ string pp;
+#endif
+
+ if (getcwd (path, PATH_MAX + 1) == NULL) {
+ FATAL_PERROR ("getcwd");
+ }
+
+#if defined(WIN32)
+ for (pp = path; *pp; pp++) {
+ if (*pp == '\\')
+ *pp = '/';
+#if defined (KPSE_COMPAT_API)
+ else if (IS_KANJI(pp))
+ pp++;
+#endif
+ }
+#endif
+
+ return xstrdup (path);
+#elif defined (HAVE_GETWD)
+ char path[PATH_MAX + 1];
+
+ if (getwd (path) == NULL) {
+ FATAL_PERROR ("getwd");
+ }
+
+ return xstrdup (path);
+#else /* (not HAVE_GETCWD || GETCWD_FORKS) && not HAVE_GETWD */
+ struct stat root_stat, cwd_stat;
+ string cwd_path = (string)xmalloc(2); /* In case we assign "/" below. */
+
+ *cwd_path = 0;
+
+ /* Find the inodes of the root and current directories. */
+ root_stat = xstat("/");
+ cwd_stat = xstat(".");
+
+ /* Go up the directory hierarchy until we get to root, prepending each
+ directory we pass through to `cwd_path'. */
+ while (!SAME_FILE_P(root_stat, cwd_stat)) {
+ struct dirent *e;
+ DIR *parent_dir;
+ boolean found = false;
+
+ xchdir("..");
+ parent_dir = xopendir(".");
+
+ /* Look through the parent directory for the entry with the same
+ inode, so we can get its name. */
+ while ((e = readdir (parent_dir)) != NULL && !found) {
+ struct stat test_stat;
+ test_stat = xlstat(e->d_name);
+
+ if (SAME_FILE_P(test_stat, cwd_stat)) {
+ /* We've found it. Prepend the pathname. */
+ string temp = cwd_path;
+ cwd_path = concat3("/", e->d_name, cwd_path);
+ free(temp);
+
+ /* Set up to test the next parent. */
+ cwd_stat = xstat(".");
+
+ /* Stop reading this directory. */
+ found = true;
+ }
+ }
+ if (!found)
+ FATAL2("No inode %d/device %d in parent directory",
+ cwd_stat.st_ino, cwd_stat.st_dev);
+
+ xclosedir(parent_dir);
+ }
+
+ /* If the current directory is the root, cwd_path will be the empty
+ string, and we will have not gone through the loop. */
+ if (*cwd_path == 0)
+ strcpy(cwd_path, "/");
+ else
+ /* Go back to where we were. */
+ xchdir(cwd_path);
+
+#ifdef DOSISH
+ /* Prepend the drive letter to CWD_PATH, since this technique
+ never tells us what the drive is.
+
+ Note that on MS-DOS/MS-Windows, the branch that works around
+ missing `getwd' will probably only work for DJGPP (which does
+ have `getwd'), because only DJGPP reports meaningful
+ st_ino numbers. But someday, somebody might need this... */
+ {
+ char drive[3];
+ string temp = cwd_path;
+
+ /* Make the drive letter lower-case, unless it is beyond Z: (yes,
+ there ARE such drives, in case of Novell Netware on MS-DOS). */
+ drive[0] = root_stat.st_dev + (root_stat.st_dev < 26 ? 'a' : 'A');
+ drive[1] = ':';
+ drive[2] = '\0';
+
+ cwd_path = concat(drive, cwd_path);
+ free(temp);
+ }
+#endif
+
+ return cwd_path;
+#endif /* (not HAVE_GETCWD || GETCWD_FORKS) && not HAVE_GETWD */
+}
diff --git a/Build/source/texk/kpathsea/xmalloc.c b/Build/source/texk/kpathsea/xmalloc.c
new file mode 100644
index 00000000000..65a0d2d0ca2
--- /dev/null
+++ b/Build/source/texk/kpathsea/xmalloc.c
@@ -0,0 +1,34 @@
+/* xmalloc.c: malloc with error checking.
+
+ Copyright 1992, 1993, 2008, 2010 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+void *
+xmalloc (size_t size)
+{
+ void *new_mem = (void *)malloc(size ? size : 1);
+
+ if (new_mem == NULL) {
+ fprintf(stderr, "fatal: memory exhausted (xmalloc of %lu bytes).\n",
+ (unsigned long)size);
+ exit(EXIT_FAILURE);
+ }
+
+ return new_mem;
+}
diff --git a/Build/source/texk/kpathsea/xopendir.c b/Build/source/texk/kpathsea/xopendir.c
new file mode 100644
index 00000000000..5d425569fff
--- /dev/null
+++ b/Build/source/texk/kpathsea/xopendir.c
@@ -0,0 +1,47 @@
+/* xopendir.c: opendir and closedir with error checking.
+
+ Copyright 1992, 1993, 1994, 1995, 1996, 2008, 2010 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+#include <kpathsea/xopendir.h>
+
+
+#if !defined(WIN32) || defined(__MINGW32__)
+DIR *
+xopendir (const_string dirname)
+{
+ DIR *d = opendir(dirname);
+
+ if (d == NULL)
+ FATAL_PERROR(dirname);
+
+ return d;
+}
+
+void
+xclosedir (DIR *d)
+{
+#ifdef CLOSEDIR_VOID
+ closedir (d);
+#else
+ int ret = closedir(d);
+
+ if (ret != 0)
+ FATAL("closedir failed");
+#endif
+}
+#endif /* not WIN32 || __MINGW32__ */
diff --git a/Build/source/texk/kpathsea/xopendir.h b/Build/source/texk/kpathsea/xopendir.h
new file mode 100644
index 00000000000..b786d9a89ee
--- /dev/null
+++ b/Build/source/texk/kpathsea/xopendir.h
@@ -0,0 +1,33 @@
+/* xopendir.h: declare checked directory operations.
+
+ Copyright 1994, 1996, 2008, 2010 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#if !defined (KPATHSEA_XOPENDIR_H) && (!defined (WIN32) || defined(__MINGW32__))
+#define KPATHSEA_XOPENDIR_H
+
+#include <kpathsea/c-dir.h>
+#include <kpathsea/c-proto.h>
+#include <kpathsea/types.h>
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+/* Like opendir and closedir, but abort on error. */
+extern DIR *xopendir (const_string dirname);
+extern void xclosedir (DIR *);
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not (KPATHSEA_XOPENDIR_H or WIN32) */
diff --git a/Build/source/texk/kpathsea/xputenv.c b/Build/source/texk/kpathsea/xputenv.c
new file mode 100644
index 00000000000..4d1fb5335e0
--- /dev/null
+++ b/Build/source/texk/kpathsea/xputenv.c
@@ -0,0 +1,125 @@
+/* xputenv.c: set an environment variable without return. */
+
+/* Copyright 1993-98, 2008, 2009 Karl Berry.
+ Copyright 2003-05 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+
+#include <kpathsea/config.h>
+#include <kpathsea/types.h>
+
+#ifdef WIN32
+#include <stdlib.h>
+#else
+#if !HAVE_DECL_PUTENV
+extern int putenv (char* entry);
+#endif
+#endif /* not WIN32 */
+
+/*
+ * We have different arguments from the "standard" function. A separate
+ * var and value tends to be much more practical.
+ *
+ * The standards for putenv are clear: put the passed string into the
+ * environment, and if you alter that string, the environment changes.
+ * Of course various implementations are broken in a number of ways,
+ * which include making copies of the passed string, and more.
+ */
+void
+kpathsea_xputenv(kpathsea kpse, const char *var, const char *value)
+{
+ char *cur_item;
+ char *old_item;
+ char *new_item;
+ size_t var_lim;
+ int cur_loc;
+
+ /* kpse_debug2(KPSE_DEBUG_VARS, "kpse_putenv($%s,%s)", var, value); */
+
+ old_item = NULL;
+ cur_item = concat3(var, "=", value);
+ /* Include '=' in length. */
+ var_lim = strlen(var) + 1;
+
+ /* Have we stored something for this value already? */
+ for (cur_loc = 0; cur_loc != kpse->saved_count; ++cur_loc) {
+ if (strncmp(kpse->saved_env[cur_loc], cur_item, var_lim) == 0) {
+ /* Get the old value. We need this is case another part
+ * of the program didn't use us to change the environment.
+ */
+ old_item = getenv(var);
+ break;
+ }
+ }
+
+ if (old_item && strcmp(old_item, cur_item+var_lim) == 0) {
+ /* Set same value as is in environment, don't bother to set. */
+ free(cur_item);
+ return;
+ } else {
+ /* We set a different value. */
+ if (putenv(cur_item) < 0)
+ LIB_FATAL1("putenv(%s)", cur_item);
+ /* Get the new string. */
+ new_item = getenv(var);
+ if (new_item != cur_item+var_lim) {
+ /* Our new string isn't used, don't keep it around. */
+ free(cur_item);
+ return;
+ }
+ }
+
+ /* If we get here, it means getenv() returned a reference to cur_item.
+ So we save cur_item, and free the old string we also owned. */
+ if (cur_loc == kpse->saved_count) {
+ /* No old string. */
+ kpse->saved_count++;
+ XRETALLOC(kpse->saved_env, kpse->saved_count, char *);
+ } else {
+ /* We owned the old string. */
+ free(kpse->saved_env[cur_loc]);
+ }
+ kpse->saved_env[cur_loc] = cur_item;
+
+ return;
+}
+
+/* A special case for setting a variable to a numeric value
+ (specifically, KPATHSEA_DPI). We don't need to dynamically allocate
+ and free the string for the number, since it's saved as part of the
+ environment value. */
+
+void
+kpathsea_xputenv_int (kpathsea kpse, const_string var_name, int num)
+{
+ char str[MAX_INT_LENGTH];
+ sprintf (str, "%d", num);
+
+ kpathsea_xputenv (kpse, var_name, str);
+}
+
+#if defined (KPSE_COMPAT_API)
+void
+xputenv (const char *var, const char *value)
+{
+ kpathsea_xputenv (kpse_def, var, value);
+}
+
+void
+xputenv_int (const_string var_name, int num)
+{
+ kpathsea_xputenv_int(kpse_def, var_name, num);
+}
+#endif
diff --git a/Build/source/texk/kpathsea/xrealloc.c b/Build/source/texk/kpathsea/xrealloc.c
new file mode 100644
index 00000000000..e56668368b4
--- /dev/null
+++ b/Build/source/texk/kpathsea/xrealloc.c
@@ -0,0 +1,43 @@
+/* xrealloc.c: realloc with error checking.
+
+ Copyright 1992, 1993, 2008, 2010, 2013 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+void *
+xrealloc (void *old_ptr, size_t size)
+{
+ void *new_mem;
+
+ if (old_ptr == NULL) {
+ new_mem = xmalloc(size);
+ } else {
+ new_mem = (void *)realloc(old_ptr, size ? size : 1);
+ if (new_mem == NULL) {
+ /* We used to print OLD_PTR here using %x, and casting its
+ value to unsigned, but that lost on the Alpha, where
+ pointers and unsigned had different sizes. Since the info
+ is of little or no value anyway, just don't print it. */
+ fprintf(stderr,
+ "fatal: memory exhausted (realloc of %lu bytes).\n",
+ (unsigned long)size);
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ return new_mem;
+}
diff --git a/Build/source/texk/kpathsea/xstat.c b/Build/source/texk/kpathsea/xstat.c
new file mode 100644
index 00000000000..226ca62e983
--- /dev/null
+++ b/Build/source/texk/kpathsea/xstat.c
@@ -0,0 +1,54 @@
+/* xstat.c: stat and (maybe) lstat with error checking.
+
+ Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+#include <kpathsea/xstat.h>
+
+
+struct stat
+xstat (const_string path)
+{
+ struct stat s;
+
+ if (stat(path, &s) != 0)
+ FATAL_PERROR(path);
+
+ return s;
+}
+
+
+/* If we don't have symbolic links, lstat is the same as stat, and
+ a #define is made in the include file. */
+
+#ifdef S_ISLNK
+/*
+// We declared lstat to prevent a warning during development. This
+// turns out to be more trouble than it is worth.
+// extern int lstat ();
+*/
+struct stat
+xlstat (const_string path)
+{
+ struct stat s;
+
+ if (lstat(path, &s) != 0)
+ FATAL_PERROR(path);
+ return s;
+}
+#endif
diff --git a/Build/source/texk/kpathsea/xstat.h b/Build/source/texk/kpathsea/xstat.h
new file mode 100644
index 00000000000..59347bafdb9
--- /dev/null
+++ b/Build/source/texk/kpathsea/xstat.h
@@ -0,0 +1,45 @@
+/* xstat.h: stat with error checking.
+
+ Copyright 1992, 1993, 1994, 2008, 2010, 2011 Karl Berry.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#ifndef KPATHSEA_XSTAT_H
+#define KPATHSEA_XSTAT_H
+
+#ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
+
+#include <kpathsea/c-proto.h>
+#include <kpathsea/c-stat.h>
+#include <kpathsea/types.h>
+
+/* Two files are indistinguishable if they are on the same device
+ and have the same inode. This checks two stat buffers for that. Cf.
+ the `same_file_p' routine in file-p.c, declared in kpathlib.h. */
+#define SAME_FILE_P(s1, s2) \
+ ((s1).st_ino == (s2).st_ino && (s1).st_dev == (s2).st_dev)
+
+/* Does stat(2) on PATH, and aborts if the stat fails. */
+extern struct stat xstat (const_string path);
+
+/* Ditto, for lstat(2) (except that lstat might not exist). */
+#ifdef S_ISLNK
+extern struct stat xlstat (const_string path);
+#else
+#define xlstat xstat
+#endif
+
+#endif /* MAKE_KPSE_DLL */
+
+#endif /* not KPATHSEA_XSTAT_H */
diff --git a/Build/source/texk/kpathsea/xstrdup.c b/Build/source/texk/kpathsea/xstrdup.c
new file mode 100644
index 00000000000..738421874e8
--- /dev/null
+++ b/Build/source/texk/kpathsea/xstrdup.c
@@ -0,0 +1,29 @@
+/* xstrdup.c: strdup with error checking.
+
+ Copyright 1992, 1993, 2008 Karl Berry.
+ Copyright 2005 Olaf Weber.
+
+ 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.1 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, see <http://www.gnu.org/licenses/>. */
+
+#include <kpathsea/config.h>
+
+
+/* Return a copy of S in new storage. */
+
+string
+xstrdup (const_string s)
+{
+ string new_string = (string)xmalloc(strlen (s) + 1);
+ return strcpy(new_string, s);
+}