Mercurial > hg > octave-lojdl
changeset 3172:1f0b06020e36
[project @ 1998-04-24 04:24:34 by jwe]
line wrap: on
line diff
deleted file mode 100644 --- a/kpathsea/.gdbinit +++ /dev/null @@ -1,5 +0,0 @@ -directory /w/kpathsea - -define redo -file kpsewhich -end
--- a/kpathsea/BUGS +++ b/kpathsea/BUGS @@ -10,6 +10,7 @@ Slow path searching Unable to generate fonts TeX or Metafont failing + Empty Makefiles `XtStrings' `dlopen' `ShellWidgetClass' @@ -151,9 +152,9 @@ program-specific debugging options as well. You can also set the environment variable `KPATHSEA_DEBUG'; in this -case, you should use the numbers below. Also, if you run the program -under a debugger and set the variable `kpathsea_debug', Also use the -numbers below +case, you should use the numbers below. If you run the program under a +debugger and set the variable `kpathsea_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 @@ -215,6 +216,28 @@ 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 @@ -297,14 +320,13 @@ directory to be searched for subdirectories if you didn't want it to be. - * If the fonts (or whatever) don't already exist, `MakeTeXPK' (or - `MakeTeXMF' or `MakeTeXTFM') 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 - `MakeTeXPK'; the workaround is to generate the necessary fonts by - hand with Metafont, or to grab them from a CTAN site (*note - unixtex.ftp::.). + * 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::. @@ -338,16 +360,16 @@ Unable to generate fonts ........................ - This can happen if either `MakeTeXPK' hasn't been installed properly, + This can happen if either `mktexpk' hasn't been installed properly, or if the local installation of Metafont isn't correct. - If `mf' is a command not found by `MakeTeXPK', then you need to -install Metafont (*note unixtex.ftp::.). + If `mf' is a command not found by `mktexpk', then you need to install +Metafont (*note unixtex.ftp::.). If Metafont runs, but generates fonts at the wrong resolution, you need to be sure the `M' and `D' lines in your Dvips configuration file match (*note Config files: (dvips)Config files.). For example, if -`MakeTeXPK' is generating 300dpi fonts, but you need 600dpi fonts, you +`mktexpk' is generating 300dpi fonts, but you need 600dpi fonts, you should have: M ljfour D 600 @@ -386,8 +408,8 @@ 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; *note Bugs: -(gcc)Bugs.. +also recommend reporting a bug to the GCC mailing list; see *Note Bugs: +(gcc)Bugs. To report compiler bugs effectively requires perseverance and perspicacity: you must find the miscompiled line, and that usually @@ -395,6 +417,43 @@ through TeX's (or whatever program's) data structures. Things are not helped by all-too-common bugs in the debugger itself. Good luck. + One known cause of trouble is the way arrays are handled. Some of the +Pascal arrays have a lower index other than 0, and the C code will take +the pointer to the allocated memory, subtract the lower index, and use +the resulting pointer for the array. While this trick often works, ANSI +C doesn't guarantee that it will. It it known to fail on HP-UX 10 +mchines when the native compiler is used, unless the `+u' compiler +switch was specified. Using GCC will work on this platform as well. + +Empty Makefiles +............... + + On some systems (NetBSD, FreeBSD, AIX 4.1, and Mach10), `configure' +may fail to properly create the Makefiles. Instead, you get an error +which looks something like this: + + prompt$ ./configure + ... + creating Makefile + sed: 1: "\\@^ac_include make/pat ...": \ can not be used as a string delimiter + + So far as I know, the bug here is in `/bin/sh' on these systems. I +don't have access to a machine running any of them, so if someone can +find a workaround that avoids the quoting bug, I'd be most grateful. +(Search for `ac_include' in the `configure' script to get to the +problematic code.) + + It should work to run `bash configure', instead of using `/bin/sh'. +You can get Bash from `ftp://prep.ai.mit.edu/pub/gnu' and mirrors. + + Another possible cause (reported for NeXT) is a bug in the `sed' +command. In that case the error may look like this: + + Unrecognized command: \@^ac_include make/paths.make@r make/paths.make + + In this case, installing GNU `sed' should solve the problem. You can +get GNU `sed' from the same places as Bash. + `XtStrings' ........... @@ -453,8 +512,8 @@ * Statically link the `Xmu' library into the executable. - * Avoid using `Xmu' at all. If you are compiling Metafont, *note - Online Metafont graphics: (web2c)Online Metafont graphics.. If you + * Avoid using `Xmu' at all. If you are compiling Metafont, see *Note + Online Metafont graphics: (web2c)Online Metafont graphics. If you are compiling Xdvi, see the `-DNOTOOL' option in `xdvik/INSTALL'. * Ignore the errors. The binary runs fine regardless.
deleted file mode 100644 --- a/kpathsea/CONFIGURE.kpathsea +++ /dev/null @@ -1,193 +0,0 @@ -Contents: - - Basic Installation - Compilers and Options - Compiling For Multiple Architectures - Installation Names - Optional Features - Specifying the System Type - Sharing Defaults - Operation Controls - - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. -
--- a/kpathsea/ChangeLog +++ b/kpathsea/ChangeLog @@ -1,31 +1,1179 @@ -Sun Jan 25 02:28:04 1998 John W. Eaton <jwe@bevo.che.wisc.edu> - - * Makefile.in (install, uninstall): For use with Octave, do nothing. - -Thu Jun 5 12:38:35 1997 John W. Eaton <jwe@bevo.che.wisc.edu> - - * acklibtool.m4: For use with Octave, ignore --enable-static and - --enable-shared and only build static libraries. - -Wed Jun 4 12:14:38 1997 John W. Eaton <jwe@bevo.che.wisc.edu> - - * progname.c (selfdir): Handle dir/exename case here. - Patch from Karl Berry <karl@cs.umb.edu>. - -Tue Jun 3 23:48:22 1997 John W. Eaton <jwe@bevo.che.wisc.edu> - - * common.ac: (program_invocation_name): AC_TRY_LINK only requires - function body. Add declaration for program_invocation_name so gcc - won't complain about undeclared variable. - -Thu May 22 22:04:26 1997 John W. Eaton <jwe@bevo.che.wisc.edu> - - * Makefile.in: Look in make instead of ../make for files to include. - Do ac_includes by hand, since ac_include requires an extension to - autoconf that doesn't seem to be distributed with kpathsea (yet). - ($(kpathsea)): Add a rule to `install' libkpathsea.a locally so - Octave will have something to link to. - (hash.lo): Don't optimize. +Thu Apr 23 15:08:40 1998 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pathsearch.c: Avoid memory leak. + +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 the 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 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>
--- a/kpathsea/HIER +++ b/kpathsea/HIER @@ -13,7 +13,8 @@ paths::.). One common desire is to put everything (binaries and all) under a single top-level directory such as `/usr/local/texmf' or `/opt/texmf'--in the terms used below, make PREFIX and TEXMF the same. -For specific instructions on doing that, *note configure scenarios::.. +For specific instructions on doing that, see *Note configure +scenarios::. Here is a skeleton of the default directory structure, extracted from the TDS document:
--- a/kpathsea/INSTALL +++ b/kpathsea/INSTALL @@ -18,10 +18,10 @@ Installing files Cleaning up Filename database generation - `MakeTeX' scripts - `MakeTeX' configuration - `MakeTeX' script names - `MakeTeX' script arguments + `mktex' scripts + `mktex' configuration + `mktex' script names + `mktex' script arguments Installation testing Security @@ -30,21 +30,25 @@ ************ The procedure for Kpathsea (and Web2c, etc.) configuration and -installation follows. If trouble, *note Common problems::., a copy of -which is in the file `kpathsea/BUGS'. +installation follows. If you encounter trouble, see *Note Common +problems::, a copy of which is in the file `kpathsea/BUGS'. Simple installation =================== Installing TeX and friends for the first time can be a daunting experience. Thus, you may prefer to skip this whole thing and just get -precompiled executables: *note unixtex.ftp::.. +precompiled executables: see *Note unixtex.ftp::. This section explains what to do if you wish to take the defaults for -everything (installing under `/usr/local'), and generally to install in -the simplest possible way. Most steps here refer to corresponding -subsection in the next section which explains how to override defaults -and generally gives more details. +everything, and generally to install in the simplest possible way. Most +steps here refer to corresponding subsection in the next section which +explains how to override defaults and generally gives more details. + + By default everything will be installed under `/usr/local' and the +following discussion assumes this. However, if you already have TeX +installed, its location is used to derive the directory under which +everything is to be installed. 1. Be sure you have enough disk space: approximately 8 megabytes for the compressed archives, 15MB for sources, 45MB for compilation, @@ -66,10 +70,15 @@ distribution files. *Note Changing search paths::. 4. At the top level of the distribution, run `sh configure'. (If you - have the GNU Bash shell installed, run `bash configure'.) *Note + have the GNU Bash shell installed, run `bash configure'.) *Note Running configure::. - 5. `make'. *Note Running make::. + 5. `make'. *Note Running make::. If you are using a BSD 4.4 system + such as FreeBSD or NetBSD, use GNU make (often installed in + `/usr/local/bin'), not the BSD make. + + If you are using a HP-UX 10 system and the native compiler, + specify the `+u' flag in `XCFLAGS'. 6. `make install'. *Note Installing files::. @@ -77,31 +86,33 @@ 8. Set up a cron job to rebuild the filename database that makes searching faster. This line will rebuild it every midnight: - 0 0 * * * cd /usr/local/share/texmf && /BINDIR/MakeTeXls-R + 0 0 * * * cd /usr/local/share/texmf && /BINDIR/mktexlsr *Note Filename database generation::, and *Note Filename database::. 9. If you're installing Dvips, you also need to set up configuration files for your printers and make any additional PostScript fonts available. *Note Installation: (dvips)Installation. If you have - any color printers, *note Color device configuration: (dvips)Color - device configuration.. + any color printers, see *Note Color device configuration: + (dvips)Color device configuration. 10. The first time you run a DVI driver, a bunch of PK fonts will be - built by Metafont via `MakeTeXPK' (and added to the filename + built by Metafont via `mktexpk' (and added to the filename database). This will take some time. Don't be alarmed; they will created only this first time (unless something is wrong with your path definitions). - By default, `MakeTeXPK' assumes `/usr/local/share/texmf/fonts' is - globally writable. If you need a different arrangement, *note - MakeTeX configuration::.. + By default, `mktexpk' will create these fonts in a hierarchy under + `/var/tmp/texfonts'; it simply assumes that `/var/tmp' exists and + is globally writable. If you need a different arrangement, see + *Note mktex configuration::. - *Note MakeTeX scripts::. + *Note mktex scripts::. - 11. For some simple tests, try `tex story \\bye' and `latex simple'. - Then run `xdvi story' or `dvips simple' on the resulting DVI files - to preview/print the documents. *Note Installation testing::. + 11. For some simple tests, try `tex story \\bye' and `latex sample2e'. + Then run `xdvi story' or `dvips sample2e' on the resulting DVI + files to preview/print the documents. *Note Installation + testing::. Custom installation =================== @@ -135,6 +146,7 @@ don't enter into it. Sizes are in megabytes. All numbers are approximate. +Distribution .tar.gz Unpacked Compiled Installed dviljk .9 3.8 dvipsk .9 3.2 xdvik .7 2.5 @@ -177,21 +189,20 @@ If the search paths for your installation differ from the standard TeX directory structure (*note Introduction: (tds)Top.), edit the file -`kpathsea/texmf.cnf.in' as desired, before running `configure'. For +`kpathsea/texmf.in' as desired, before running `configure'. For example, if you have all your fonts or macros in one big directory. - You may also wish to edit the file `MakeTeXnames.cnf', either before -or after installation, to control various aspects of `MakeTeXPK' and -friends. *Note MakeTeX configuration::. + You may also wish to edit the file `mktex.cnf', either before or +after installation, to control various aspects of `mktexpk' and +friends. *Note mktex configuration::. - You do not need to edit `texmf.cnf.in' to change the default -top-level or other installation *directories* (only the paths). You -can and should do that when you run `configure' (next step). + You do not need to edit `texmf.in' to change the default top-level or +other installation *directories* (only the paths). You can and should +do that when you run `configure' (next step). - You also do not need to edit `texmf.cnf.in' if you are willing to -rely on `texmf.cnf' at runtime to define the paths, and let the -compile-time default paths be incorrect. Usually there is no harm in -doing this. + You also do not need to edit `texmf.in' if you are willing to rely on +`texmf.cnf' at runtime to define the paths, and let the compile-time +default paths be incorrect. Usually there is no harm in doing this. The section below explains default generation in more detail. @@ -202,7 +213,7 @@ above is to avoid having the same information in more than one place. If you change the installation directories or top-level prefix at `configure'-time, those changes will propagate through the whole -sequence. And if you change the default paths in `texmf.cnf.in', those +sequence. And if you change the default paths in `texmf.in', those changes are propagated to the compile-time defaults. The Make definitions are all repeated in several Makefile's; but @@ -226,12 +237,11 @@ you arranged things that way because your site has only one printer, for example) or if the program is mode-independent (e.g., `pktype'). - To make the paths independent of the mode, simply edit `texmf.cnf.in' + To make the paths independent of the mode, simply edit `texmf.in' before installation, or the installed `texmf.cnf', and remove the `$MAKETEX_MODE'. - *Note MakeTeX script arguments::, for how this interacts with -`MakeTeXPK'. + *Note mktex script arguments::, for how this interacts with `mktexpk'. *Note TeX directory structure: TeX directory structure, for a description of the default arrangement of the input files that comprise @@ -257,7 +267,7 @@ the installation directories. 3. `texmf.sed' (together with a little extra magic--see - `kpathsea/Makefile') is applied to `texmf.cnf.in' to generate + `kpathsea/Makefile') is applied to `texmf.in' to generate `texmf.cnf'. This is the file that will eventually be installed and used. @@ -278,14 +288,14 @@ `configure' adapts the source distribution to the present system via `#define''s in `*/c-auto.h', which are created from the corresponding -`c-auto.h.in'. It also creates a `Makefile' from the corresponding +`c-auto.in'. It also creates a `Makefile' from the corresponding `Makefile.in', doing `@VAR@' and `ac_include' substitutions). `configure' is the best place to control the configuration, compilation, and installed location of the software, either via command-line options, or by setting environment variables before -invoking it. For example, you can disable `MakeTeXPK' by default with -the option `--disable-maketexpk'. *Note configure options::. +invoking it. For example, you can disable `mktexpk' by default with +the option `--disable-mktexpk'. *Note configure options::. `configure' shells .................. @@ -312,23 +322,23 @@ ................... For a complete list of all `configure' options, run `configure ---help' or *note Running `configure' scripts: (autoconf)Invoking -configure. (a copy is in the file `kpathsea/CONFIGURE'). The generic -options are listed first in the `--help' output, and the +--help' or see *Note Running `configure' scripts: (autoconf)Invoking +configure, (a copy is in the file `kpathsea/README.CONFIGURE'). The +generic options are listed first in the `--help' output, and the package-specific options come last. The environment variables `configure' pays attention to are listed below. Options particularly likely to be useful are `--prefix', `--datadir', -and the like; *note configure scenarios::.. +and the like; see *Note configure scenarios::. This section gives pointers to descriptions of the `--with' and `--enable' options to `configure' that Kpathsea-using programs accept. -`--without-maketexmf-default' -`--without-maketexpk-default' -`--without-maketextfm-default' -`--with-maketextex-default' - Enable or disable the dynamic generation programs. *Note MakeTeX +`--without-mktexmf-default' +`--without-mktexpk-default' +`--without-mktextfm-default' +`--with-mktextex-default' + Enable or disable the dynamic generation programs. *Note mktex configuration::. `--enable-shared' @@ -336,7 +346,13 @@ build the usual static library. *Note Shared library::. `--disable-static' - Build only the shared library. + Build only the shared library. Implies `--enable-shared'. + +`--enable-maintainer-mode' + Enables make targets that are useful for the maintainer and likely + to be a pain for anyone else; the makefiles created when this + option is enabled may not work at all for you. You have been + warned. `configure' environment ....................... @@ -391,10 +407,10 @@ configure --with-x-toolkit * Putting the binaries, TeX files, GNU info files, etc. into a single - TeX hierarchy, say TEXMF, requires overriding defaults in both + TeX hierarchy, say `/texmf', requires overriding defaults in both `configure' and `make': - configure --prefix=TEXMF --datadir=TEXMF - make texmf=TEXMF + configure --prefix=`/texmf' --datadir=`/texmf' + make texmf=`/texmf' * You can compile on multiple architectures simultaneously either by building symbolic link trees with the `lndir' script from the X11 @@ -430,15 +446,16 @@ individual users do not need to set their system's environment variable (e.g., `LD_LIBRARY_PATH') to find shared libraries. If you want to do this, you will need to add the necessary options to `LDFLAGS' yourself; -for example, on Solaris, include something like `-R${prefix}/lib'. -(Unfortunately, making this happen by default is very difficult, -because of interactions with an existing installed shared library.) +for example, on Solaris, include something like `-R${prefix}/lib', on +IRIX or Linux, use `-rpath${prefix}/lib'. (Unfortunately, making this +happen by default is very difficult, because of interactions with an +existing installed shared library.) - Currently, shared library support is implemented only on SunOS 4 -(Solaris 1) and SunOS 5 (Solaris 2). If you're interested and willing -in adding support for other systems, please see the `configure' mode in -the `klibtool' script, especially the host-specific case statement -around line 250. + Currently, shared library support is implemented only on Linux, SunOS +4 (Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're +interested and willing in adding support for other systems, please see +the `configure' mode in the `klibtool' script, especially the +host-specific case statement around line 250. Running `make' -------------- @@ -541,7 +558,7 @@ Alternatively, * `make mostlyclean' if you intend to compile on another - architecture. For Web2c, since the generated C files are portable, + architecture. For Web2C, since the generated C files are portable, they are not removed. If the `lex' vs. `flex' situation is going to be different on the next machine, `rm web2c/lex.yy.c'. @@ -562,21 +579,21 @@ You will probably want to set up a `cron' entry on the appropriate machine(s) to rebuild the filename database nightly or so, as in: - 0 0 * * * cd TEXMF && /BINDIR/MakeTeXls-R + 0 0 * * * cd TEXMF && /BINDIR/mktexlsr *Note Filename database::. -Although the `MakeTeX...' scripts make every effort to add -newly-created files on the fly, it can't hurt to make sure you get a -fresh version every so often. +Although the `mktex...' scripts make every effort to add newly-created +files on the fly, it can't hurt to make sure you get a fresh version +every so often. -`MakeTeX' scripts ------------------ +`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 MakeTeX configuration::.). This is most useful for +dynamically (*note mktex configuration::.). This is most useful for fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as -the Sauter and DC fonts), since any given document can use fonts never +the Sauter and EC fonts), since any given document can use fonts never before referenced. Trying to build all fonts in advance is therefore impractical, if not impossible. @@ -585,102 +602,136 @@ file it created (and nothing else) to standard output; it can write diagnostics to standard error. -`MakeTeX' configuration -....................... +`mktex' configuration +..................... The following file types can run an external program to create missing -files: `pk', `tfm', `mf', `tex'; the scripts are named `MakeTeXPK', -`MakeTeXTFM', `MakeTeXMF', and `MakeTeXTeX'. +files: `pk', `tfm', `mf', `tex'; the scripts are named `mktexpk', +`mktextfm', `mktexmf', and `mktextex'. In the absence of `configure' options specifying otherwise, -everything but `MakeTeXTeX' will be enabled by default. The `configure' +everything but `mktextex' will be enabled by default. The `configure' options to change the defaults are: - --without-maketexmf-default - --without-maketexpk-default - --without-maketextfm-default - --with-maketextex-default + --without-mktexmf-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., `MAKETEXPK' -(*note MakeTeX script arguments::.). +configuration file value named for the script is set; e.g., `MKTEXPK' +(*note mktex script arguments::.). - As distributed, all the scripts source a file -`texmf/web2c/MakeTeX.site' if it exists, so you can override various -defaults. See `MakeTeXcommon', for instance, which defines the default -mode, resolution, directory permissions, some special directory names, -etc. If you prefer not to change the distributed scripts, you can -simply create `MakeTeX.site' with the appropriate definitions (you do -not need to create it if you have nothing to put in it). -`MakeTeX.site' has no special syntax; it's an arbitrary Bourne shell -script. The distribution contains a sample `MakeTeX.site' for you to -copy and modify as you please (it is not installed anywhere). + 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 `MakeTeX.site', as just mentioned; + * in `mktex.opt', as just mentioned; - * by editing the file `MakeTeXnames.cnf', either before `make - install' (in the source hierarchy) or after (in the installed - hierarchy); + * by editing the file `mktex.opt', either before `make install' (in + the source hierarchy) or after (in the installed hierarchy); * or in the environment. - By default, `MakeTeXPK' installs fonts into the standard TeX -directory structure (*note TeX directory structure: TeX directory -structure.). It uses aliases and directory names from the Fontname -distribution (*note Introduction: (fontname)Top.). Most of the options -here change that. + 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 `MakeTeXmkdir' to create directories append-only, i.e., set - their sticky bit (*note Mode Structure: (fileutils)Mode - Structure.). + Tell `mktexdir' to create directories append-only, i.e., set their + sticky bit (*note Mode Structure: (fileutils)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.). `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. + Omit the font supplier and typeface name directory levels. This + feature is deprecated in favour of `stripsupplier' and + `striptypeface'. `varfonts' - Put `MakeTeXPK'-generated fonts under the directory named by - `VARTEXFONTS'; the default value in `kpathsea/texmf.cnf.in' is - `/var/tex/fonts', as recommended by the `Linux File System - Standard' (but unless `varfonts' is enabled, nothing cares about - that value). + 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. -`MakeTeX' script names -...................... +`mktex' script names +.................... The following table shows the default name of the script for each possible file types. (The source is the variable `kpse_make_specs' in `kpathsea/tex-make.c'.) -`MakeTeXPK' +`mktexpk' Glyph fonts. -`MakeTeXTeX' +`mktextex' TeX input files. -`MakeTeXMF' +`mktexmf' Metafont input files. -`MakeTeXTFM' +`mktextfm' TFM files. These names are overridden by an environment variable specific to the program--for example, `DVIPSMAKEPK' for Dvipsk. - If a `MakeTeX...' script fails, the invocation is appended to a file + 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. @@ -690,59 +741,40 @@ Otherwise, nothing is written. The name `missfont.log' is overridden by the `MISSFONT_LOG' environment variable or configuration file value. -`MakeTeX' script arguments -.......................... +`mktex' script arguments +........................ - The first argument to a `MakeTeX' script is always the name of the -file to be created. - - In the default `MakeTeXPK' implementation, from three to five -additional arguments may also passed, via environment variables: - - 1. The resolution to make the font at (`KPATHSEA_DPI'). + The first argument to a `mktex' script is always the name of the file +to be created. - 2. The "base dpi" the program is operating at (`MAKETEX_BASE_DPI'), - i.e., the assumed resolution of the output device. + In the default `mktexpk' implementation, additional arguments may +also be passed: - 3. A "magstep" string suitable for the Metafont `mag' variable - (`MAKETEX_MAG'). - - 4. Optionally, a Metafont mode name to assign to the Metafont `mode' - variable (`MAKETEX_MODE'). Otherwise, (the default) `MakeTeXPK' - guesses the mode from the resolution. *Note TeX directory - structure: TeX directory structure. +`--dpi NUM' + Sets the resolution of the generated font to NUM. - 5. Optionally, 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 (from environment variables `DESTDIR' - or `MTP_DESTDIR' or a compile-time default). If this argument is - not supplied, the mode name is appended to the root destination - directory. +`--mfmode NAME' + Sets the Metafont mode to NAME. -Kpathsea sets `KPATHSEA_DPI' appropriately for each attempt at building -a font. It's up to the program using Kpathsea to set the others. -(*Note Calling sequence::.) +`--bdpi NUM' + Sets the the "base dpi" for the font. This must match the mode + being used. - You can change the specification for the arguments passed to the -external script by setting the environment variable named as the script -name, but all capitals--`MAKETEXPK', for example. If you've changed -the script name by setting (say) `DVIPSMAKEPK' to `foo', then the spec -is taken from the environment variable `FOO'. +`--mag STRING' + A "magstep" string suitable for the Metafont `mag' variable. This + must match the combination of BDPI and DPI being used. - The spec can contain any variable references, to the above variables -or any others. As an example, the default spec for `MakeTeXPK' is: - $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE - -The convention of passing the name of the file to be created as the -first argument cannot be changed. +`--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. Installation testing -------------------- Besides the tests listed in *Note Simple installation::, you can try running `make check'. This includes the torture tests (trip, trap, and -mptrap) that come with Web2c (*note Torture tests: (web2c)Torture -tests.). +mptrap) that come with Web2c (*note Triptrap: (web2c)Triptrap.). Security ======== @@ -764,27 +796,35 @@ invocation: (web2c)tex invocation, respectively. Another security issue arises because it's very useful--almost -necessary--to make arbitrary fonts on user demand with `MakeTeXPK' and +necessary--to make arbitrary fonts on user demand with `mktexpk' and friends. Where do these files get installed? By default, the -`MakeTeXPK' distributed with Kpathsea assumes a globally writable -`texmf' tree; this is the simplest and most convenient approach, but it -may not suit your situation. +`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 -`MakeTeXnames.cnf'. *Note MakeTeX configuration::. +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 -`MakeTeXPK' et al. setgid to that group (or setuid to that user). Then +`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.) - Finally, using a central writable `texmf' tree may be completely -impossible, because it's on an NFS filesystem that you cannot export -read/write, or AFS is in use, or simply because "it's policy". Then -you must resort to each user's machine having its own local directory of -dynamically-created fonts; again, `MakeTeXnames.cnf' has an option to -do this, and again, *note MakeTeX configuration::.. + 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. +
deleted file mode 100644 --- a/kpathsea/MakeTeX.site +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# example MakeTeX.site. This file is not installed. -# $Id: MakeTeX.site,v 1.1 1997-05-23 03:02:10 jwe Exp $ -# -# The distributed MakeTeX* scripts source this file from /.../texmf/web2c, -# if it exists. You can put anything you like here; it's an arbitrary -# Bourne shell script. -# -# But the distributed scripts already support a number of features, -# which you can enable here, if you prefer not to change the distribution. -# -# For example, MakeTeXcommon sets the default umask, Metafont mode, -# resolution, directory permissions, location of the DC, TS, and Sauter -# fonts (which MakeTeXMF needs, since those fonts can be generated at -# any point size). You can override those defaults with commands here: -# -#umask 002 -#MODE=ljfour -#MT_DIR_PERMS=775 # must be three octal digits -#MT_FILE_PERMS=664 -#ps_to_pk=gsftopk -#ecfontdir="$TEXMFMAIN/fonts/source/jknappen/ec" -#fcfontdir="$TEXMFMAIN/fonts/source/jknappen/fc" -#tcfontdir="$TEXMFMAIN/fonts/source/jknappen/tc" -#tsfontdir="$TEXMFMAIN/fonts/source/jknappen/ts" -#sauterfontdir="$TEXMFMAIN/fonts/source/public/sauter" - -# Also, MakeTeXnames.cnf defines ways to control where generated files -# are placed. You can enable those by setting MT_FEATURES, e.g.: -#MT_FEATURES="appendonlydir varfonts" - - -# This script (MakeTeX.site) is also sourced *after* MakeTeXnames.cnf is -# run, so you can override what it did if you like.
deleted file mode 100755 --- a/kpathsea/MakeTeXMF +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -# original MakeTeXMF -- make a new MF file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. - -version='$Id: MakeTeXMF,v 1.1 1997-05-23 03:02:10 jwe Exp $' -usage="Usage: $0 FONT. - Makes the Metafont source file for FONT, if possible. - For example, \`ecr12' or \`cmr11'." - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -# See comments in MakeTeXPK. -( -name="`basename $1 .mf`" -rootname=`echo "$name" | sed 's/[0-9]*$//'` -pointsize=`echo "$name" | sed "s/^$rootname//"` - -case "$name" in - dc*) fontdir=$dcfontdir;; - ec*) fontdir=$ecfontdir;; - fc*) fontdir=$fcfontdir;; - tc*) fontdir=$tcfontdir;; - ts*) fontdir=$tsfontdir;; - *) fontdir=$sauterfontdir; test -r $fontdir/b-$rootname.mf || exit 1;; -esac -cd $fontdir 2>/dev/null || exit 1 - -case "$pointsize" in - "") echo "$0: No pointsize." >&2; exit 1;; - 11) realsize=10.95444;; # \magstephalf - 14) realsize=14.4;; # \magstep2 - 17) realsize=17.28;; # \magstep3 - 20) realsize=20.74;; # \magstep4 - 25) realsize=24.88;; # \magstep5 - # 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 ignoring the - # last two digits. -????) realsize=`echo "$pointsize" | sed 's/\(..\)/\1./'`;; - *) realsize="$pointsize";; -esac - -mfname="$name.mf" -if test -r "$mfname"; then - echo "$0: $fontdir/$mfname already exists." - echo $fontdir/$mfname >$STDOUT - $TEXMFCNF_DIR/MakeTeXupdate "$fontdir" "$mfname" - exit 0 -fi - -base= -case "$name" in - dc*) base=dxbase;; - ec*|tc*) base=exbase;; - *) cat >"$mfname.tmp$$" <<END-OF-SAUTER -design_size := $realsize; -input b-$rootname; -END-OF-SAUTER - ;; -esac - -test -n "$base" && - echo "if unknown $base: input $base fi;" >"$mfname.tmp$$" - -cat >>"$mfname.tmp$$" <<END -gensize := $realsize; -generate $rootname; -END - -chmod $MT_FILE_PERMS "$mfname.tmp$$" -rm -f "$mfname" -mv "$mfname.tmp$$" "$mfname" - -echo "$fontdir/$mfname" >$STDOUT -$TEXMFCNF_DIR/MakeTeXupdate "$fontdir" "$mfname" -exit 0 -) 1>&2 </dev/null
deleted file mode 100755 --- a/kpathsea/MakeTeXPK +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# original MakeTeXPK -- make a new PK font, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. - -version='$Id: MakeTeXPK,v 1.1 1997-05-23 03:02:10 jwe Exp $' -usage="Usage: $0 NAME DPI BDPI MAG [MODE [DESTDIR]]. - Try to create a PK file for NAME at resolution DPI, - with an assumed device base resolution of BDPI, - and a Metafont \`mag' of MAG. - Use MODE for the Metafont mode if supplied, unless MODE is \`default', in - which case guess as usual. (This is so you can specify DESTDIR without MODE.) - Use DESTDIR for the root of where to install into, either the absolute - directory name to use (if it starts with a /) or relative to the default - DESTDIR (if not)." -mt_min_args=4 -mt_max_args=6 - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -# Since we want to pass the generated filename and only that filename -# back to the caller on standard output, we do some redirections so -# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. -# Then the contents of $STDOUT will be echoed to stdout by a trap. - -# start of redirection stdout -> stderr, stdin <- /dev/null -( -: ${PSMAPFILE=`kpsewhich psfonts.map`} - -NAME=$1 -DPI=$2 -BDPI=$3 -MAG=$4 -MODE=$5 -DEST=$6 - -# grep for the font in $PSMAPFILE. These are base font names, such as -# rpplr (the original) or pplr0 (an interim step) or pplr8r (current). -pattern="^r?$NAME"'(0|8r)?([ ]|$)' -psline=`egrep "$pattern" $PSMAPFILE` -if test -n "$psline"; then - MODE=modeless - # ps_to_pk set in MakeTeXcommon and/or MakeTeX.site. - cmd="$ps_to_pk $NAME $DPI" -else - # Check that $BDPI and $MODE are consistent; if not, ignore the mode and - # hope we can correctly guess it from bdpi. (People like to specify the - # resolution on the command line, not the mode so much.) - if test -n "$MODE"; then - mf_bdpi=`mf \ -'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ - </dev/null \ - | awk '/DPI=/ {print $2}'` - if test $mf_bdpi != $BDPI; then - echo "$0: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 - MODE= - fi - fi - - # If an explicit mode is not supplied, try to guess. You can get a - # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. - if test -z "$MODE" || test "$MODE" = default; then - case "$BDPI" in - 300) MODE=cx;; - 600) MODE=ljfour;; - *) echo "$0: Can't guess mode for $BDPI dpi devices." >&2 - echo "$0: Use a config file, or update me." >&2 - exit 1 - esac - fi - - # Run Metafont. Always use plain Metafont, since reading cmbase.mf - # does not noticeably slow things down. - cmd="mf \mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" -fi - -set - `$TEXMFCNF_DIR/MakeTeXnames $NAME $DPI $MODE $DEST` -PKDEST=$1 -PKDESTDIR=`echo $PKDEST | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -PKNAME=`basename $PKDEST` -GFNAME=$NAME.${DPI}gf - -if test -r $PKDESTDIR/$PKNAME; then - echo "$0: $PKDESTDIR/$PKNAME already exists." >&2 - echo $PKDESTDIR/$PKNAME >$STDOUT - $TEXMFCNF_DIR/MakeTeXupdate $PKDESTDIR $PKNAME - exit 0 -fi - -$TEXMFCNF_DIR/MakeTeXmkdir $PKDESTDIR -if test ! -d $PKDESTDIR; then - echo "$0: MakeTeXmkdir $PKDESTDIR failed." >&2 - exit 1 -fi - -echo "$0: Running $cmd" -$cmd </dev/null || { echo "$0: \`$cmd' failed." >&2; exit 1; } - -test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } -test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME -if test ! -s $PKNAME; then - echo "$0: \`$cmd' failed to make $PKNAME." >&2 - exit 1 -fi - -# Install the PK file carefully, since others may be working simultaneously. -mv $PKNAME $PKDESTDIR/pktmp.$$ || exit 1 -cd $PKDESTDIR || exit 1 -test -r $PKNAME || mv pktmp.$$ $PKNAME || exit 1 -chmod $MT_FILE_PERMS $PKNAME - -# Update ls-R if necessary. -$TEXMFCNF_DIR/MakeTeXupdate $PKDESTDIR $PKNAME - -# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk -# will think MakeTeXPK failed. Any other output to stdout will also lose. -echo $PKDESTDIR/$PKNAME >$STDOUT - -) 1>&2 </dev/null -# end of redirection stdout, stdin
deleted file mode 100755 --- a/kpathsea/MakeTeXTFM +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -# original MakeTeXTFM -- make a new TFM file, because one wasn't found. -# -# (If you change or delete the word `original' on the previous line, -# installation won't write this script over yours.) -# -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. - -version='$Id: MakeTeXTFM,v 1.1 1997-05-23 03:02:11 jwe Exp $' -usage="Usage: $0 FONT. - Makes a TFM file for FONT, if possible." - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -# See comments in MakeTeXPK. -# start of redirection stdout -> stderr, stdin <- /dev/null -( -NAME=`basename $1 .tfm` -MAG=1 -DEST=$2 -DPI=$BDPI - -set - `$TEXMFCNF_DIR/MakeTeXnames $NAME $DPI $MODE $DEST` -PKDEST=$1 -TFMDEST=$2 -PKDESTDIR=`echo $PKDEST | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -TFMDESTDIR=`echo $TFMDEST | sed 's%/[^/][^/]*$%%'` -PKNAME=`basename $PKDEST` -TFMNAME=$NAME.tfm -GFNAME=$NAME.$DPI'gf' - -if test -r $TFMDESTDIR/$TFMNAME; then - echo "$0: $TFMDESTDIR/$TFMNAME already exists." >&2 - echo $TFMDESTDIR/$TFMNAME >$STDOUT - $TEXMFCNF_DIR/MakeTeXupdate $TFMDESTDIR $TFMNAME - exit -fi - -# Try to create the destdir first. Do not create fonts, if this fails. -$TEXMFCNF_DIR/MakeTeXmkdir "$TFMDESTDIR" -if test ! -d "$TFMDESTDIR"; then - echo "$0: MakeTeXmkdir $TFMDESTDIR failed." - exit 1 -fi - -cmd="mf \mode:=$MODE; mag:=$MAG; scrollmode; input $NAME" -echo "$0: Running $cmd" -$cmd </dev/null -test -r $TFMNAME || { echo "$0: \`$cmd' failed to make $TFMNAME."; exit 1; } - -# Install the TFM file carefully, since others may be working simultaneously. -mv $TFMNAME $TFMDESTDIR/tfmtmp.$$ || exit 1 -cd $TFMDESTDIR || exit 1 -test -r $TFMNAME || mv tfmtmp.$$ $TFMNAME || exit 1 -chmod $MT_FILE_PERMS $TFMNAME - -# OK, success with the TFM. -$TEXMFCNF_DIR/MakeTeXupdate $TFMDESTDIR $TFMNAME -echo $TFMDESTDIR/$TFMNAME >$STDOUT - -# Since we probably made a GF(->PK) file, too, may as well install it if -# it's needed. -cd $TEMPDIR -if test -r $GFNAME && test ! -f $PKDESTDIR/$PKNAME; then - gftopk ./$GFNAME $PKNAME || exit 1 - $TEXMFCNF_DIR/MakeTeXmkdir "$PKDESTDIR" - mv $PKNAME $PKDESTDIR/pktmp.$$ || exit 1 - cd $PKDESTDIR || exit 1 - if test -f $PKNAME; then - rm -f pktmp.$$ - else - mv pktmp.$$ $PKNAME - chmod $MT_FILE_PERMS $PKNAME - $TEXMFCNF_DIR/MakeTeXupdate $PKDESTDIR $PKNAME - fi -fi -) 1>&2 </dev/null -# end of redirection stdout, stdin
deleted file mode 100755 --- a/kpathsea/MakeTeXcommon +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -# MakeTeXcommon -- common MakeTeX* options, etc. -# Meant to be sourced after $usage and $version and $TEXMF have been set. -# -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. -# $Id: MakeTeXcommon,v 1.1 1997-05-23 03:02:11 jwe Exp $ - -if test x$1 = x--help -o x$1 = x-help; then - echo "$usage" - exit 0 -elif test x$1 = x--version -o x$1 = x-version; then - echo "`basename $0` $version" - kpsewhich --version - exit 0 -elif test $# -lt ${mt_min_args-1}; then - echo "$0: Missing argument(s)." >&2 - echo "Try \``basename $0` --help' for more information." >&2 - exit 1 -elif test $# -gt ${mt_max_args-1}; then - while test $# -gt ${mt_max_args-1}; do shift; done - echo "$0: Extra arguments $*." >&2 - echo "Try \``basename $0` --help' for more information." >&2 - exit 1 -fi - -# TEMPDIR needs to be unique to each process because of the possibility of two -# people running dvips (or whatever) simultaneously. -TEMPDIR=${TMPDIR-/tmp}/mt.$$ - -# We want to output only filenames to standard output, but it's too -# error-prone to write the scripts that way, so we direct stdout here. -STDOUT=$TEMPDIR/stdout.$$ - -# We will change search paths to include $KPSE_DOT. This is necessary -# since we cd to $TEMPDIR. -KPSE_DOT=`pwd`; export KPSE_DOT - -# Clean up on normal or abnormal exit. -trap 'cd $KPSE_DOT; test -f $STDOUT && cat $STDOUT; rm -rf $TEMPDIR; exit 0' \ - 0 1 2 15 - - -mkdir $TEMPDIR -cd $TEMPDIR || exit 1 - -# Allow fonts to be read and written (especially in case we make -# directories) by everyone. -umask 0 - -: ${MODE=ljfour} -: ${BDPI=600} -: ${MT_DIR_PERMS=777} # keep to three digits or appendonlydir will fail -: ${MT_FILE_PERMS=666} -: ${ps_to_pk=gsftopk} # some prefer ps2pk - -# Fonts in these typefaces can be generated at arbitrary sizes, so -# MakeTeXMF tries to take advantage of that. -# These are the TDS-recommended directories. -: ${dcfontdir="$TEXMFMAIN/fonts/source/jknappen/dc"} -: ${ecfontdir="$TEXMFMAIN/fonts/source/jknappen/ec"} -: ${fcfontdir="$TEXMFMAIN/fonts/source/jknappen/fc"} -: ${tcfontdir="$TEXMFMAIN/fonts/source/jknappen/tc"} -: ${tsfontdir="$TEXMFMAIN/fonts/source/jknappen/ts"} -: ${sauterfontdir="$TEXMFMAIN/fonts/source/public/sauter"} - -# MakeTeXupdate and MakeTeXls-R make sure they're coordinated via this. -ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' - -# Source a site file, if it exists, to override any of the above. -test -r $TEXMFCNF_DIR/MakeTeX.site && . $TEXMFCNF_DIR/MakeTeX.site
deleted file mode 100755 --- a/kpathsea/MakeTeXls-R +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# MakeTeXls-R -- create or rebuild ls-R. -# Suitable for calling from cron, as in: -# 0 * * * * cd /your/texmf/root && /usr/local/bin/MakeTeXls-R -# -# Keeps ls-R world-writable, so anyone can update it (via MakeTeXPK etc.). -# -# Originally written as `texhash' by Thomas Esser -# <te@informatik.uni-hannover.de>, Okt., 1994. -# Public domain. - -version='$Id: MakeTeXls-R,v 1.1 1997-05-23 03:02:11 jwe Exp $' -usage="Usage: $0. - Rebuild the ls-R filename database completely." -mt_min_args=0 -mt_max_args=0 - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFLS_R=`kpsewhich -expand-var='$TEXMFLS_R'`} -test -n "$TEXMFLS_R" || TEXMFLS_R=$TEXMFMAIN -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -trap 'cd / ; rm -f $db_file_tmp; exit' 1 2 15 - -# Use ls -l to follow a possible symlink to get the right filesystem, -db_file=`\ls -l $TEXMFLS_R/ls-R 2>/dev/null | awk '{print $NF}'` -test -z "$db_file" && db_file=$TEXMFLS_R/ls-R -db_dir=`echo $db_file | sed 's%/[^/][^/]*$%%'` # can't rely on dirname -db_file_tmp=$db_dir/ls-R-tmp$$ - -test -w "$db_dir" || { echo "$0: Cannot write to $db_dir." >&2; exit 1; } - -if test ! -f $db_file; then - cp /dev/null $db_file - chmod 666 $db_file -fi - -# Copy the file to preserve as much of the permissions as possible. -rm -f $db_file_tmp -cp -p $db_file $db_file_tmp 2>/dev/null - -# Make sure we can write the file: -chmod +w $db_file_tmp - -tty -s && echo "$0: Updating $db_file... " -# Some people set noclobber somewhere else, so make sure to unset it. -unset noclobber -echo "$ls_R_magic" >$db_file_tmp - -# The main task. We ls two things so the top-level directory name ends -# up in the output, so top-level files can be found via ls-R. Probably -# irrelevant in practice. -# The sed command is because on new FreeBSD/NetBSD systems, ls -LAR ./ -# produces .//. Sigh. -(cd $TEXMFLS_R && ls -LAR /dev/null ./ 2>/dev/null) \ -| sed 's@\.//@./@' \ ->>$db_file_tmp - -tty -s && echo "$0: Done." -rm -f $db_file -mv $db_file_tmp $db_file
deleted file mode 100755 --- a/kpathsea/MakeTeXmkdir +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# mkinstalldirs --- make directory hierarchy (now MakeTeXmkdir). -# Author: Noah Friedman <friedman@prep.ai.mit.edu>, created: 1993-05-16. -# Public domain. -# -# Modified for sticky directory creation, --help, --version. -# te@informatik.uni-hannover.de and kb@mail.tug.org. - -version='$Id: MakeTeXmkdir,v 1.1 1997-05-23 03:02:11 jwe Exp $' -usage="Usage: $0 DIRS... - Create each DIR, including any missing leading directories." - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d in ${1+"$@"} ; do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - mkdir "$pathcomp" || errstatus=$? - chmod $MT_DIR_PERMS $pathcomp - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus
deleted file mode 100755 --- a/kpathsea/MakeTeXnames +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -# MakeTeXnames -- find PK and TFM names. -# Use alias files from the ftp://ftp.tug.org/tex/fontname.tar.gz distribution. -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. - -version='$Id: MakeTeXnames,v 1.1 1997-05-23 03:02:11 jwe Exp $' -usage="Usage: $0 NAME [DPI MODE] [DESTDIR]. - Output the PK and TFM names for a font NAME." -mt_max_args=4 - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -NAME=$1 -case $# in -1|2) DPI=$BDPI; DEST=$2;; -3|4) DPI=$2; MODE=$3; DEST=$4;; -*) help;; -esac - -FONTNAME=`kpsewhich -expand-var='$FONTNAME'` -test -z "$FONTNAME" && FONTNAME=$TEXMFMAIN/fontname - -: ${MT_PKDESTDIR='$MT_DESTROOT/$MT_PKPART/$MT_MODE/$MT_NAMEPART'} -: ${MT_TFMDESTDIR='$MT_DESTROOT/$MT_TFMPART/$MT_NAMEPART'} -: ${MT_DESTROOT='$TEXMFMAIN/fonts'} -: ${MT_DEFAULT_NAMEPART=tmp} -: ${MT_PKPART='pk'} -: ${MT_TFMPART='tfm'} -: ${MT_TFMNAME='$NAME.tfm'} -: ${MT_PKNAME='$NAME.${DPI}pk'} - -# MT_NAMEPART is harder. -if test -z "$MT_NAMEPART"; then - # Nothing specified, so try to intuit the directory from the - # fontname. First the special cases: either $NAME matches an entire - # name in special.map, or it matches the abbreviation in - # special.map and ends with a numeral (for the pointsize). - # We (painfully) use only the minimal features in original awk. - if test -r $FONTNAME/special.map; then - MT_NAMEPART=`awk \ -'{if ($1 == NAME || (substr (NAME, 1, length ($1)) == $1 \ - && substr (NAME, length (NAME), 1) ~ /[0-9]/ \ - && substr ($1, length ($1), 1) ~ /[^0-9]/)) \ - { print $2 "/" $3; exit; }}' NAME=$NAME $FONTNAME/special.map` - - if test -z "$MT_NAMEPART"; then - # Try the normal case. Source first. - s_abbrev=`echo $NAME | sed 's/^\(.\).*$/\1/'` - sourcedir=`awk '{ if ($1 == s_abbrev) { print $2; exit; }}' \ - s_abbrev=$s_abbrev $FONTNAME/supplier.map` - - if test -n "$sourcedir"; then - # We found the source. Try for the typeface. - t_abbrev=`echo $NAME | cut -c 2-3` - typefacedir=`awk '{ if ($1 == t_abbrev) { print $2; exit; }}' \ - t_abbrev=$t_abbrev $FONTNAME/typeface.map` - - if test -n "$typefacedir"; then - # Found everything. - MT_NAMEPART=$sourcedir/$typefacedir - - else - echo "$0: Could not map typeface abbreviation $t_abbrev." >&2 - fi - else - echo "$0: Could not map source abbreviation $s_abbrev." >&2 - fi - fi - fi - if test -z "$MT_NAMEPART"; then - # If we failed for whatever reason, default to a generic subdir. - MT_NAMEPART=$MT_DEFAULT_NAMEPART - fi -fi - -case "$DEST" in - "") ;; - /*) MT_PKDESTDIR=$DEST;; # Absolute, explicit destdir => use it. - *) MT_NAMEPART=$DEST;; # Relative destdir => append to the default. -esac - -. $TEXMFCNF_DIR/MakeTeXnames.cnf - -eval MT_MODE=$MODE -eval MT_PKPART=$MT_PKPART -eval MT_DESTROOT=$MT_DESTROOT -eval PKNAME=$MT_PKDESTDIR/$MT_PKNAME -eval TFMNAME=$MT_TFMDESTDIR/$MT_TFMNAME - -echo $PKNAME $TFMNAME | sed 's@//*@/@g'
deleted file mode 100755 --- a/kpathsea/MakeTeXnames.cnf +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# MakeTeXnames.cnf to determine various manipulations of the filenames. -# Sourced from MakeTeXnames. -# -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. -# $Id: MakeTeXnames.cnf,v 1.1 1997-05-23 03:02:11 jwe Exp $ - - -# Possible features: appendonlydir dosnames nomode strip varfonts. -: ${MT_FEATURES=} - -# Set append-only bit on created directories. -case "$MT_FEATURES" in - *appendonlydir*) MT_DIR_PERMS=1$MT_DIR_PERMS;; -esac - -# Get 8.3 filenames like dpiNNN/NAME.pk. -case "$MT_FEATURES" in - *dosnames*) MT_PKNAME='dpi$DPI/$NAME.pk';; -esac - -# Omit the mode directory (e.g., ljfour): -case "$MT_FEATURES" in - *nomode*) MODE="";; -esac - -# Omit the supplier/typeface part (e.g., ams/euler). -case "$MT_FEATURES" in - *strip*) MT_NAMEPART="";; -esac - -# Put new fonts into the directory named by the VARTEXFONTS environment -# variable or config file value. (A default value for VARTEXFONTS is -# already set in the default texmf.cnf, q.v.) -# -# A user can override this setting in either direction by setting -# USE_VARTEXFONTS to 1 or 0. -case "$MT_FEATURES" in - *varfonts*) test "$USE_VARTEXFONTS" != 0 && USE_VARTEXFONTS=1;; -esac - -if test "$USE_VARTEXFONTS" = 1; then - if test -n "${VARTEXFONTS=`kpsewhich -expand-var='$VARTEXFONTS'`}"; then - MT_DESTROOT=$VARTEXFONTS - MT_NAMEPART="" - else - echo "$0: You asked for varfonts in MT_FEATURES, but VARTEXFONTS" >&2 - echo "$0: is not set as an environment variable or in texmf.cnf, etc." >&2 - fi -fi - - -# In case you want to override anything that got set above. -# (MakeTeX.site also gets sourced before this is called, from MakeTeXcommon.) -test -r $TEXMFCNF_DIR/MakeTeX.site && . $TEXMFCNF_DIR/MakeTeX.site
deleted file mode 100755 --- a/kpathsea/MakeTeXupdate +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# MakeTeXupdate -- update ls-R with a new entry. -# -# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. - -version='$Id: MakeTeXupdate,v 1.1 1997-05-23 03:02:11 jwe Exp $' -usage="Usage: $0 DIR FILE. - Update the ls-R file with an entry for FILE in DIR." -mt_min_args=2 -mt_max_args=2 - -: ${TEXMFMAIN=`kpsewhich -expand-var='$TEXMFMAIN'`} -if test -z "$TEXMFMAIN"; then - echo "$0: No \$TEXMFMAIN; set the environment variable or in texmf.cnf." >&2 - exit 1 -fi -: ${TEXMFLS_R=`kpsewhich -expand-var='$TEXMFLS_R'`} -test -n "$TEXMFLS_R" || TEXMFLS_R=$TEXMFMAIN -: ${TEXMFCNF_DIR=`kpsewhich -expand-var='$TEXMFCNF_DIR'`} -test -n "$TEXMFCNF_DIR" || TEXMFCNF_DIR=$TEXMFMAIN/web2c -. $TEXMFCNF_DIR/MakeTeXcommon - -test $# -eq 2 || { echo "$usage" >&2; exit 1; } -dir=$1 -file=$2 -test -d "$dir" || { echo "$0: $dir not a directory." >&2; exit 1; } -test -f "$dir/$file" || { echo "$0: $dir/$file not a file." >&2; exit 1; } - -db_file=$TEXMFLS_R/ls-R - -test -f $db_file || MakeTeXls-R -test -f $db_file || { echo "$0: $db_file does not exist." >&2; exit 1; } -test -w "$db_file" || { echo "$0: $db_file unwritable." >&2; exit 1; } - -test "`sed 1q $db_file`" = "$ls_R_magic" \ - || { echo "$0: $db_file lacks magic string \`$ls_R_magic'." >&2; exit 1; } - -# Change `$TEXMFLS_R/' to `./'. -dir=`echo $dir | sed "s@^$TEXMFLS_R/@./@g"` - -# May as well always put in a new directory entry; presumably cron will -# come along soon enough and clean things up. -echo "$dir:" >>$db_file -echo "$file" >>$db_file - -exit 0
--- a/kpathsea/Makefile.in +++ b/kpathsea/Makefile.in @@ -1,12 +1,12 @@ # Makefile for kpathsea --kb@mail.tug.org. Public domain. -version = 3.0 +version = @KPSEVERSION@ # Add -DNO_DEBUG to disable debugging, for vanishingly better performance. # paths.make -- installation directories. # # The compile-time paths are defined in kpathsea/paths.h, which is built -# from kpathsea/paths.h.in and these definitions. See kpathsea/INSTALL +# from kpathsea/texmf.in and these definitions. See kpathsea/INSTALL # for how the various path-related files are used and created. # Do not change prefix and exec_prefix in Makefile.in! @@ -37,16 +37,21 @@ # Unix man pages. manext = 1 -mandir = $(prefix)/man/man$(manext) +mandir = @mandir@/man$(manext) # TeX system-specific directories. Not all of the following are relevant # for all programs, but it seems cleaner to collect everything in one place. -# The default paths are now in kpathsea/paths.h.in. Passing all the +# The default paths are now in kpathsea/texmf.in. Passing all the # paths to sub-makes can make the arg list too long on system V. +# Note that if you make changes below, you will have to make the +# corresponding changes to texmf.in or texmf.cnf yourself. # The root of the main tree. -texmf = $(datadir)/texmf +texmf = @texmfmain@ + +# The directory used by varfonts. +vartexfonts = /var/tmp/texfonts # Regular input files. texinputdir = $(texmf)/tex @@ -59,7 +64,7 @@ dvips_plain_macrodir = $(texinputdir)/plain/dvips dvilj_latex2e_macrodir = $(texinputdir)/latex/dvilj -# MakeTeXPK.site, texmf.cnf, etc. +# mktex.cnf, texmf.cnf, etc. web2cdir = $(texmf)/web2c # The top-level font directory. @@ -100,7 +105,7 @@ bindir=$(bindir) scriptdir=$(scriptdir) libdir=$(libdir) \ datadir=$(datadir) infodir=$(infodir) includedir=$(includedir) \ manext=$(manext) mandir=$(mandir) \ - texmf=$(texmf) web2cdir=$(web2cdir) \ + texmf=$(texmf) web2cdir=$(web2cdir) vartexfonts=$(vartexfonts)\ texinputdir=$(texinputdir) mfinputdir=$(mfinputdir) mpinputdir=$(mpinputdir)\ fontdir=$(fontdir) fmtdir=$(fmtdir) basedir=$(basedir) memdir=$(memdir) \ texpooldir=$(texpooldir) mfpooldir=$(mfpooldir) mppooldir=$(mppooldir) \ @@ -123,7 +128,7 @@ DEFS = @DEFS@ $(XDEFS) # Kpathsea needs this for compiling, programs need it for linking. -LIBTOOL = $(kpathsea_srcdir)/klibtool +LIBTOOL = $(top_srcdir)/klibtool # You can change [X]CPPFLAGS, [X]CFLAGS, or [X]DEFS, but # please don't change ALL_CPPFLAGS or ALL_CFLAGS. @@ -145,6 +150,9 @@ INSTALL_LIBTOOL_LIBS = INSTALL_DATA='$(INSTALL_DATA)' $(LIBTOOL) install-lib INSTALL_LIBTOOL_PROG = INSTALL_PROGRAM='$(INSTALL_PROGRAM)' $(LIBTOOL) install-prog +# Creating (symbolic) links. +LN = @LN_S@ + # We use these for many things. kpathsea_parent = .. kpathsea_dir = $(kpathsea_parent)/kpathsea @@ -152,10 +160,6 @@ kpathsea_srcdir = $(kpathsea_srcdir_parent)/kpathsea kpathsea = $(kpathsea_dir)/libkpathsea.la -##ifeq ($(CC), gcc) -##XDEFS = -D__USE_FIXED_PROTOTYPES__ -Wall -Wpointer-arith $(warn_more) -##CFLAGS = -g $(XCFLAGS) -##endif # End of common.make. # library.make -- stuff only useful for libraries. @@ -186,13 +190,12 @@ # texi.make -- making .dvi and .info from .texi. MAKEINFO = makeinfo -MAKEINFO_FLAGS = --paragraph-indent=2 -I$(HOME)/gnu/gnuorg -# That -I is purely for my own benefit in doing `make dist'. It won't -# hurt anything for you (I hope). +MAKEINFO_FLAGS = --paragraph-indent=2 -I$(srcdir) + TEXI2DVI = texi2dvi TEXI2HTML = texi2html -TEXI2HTML_FLAGS = -split_node -menu +TEXI2HTML_FLAGS = -expandinfo -number -menu -split_chapter # If you prefer one big .html file instead of several, remove # -split-node or replace it by -split_chapter. @@ -208,14 +211,9 @@ $(TEXI2HTML) $(TEXI2HTML_FLAGS) $< # End of texi.make. -##ifdef HOSTNAME -##warn_more = -Wmissing-prototypes -Wwrite-strings -Wshadow -##MAKEINFO_FLAGS := $(MAKEINFO_FLAGS) --no-split -##malloc = /usr/local/src/malloc/onefile.o # gmalloc.o -##endif -# Install these header files (except c-auto.h). -install_headers = *.h +# Install these header files (except acconfig.h). +install_headers = *.h $(srcdir)/*.h # Put tex-file.o first, because it's what depends on the paths, and may # reduce frustration if the paths are wrong by doing it first. @@ -234,40 +232,61 @@ library = kpathsea # We want to compile almost everything with libtool ... -KPATHSEA_CC = $(LIBTOOL) compile $(CC) +KPATHSEA_CC = $(LIBTOOL) compile "$(CC)" +.SUFFIXES: .lo .c.lo: $(KPATHSEA_CC) $< $(ALL_CFLAGS) -.SUFFIXES: .lo -default all: kpsewhich $(library).info +default all: kpsewhich kpsestat access readlink $(library).info manfiles kpsewhich: $(kpathsea) kpsewhich.o $(kpathsea_link) kpsewhich.o $(LOADLIBES) -$(kpathsea): $(objects) +kpsestat: kpsestat.o + $(link_command) kpsestat.o + +access: access.o + $(link_command) access.o + +readlink: readlink.o + $(link_command) readlink.o + +$(kpathsea): $(objects) klibtool.version $(LIBTOOL) archive $(AR) $(ARFLAGS) $@ $(objects) $(INSTALL_LIBTOOL_LIBS) . lib$(library).la # All the objects depend on the klibtool configuration file. $(objects): klibtool.config -# Make variable substitutions from paths.h. -texmf.cnf: texmf.cnf.in texmf.sed - sed -f texmf.sed $(srcdir)/texmf.cnf.in >$@ +# Create klibtool.version in the build tree +klibtool.version: + $(LN) $(srcdir)/kpathsea.version $@ + +# Make variable substitutions for paths.h. +texmf.cnf: texmf.in texmf.sed + sed -f texmf.sed $(srcdir)/texmf.in >$@ # The idea is to turn each var=value into s%@var@%value%g. Seems simpler # to put the substitutions in a file than to play shell quoting games. -texmf.sed: $(top_srcdir)/make/makevars.make $(top_srcdir)/make/paths.make +texmf.sed: Makefile + rm -f texmf.sed echo $(makevars) \ | tr ' ' '\012' \ | sed -e 's/^/s%@/' -e 's/=/@%/' -e 's/$$/%/' -e 's/$$/g/' \ - >$@-t -# Don't replace the rhs of the TEXMF assignment itself, then we'd -# end up with TEXMF = $TEXMF. We replace all the other hardwired paths -# with $TEXMF, though, for ease of modification. - echo 's%$(texmf)%\$$TEXMF%g' >>$@-t - echo '/^ *TEXMF[ =]/s%\$$TEXMF%$(texmf)%' >>$@-t - mv $@-t $@ + >$@ +# Insert $TEXMF in as many of the hardwired paths as possible. We could +# use the slightly different rule 's%$(texmf)/%\$$TEXMF/%g' and avoid +# the need for the corrections below. But if texmf.in is edited +# the heuristic may no longer work. + echo 's%$(texmf)%\$$TEXMF%g' >>$@ +# Now we repair the damage this may have caused. Don't replace the rhs of +# the TEXMFMAIN assignment itself, then we'd end up with TEXMFMAIN = $TEXMF +# and TEXMF = $TEXMFMAIN. The (commented) assignment of TEXMFLOCAL is +# likely to have been mangled as well. + echo '/^ *TEXMFMAIN[ =]/s%\$$TEXMF%$(texmf)%' >>$@ + echo '/^[% ]*TEXMFLOCAL[ =]/s%\$$TEXMF%$(texmf)%' >>$@ +# And fill in the last clause of TEXMFCNF with an absolute path. + echo '/^ *TEXMFCNF[ =]/s%@web2c@%$(web2cdir)%' >>$@ # First null out comments and leading/trailing whitespace, then remove # lines that define invalid C identifiers, then remove blank lines and @@ -281,7 +300,7 @@ # No backslash-newline escapes in the long sed replacement because that # will turn into a space in the output. # -# Without the $TEXMF/dbtex/etc. substitutions, if the cnf file was +# Without the $TEXMF/prefix/etc. substitutions, if the cnf file was # not found, the compile-time paths would be of little use, since TEXMF # (etc.) wouldn't be defined. Alternatively, we could have a way to # specify compile-time default values for variables in general, but I @@ -289,75 +308,90 @@ # # The definition of DEFAULT_TEXMF (and other variables) # that winds up in the final paths.h will not be used. -$(kpathsea_dir)/paths.h: texmf.cnf - echo "/* paths.h: Generated from texmf.cnf `date`. */" >$@ +# +# We don't want to rewrite paths.h when we have only changed comments +# in texmf.in that have no effect on paths.h, since that would cause +# almost everything to be rebuilt. +$(kpathsea_dir)/paths.h: stamp-paths +stamp-paths: texmf.cnf + echo "/* paths.h: Generated from texmf.cnf. */" >paths.tmp sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' texmf.cnf \ - | grep '^[ ]*[A-Z1_]*[ =]' \ + | grep '^[ ]*[A-Z0-9_]*[ =]' \ | sed '/^$$/d' \ | sed 's/^\([^ =]*\)[ ]*=*[ ]*\(.*\)/#ifndef DEFAULT_\1@#define DEFAULT_\1 "\2"@#endif/' \ - | tr @ '\012' \ - | sed -e 's@\$$TEXMF@$(texmf)@g' \ - -e 's@\$$dbtex@$(texinputdir)@g' \ - -e 's@\$$dbfonts@$(fontdir)@g' \ - -e 's@\$$VARTEXFONTS@/var/tex/fonts@g' \ - -e 's@\$$prefix@$(prefix)@g' \ - >>$@ + | tr '@' '\012' \ + | sed -e 's%\$$TEXMFMAIN%$(texmf)%g' \ + -e 's%\$$TEXMF%$(texmf)%g' \ + -e 's%\$$VARTEXFONTS%$(vartexfonts)%g' \ + -e 's%\$$web2cdir%$(web2cdir)%g' \ + -e 's%\$$prefix%$(prefix)%g' \ + >>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 >stamp-paths # Need an extra definition for this. Dependencies included below. tex-file.o: $(KPATHSEA_CC) -DDEFAULT_FONT_SIZES='\"$(default_texsizes)\"' $(srcdir)/tex-file.c -# Yes, this depends on GNU Make. So? We have to omit optimizaiton -# for this file on the DEC Alpha with some versions of gcc. It's -# simpler to just omit optimization for all platforms. --jwe -hash.lo: - $(KPATHSEA_CC) $(srcdir)/hash.c $(filter-out -O%, $(ALL_CFLAGS)) - check: kpsewhich ./kpsewhich -expand-var '$$TEXMF' -install uninstall: - -#install: install-exec install-data -#uninstall: uninstall-exec uninstall-data +install: install-exec install-data +uninstall: uninstall-exec uninstall-data install-exec: kpsewhich - $(SHELL) $(top_srcdir)/../mkdirchain $(bindir) $(scriptdir) \ + $(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir) $(scriptdir) \ $(libdir) $(web2cdir) - if grep 'original MakeTeXPK --' $(scriptdir)/MakeTeXPK >/dev/null 2>&1\ - || test ! -r $(scriptdir)/MakeTeXPK; then \ - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXPK $(scriptdir)/MakeTeXPK; \ + if grep 'original mktexpk --' $(scriptdir)/mktexpk >/dev/null 2>&1\ + || test ! -r $(scriptdir)/mktexpk; then \ + $(INSTALL_SCRIPT) $(srcdir)/mktexpk $(scriptdir)/mktexpk; \ else true; fi - if grep 'original MakeTeXMF --' $(scriptdir)/MakeTeXMF >/dev/null 2>&1\ - || test ! -r $(scriptdir)/MakeTeXMF; then \ - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXMF $(scriptdir)/MakeTeXMF; \ + if grep 'original mktexmf --' $(scriptdir)/mktexmf >/dev/null 2>&1\ + || test ! -r $(scriptdir)/mktexmf; then \ + $(INSTALL_SCRIPT) $(srcdir)/mktexmf $(scriptdir)/mktexmf; \ else true; fi - if grep 'original MakeTeXTFM --' $(scriptdir)/MakeTeXTFM >/dev/null 2>&1\ - || test ! -r $(scriptdir)/MakeTeXTFM; then \ - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXTFM $(scriptdir)/MakeTeXTFM; \ + if grep 'original mktextfm --' $(scriptdir)/mktextfm >/dev/null 2>&1\ + || test ! -r $(scriptdir)/mktextfm; then \ + $(INSTALL_SCRIPT) $(srcdir)/mktextfm $(scriptdir)/mktextfm; \ else true; fi - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXls-R $(scriptdir)/MakeTeXls-R - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXcommon $(web2cdir)/MakeTeXcommon - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXmkdir $(web2cdir)/MakeTeXmkdir - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXnames $(web2cdir)/MakeTeXnames - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXnames.cnf $(web2cdir)/MakeTeXnames.cnf - $(INSTALL_SCRIPT) $(srcdir)/MakeTeXupdate $(web2cdir)/MakeTeXupdate + if grep 'original mktexlsr --' $(scriptdir)/mktexlsr >/dev/null 2>&1\ + || test ! -r $(scriptdir)/mktexlsr; then \ + $(INSTALL_SCRIPT) $(srcdir)/mktexlsr $(scriptdir)/mktexlsr; \ + else true; fi + $(INSTALL_SCRIPT) $(srcdir)/mktex.opt $(web2cdir)/mktex.opt + $(INSTALL_SCRIPT) $(srcdir)/mktexdir $(web2cdir)/mktexdir + $(INSTALL_SCRIPT) $(srcdir)/mktexdir.opt $(web2cdir)/mktexdir.opt + $(INSTALL_SCRIPT) $(srcdir)/mktexnam $(web2cdir)/mktexnam + $(INSTALL_SCRIPT) $(srcdir)/mktexnam.opt $(web2cdir)/mktexnam.opt + $(INSTALL_SCRIPT) $(srcdir)/mktexupd $(web2cdir)/mktexupd $(INSTALL_LIBTOOL_LIBS) $(libdir) lib$(library).la $(INSTALL_LIBTOOL_PROG) $(bindir) kpsewhich + $(INSTALL_PROGRAM) kpsestat $(bindir) + $(INSTALL_PROGRAM) access $(bindir) + $(INSTALL_PROGRAM) readlink $(bindir) uninstall-exec: rm -f $(bindir)/kpsewhich -install-data: texmf.cnf kpathsea.info - $(SHELL) $(top_srcdir)/../mkdirchain $(texmf) $(infodir) $(web2cdir) +install-data: texmf.cnf kpathsea.info install-man + $(SHELL) $(top_srcdir)/../mkinstalldirs $(texmf) $(infodir) $(web2cdir) if grep 'original texmf.cnf --' $(web2cdir)/texmf.cnf >/dev/null 2>&1 \ || test ! -r $(web2cdir)/texmf.cnf; then \ $(INSTALL_DATA) texmf.cnf $(web2cdir)/texmf.cnf; \ else true; fi - $(INSTALL_DATA) $(srcdir)/kpathsea.info $(infodir)/kpathsea.info - $(SHELL) $(top_srcdir)/../mkdirchain $(includedir)/kpathsea + test -r kpathsea.info || cd $(srcdir) && for i in kpathsea.i*; do \ + $(INSTALL_DATA) $$i $(infodir)/$$i; done +# Should we install the headers? They are not just system-dependent, +# which is bad enough, but even compiler-dependent. + $(SHELL) $(top_srcdir)/../mkinstalldirs $(includedir)/kpathsea for f in $(install_headers); do \ - $(INSTALL_DATA) $$f $(includedir)/kpathsea/$$f; done - rm -f $(includedir)/kpathsea/c-auto.h + $(INSTALL_DATA) $$f $(includedir)/kpathsea/; done + rm -f $(includedir)/kpathsea/acconfig.h $(POSTINSTALL) test -r $(infodir)/dir || $(INSTALL_DATA) $(top_srcdir)/../dir $(infodir) if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ @@ -365,75 +399,51 @@ else true; fi uninstall-data: - rm -f $(infodir)/kpathsea.info* - for f in $(install_headers); do rm -f $(includedir)/$$f; done + rm -f $(infodir)/kpathsea.i* +# for f in $(install_headers); do rm -f $(includedir)/`basename $$f`; done # distdir is used by other distributions; they define $(distdir). distdir: doc $(library).dvi $(library).h rm -rf $(distdir) mkdir -p $(distdir) - ln $(ln_files) klibtool.version $(distdir) + ln $(ln_files) kpathsea.version $(distdir) touch *.info* - ln MakeTeX* *.info* *.texi $(library).aux $(library).cps $(distdir) - ln BUGS CONFIGURE HIER PROJECTS *.ac $(distdir) + ln mktex* *.info* *.texi $(library).aux $(library).cps $(distdir) + rm -f $(distdir)/*.1 $(distdir)/*.man + ln *.man $(distdir) + ln BUGS README.CONFIGURE HIER PROJECTS *.ac $(distdir) touch kpathsea.h # to avoid .cps.h rule on Solaris cd $(distdir) && rm -f paths.h - cd $(distdir) && add-version $(version) version.c # I don't use this, but other programmers want it. acconfig.h is an # autoheader input file, not an includable C header. Bad name. $(library).h: always rm -f $@ - ls -1 *.h | grep -v acconfig.h \ - | sed -e 's,^,#include <kpathsea/,' -e s',$$,>,' >$@ + echo '#include <kpathsea/config.h>' >$@ + ls -1 *.h \ + | grep -v '\(acconfig\|config\|kpathsea\|win32lib\|c-auto\)\.h' \ + | sed -e 's,^,#include <kpathsea/,' -e s',$$,>,' >>$@ touch -r `ls -1t *.h | tail +2 | head -1` $@ always: .PHONY: always # config.make -- autoconf rules to remake the Makefile, c-auto.h, etc. -##ifdef HOSTNAME -##ac_dir = $(gnu)/share/autoconf -##autoconf = $(ac_dir)/acspecific.m4 $(ac_dir)/acgeneral.m4 $(ac_dir)/acsite.m4 -##autoheader = $(ac_dir)/acconfig.h $(ac_dir)/autoheader.m4 -## -### I define $(autoconf) to acgeneral.m4 and the other Autoconf files, so -### configure automatically gets remade in the sources with a new Autoconf -### release. But it would be bad for installers with Autoconf to remake -### configure (not to mention require Autoconf), so I take out the variable -### $(autoconf) definition before release. -### -### BTW, xt.ac isn't really required for dvipsk or dviljk, but it doesn't -### seem worth the trouble. -### -##configure_in = $(srcdir)/configure.in $(kpathsea_srcdir)/common.ac \ -## $(kpathsea_srcdir)/withenable.ac $(kpathsea_srcdir)/xt.ac \ -## $(kpathsea_srcdir)/acklibtool.m4 -##$(srcdir)/configure: $(configure_in) $(autoconf) -## cd $(srcdir) && autoconf -##endif config.status: $(srcdir)/configure - $(SHELL) $(srcdir)/configure --no-create + $(SHELL) $(srcdir)/configure --no-create $(enablemaintflag) -Makefile: $(srcdir)/Makefile.in config.status $(SHELL) config.status +Makefile: $(srcdir)/Makefile.in config.status + $(SHELL) config.status # This rule isn't used for the top-level Makefile, but it doesn't hurt. # We don't depend on config.status because configure always rewrites # config.status, even when it doesn't change. Thus it might be newer # than c-auto.h when we don't need to remake the latter. c-auto.h: stamp-auto -stamp-auto: $(srcdir)/c-auto.h.in +stamp-auto: $(srcdir)/c-auto.in $(SHELL) config.status - date >$(srcdir)/stamp-auto + date >stamp-auto -##ifdef HOSTNAME -### autoheader reads acconfig.h (and c-auto.h.top) automatically. -##$(srcdir)/c-auto.h.in: $(srcdir)/stamp-auto.in -##$(srcdir)/stamp-auto.in: $(configure_in) $(autoheader) \ -## $(kpathsea_srcdir)/acconfig.h -## cd $(srcdir) && autoheader --localdir=$(kpathsea_srcdir) -## date >$(srcdir)/stamp-auto.in -##endif # End of config.make. @@ -442,19 +452,6 @@ $(library).info: bugs.texi hier.texi install.texi unixtex.texi -##ifdef HOSTNAME -##INSTALL: install.texi -## $(MAKEINFO) $(one_info) $(MAKEINFO_FLAGS) $< -o $@ -## add-info-toc $@ -##BUGS: bugs.texi -## $(MAKEINFO) $(one_info) $(MAKEINFO_FLAGS) $< -o $@ -## add-info-toc $@ -##HIER: hier.texi -## $(MAKEINFO) $(one_info) $(MAKEINFO_FLAGS) $< -o $@ -##unixtex.ftp: unixtex.texi -## $(MAKEINFO) $(one_info) $(MAKEINFO_FLAGS) $< -o $@ -##doc: info HIER BUGS INSTALL unixtex.ftp -##endif # clean.make -- cleaning. mostlyclean:: @@ -462,62 +459,114 @@ clean:: mostlyclean rm -f $(program) $(programs) squeeze lib$(library).* $(library).a *.bad - rm -f *.dvi *.lj + rm -f *.exe *.dvi *.lj -distclean:: clean +distclean:: extraclean clean rm -f Makefile - rm -f config.status config.log config.cache c-auto.h + rm -f config.status config.log config.cache c-auto.h + rm -f stamp-auto stamp-tangle stamp-otangle -# Although we can remake configure and c-auto.h.in, we don't remove +# Although we can remake configure and c-auto.in, we don't remove # them, since many people may lack Autoconf. Use configclean for that. maintainer-clean:: distclean rm -f *.info* extraclean:: - rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.pl *.tfm *.vf *.vpl *gf *pk - rm -f *.mpx *.i *.s *~ *.orig *.rej *\#* + rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.pl *.tfm *.vf *.vpl + rm -f *.*pk *.*gf *.mpx *.i *.s *~ *.orig *.rej *\#* rm -f CONTENTS.tex a.out core mfput.* texput.* mpout.* configclean: - rm -f configure c-auto.h.in c-auto.h + rm -f configure c-auto.in c-auto.h stamp-* # End of clean.make. mostlyclean:: - rm -f kpsewhich *.lo + rm -f kpsewhich kpsestat access readlink *.lo klibtool.version rm -rf PROF PROF_SHARED SHARED STATIC distclean:: - rm -f paths.h texmf.cnf texmf.sed + rm -f paths.h texmf.cnf texmf.sed stamp-paths + +# The manual pages +manfiles = access.1 kpsestat.1 kpsewhich.1 readlink.1 \ + mktexlsr.1 mktexmf.1 mktextfm.1 mktexpk.1 + +# man.make: Makefile fragment for web2c manual pages. + +#DITROFF = ditroff +DITROFF = groff + +# The edited file always has extension .1; we change it when we install. +.SUFFIXES: .man .1 .txt .ps .dvi +.man.1: + sed -f sedscript $< >$@ +.1.dvi: + $(DITROFF) -Tdvi -man $< >$@ +.1.ps: + $(DITROFF) -Tps -man $< >$@ +.1.txt: + $(DITROFF) -Tascii -man $< | col -b | expand >$@ + +all: $(manfiles) +.PHONY: dw + +$(manfiles): sedscript + +manfiles: $(manfiles) +dvi: $(manfiles:.1=.dvi) +ps: $(manfiles:.1=.ps) +txt: $(manfiles:.1=.txt) + +# We do not depend on the top-level Makefile since the top-level +# Makefile can change for reasons that do not affect the man pages. +# At present, all but VERSION should be unused. +sedscript: + cp /dev/null sedscript + for f in $(kpathsea_dir)/paths.h; do \ + sed -n -e '/^#define/s/#define[ ][ ]*\([A-Z_a-z][A-Z_a-z]*\)[ ][ ]*\(.*\)/s%@\1@%\2%/p' \ + $$f \ + | sed -e 's/"//g' -e 's/[ ]*\/\*[^*]*\*\///g' >>sedscript;\ + done + echo 's%@VERSION@%$(version)%' >>sedscript + echo 's%@BINDIR@%$(bindir)%' >>sedscript + echo 's%@INFODIR@%$(infodir)%' >>sedscript + echo 's%@TEXINPUTDIR@%$(texinputdir)%' >>sedscript + echo 's%@MFINPUTDIR@%$(mfinputdir)%' >>sedscript + echo 's%@MPINPUTDIR@%$(mpinputdir)%' >>sedscript + echo 's%@FONTDIR@%$(fontdir)%' >>sedscript + echo 's%@FMTDIR@%$(fmtdir)%' >>sedscript + echo 's%@BASEDIR@%$(basedir)%' >>sedscript + echo 's%@MEMDIR@%$(memdir)%' >>sedscript + echo 's%@TEXPOOLDIR@%$(texpooldir)%' >>sedscript + echo 's%@MFPOOLDIR@%$(mfpooldir)%' >>sedscript + echo 's%@MPPOOLDIR@%$(mppooldir)%' >>sedscript + echo 's%@FONTMAPDIR@%$(dvipsdir)%' >>sedscript + echo 's%@LOCALMODES@%$(localmodes)%' >>sedscript + +install-man: manfiles + $(top_srcdir)/../mkinstalldirs $(mandir) + for nameone in $(manfiles); do \ + name=`basename $${nameone} .1`; \ + $(INSTALL_DATA) $${name}.1 $(mandir)/$${name}.$(manext); \ + done + +uninstall-man: + for nameone in $(manfiles); do \ + name=`basename $${nameone} .1`; \ + rm -f $(mandir)/$${name}.$(manext); \ + done + +install-data: install-man +uninstall-data: uninstall-man + +mostlyclean:: + rm -f *.1 + +clean:: + rm -f sedscript + +# end of man.make # rdepend.make -- rules for remaking the dependencies. -# -# Have to use -M, not -MM, since we use <kpathsea/...> instead of -# "kpathsea/..." in the sources. But that means we have to remove the -# directory prefixes and all the system include files. -# And <kpathsea/paths.h> is generated, not part of the distribution. -# -# And, there's no need for any installer/user to ever run this, it can -# only cause trouble. So comment it out in the distribution. -# (It doesn't work when the source and build directories are different.) -##ifndef c_auto_h_dir -##c_auto_h_dir = . -##endif -##ifdef HOSTNAME -##depend depend.make:: $(c_auto_h_dir)/c-auto.h \ -## $(top_srcdir)/../make/rdepend.make -## $(CC) -M $(ALL_CPPFLAGS) -I$(c_auto_h_dir) *.c \ -## | sed -e 's,\(\.\./\)\+kpathsea/,$$(kpathsea_srcdir)/,g' \ -## -e 's,$$(kpathsea_srcdir)/paths.h,$$(kpathsea_dir)/paths.h,g' \ -## -e 's,/usr[^ ]* ,,g' \ -## -e 's,/usr[^ ]*$$,,g' \ -## -e 's,dvi2xx.o,dvilj.o dvilj2p.o dvilj4.o dvilj4l.o,' \ -## | grep -v '^ *\\$$' \ -## >depend.make -### If kpathsea, we're making .lo library objects instead of .o's. -## pwd | grep -v kpathsea >/dev/null \ -## || (sed -e 's/\.o:/.lo:/' -e 's/kpsewhich.lo:/kpsewhich.o:/' \ -## <depend.make >depend-tmp.make; mv depend-tmp.make depend.make) -##.PHONY: depend -##endif # Let's stick a rule for TAGS here, just in case someone wants them. # (We don't put them in the distributions, to keep them smaller.) @@ -530,494 +579,611 @@ # End of rdepend.make. -absolute.lo: absolute.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/absolute.h \ - ../kpathsea/c-pathch.h -atou.lo: atou.c config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -basename.lo: basename.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h -cnf.lo: cnf.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-fopen.h \ - ../kpathsea/c-ctype.h \ - ../kpathsea/cnf.h ../kpathsea/db.h ../kpathsea/str-list.h \ - ../kpathsea/hash.h ../kpathsea/line.h ../kpathsea/paths.h \ - ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/tex-file.h ../kpathsea/variable.h -concat.lo: concat.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -concat3.lo: concat3.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -concatn.lo: concatn.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/concatn.h \ - ../kpathsea/c-vararg.h -db.lo: db.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/absolute.h \ - ../kpathsea/c-fopen.h ../kpathsea/c-pathch.h ../kpathsea/db.h \ - ../kpathsea/str-list.h ../kpathsea/hash.h ../kpathsea/line.h \ - ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/readable.h ../kpathsea/tex-file.h ../kpathsea/variable.h -debug.lo: debug.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -dir.lo: dir.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-dir.h \ - ../kpathsea/c-stat.h \ - ../kpathsea/hash.h -elt-dirs.lo: elt-dirs.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h \ - ../kpathsea/expand.h ../kpathsea/fn.h ../kpathsea/pathsearch.h \ - ../kpathsea/str-llist.h ../kpathsea/xopendir.h ../kpathsea/c-dir.h -expand.lo: expand.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h \ - ../kpathsea/expand.h ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/tilde.h ../kpathsea/variable.h -extend-fname.lo: extend-fname.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -file-p.lo: file-p.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/xstat.h \ - ../kpathsea/c-stat.h -find-suffix.lo: find-suffix.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h -fn.lo: fn.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/fn.h -fontmap.lo: fontmap.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-ctype.h \ - ../kpathsea/c-fopen.h ../kpathsea/fontmap.h ../kpathsea/hash.h \ - ../kpathsea/line.h ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/str-list.h ../kpathsea/tex-file.h -getopt.lo: getopt.c config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h getopt.h -getopt1.lo: getopt1.c config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h getopt.h -hash.lo: hash.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/hash.h \ - ../kpathsea/str-list.h -kdefault.lo: kdefault.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h \ - ../kpathsea/default.h -kpsewhich.o: kpsewhich.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-ctype.h \ - ../kpathsea/c-pathch.h ../kpathsea/expand.h ../kpathsea/getopt.h \ - ../kpathsea/line.h ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/proginit.h ../kpathsea/tex-file.h ../kpathsea/tex-glyph.h \ - ../kpathsea/variable.h -line.lo: line.c -magstep.lo: magstep.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/magstep.h -make-suffix.lo: make-suffix.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h -path-elt.lo: path-elt.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h \ - ../kpathsea/pathsearch.h ../kpathsea/str-llist.h -pathsearch.lo: pathsearch.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-fopen.h \ - ../kpathsea/absolute.h ../kpathsea/expand.h ../kpathsea/db.h \ - ../kpathsea/str-list.h ../kpathsea/pathsearch.h \ - ../kpathsea/str-llist.h ../kpathsea/readable.h ../kpathsea/variable.h -proginit.lo: proginit.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h \ - ../kpathsea/proginit.h ../kpathsea/tex-file.h -progname.lo: progname.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/absolute.h \ - ../kpathsea/c-pathch.h ../kpathsea/c-stat.h \ - ../kpathsea/pathsearch.h ../kpathsea/str-llist.h +absolute.lo: absolute.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h +access.o: access.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +atou.lo: atou.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +basename.lo: basename.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +cnf.lo: cnf.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/cnf.h $(kpathsea_srcdir)/db.h $(kpathsea_srcdir)/str-list.h \ + $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/line.h $(kpathsea_dir)/paths.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h +concat.lo: concat.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +concat3.lo: concat3.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +concatn.lo: concatn.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/c-vararg.h +db.lo: db.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h $(kpathsea_srcdir)/db.h \ + $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/line.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h +debug.lo: debug.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +dir.lo: dir.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-dir.h \ + $(kpathsea_srcdir)/c-stat.h \ + $(kpathsea_srcdir)/hash.h +elt-dirs.lo: elt-dirs.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/expand.h $(kpathsea_srcdir)/fn.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/xopendir.h $(kpathsea_srcdir)/c-dir.h +expand.lo: expand.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/expand.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/tilde.h $(kpathsea_srcdir)/variable.h \ + $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/absolute.h +extend-fname.lo: extend-fname.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +file-p.lo: file-p.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/xstat.h $(kpathsea_srcdir)/c-stat.h +find-suffix.lo: find-suffix.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h +fn.lo: fn.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/fn.h +fontmap.lo: fontmap.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/fontmap.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/line.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/tex-file.h +getopt.lo: getopt.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +getopt1.lo: getopt1.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h getopt.h +hash.lo: hash.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/str-list.h +kdefault.lo: kdefault.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/default.h +kpsestat.o: kpsestat.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-stat.h +kpsewhich.o: kpsewhich.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/expand.h $(kpathsea_srcdir)/getopt.h \ + $(kpathsea_srcdir)/line.h $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/proginit.h $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/tex-glyph.h \ + $(kpathsea_srcdir)/variable.h +line.lo: line.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/line.h +magstep.lo: magstep.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/magstep.h +make-suffix.lo: make-suffix.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h +path-elt.lo: path-elt.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h +pathsearch.lo: pathsearch.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/expand.h \ + $(kpathsea_srcdir)/db.h $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/variable.h +proginit.lo: proginit.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/proginit.h $(kpathsea_srcdir)/tex-file.h +progname.lo: progname.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h $(kpathsea_srcdir)/c-stat.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/tex-file.h putenv.lo: putenv.c -readable.lo: readable.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-stat.h \ - ../kpathsea/readable.h ../kpathsea/tex-hush.h ../kpathsea/truncate.h -rm-suffix.lo: rm-suffix.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -str-list.lo: str-list.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/str-list.h -str-llist.lo: str-llist.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/str-llist.h -strcasecmp.lo: strcasecmp.c config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h +readable.lo: readable.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-stat.h \ + $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/tex-hush.h \ + $(kpathsea_srcdir)/truncate.h +readlink.o: readlink.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathmx.h $(kpathsea_srcdir)/c-stat.h +rm-suffix.lo: rm-suffix.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +str-list.lo: str-list.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/str-list.h +str-llist.lo: str-llist.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/str-llist.h +strcasecmp.lo: strcasecmp.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h strstr.lo: strstr.c -strtol.lo: strtol.c config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -tex-file.lo: tex-file.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-fopen.h \ - ../kpathsea/c-vararg.h ../kpathsea/cnf.h ../kpathsea/default.h \ - ../kpathsea/expand.h ../kpathsea/fontmap.h ../kpathsea/hash.h \ - ../kpathsea/paths.h ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/tex-file.h ../kpathsea/tex-make.h ../kpathsea/variable.h -tex-glyph.lo: tex-glyph.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/absolute.h \ - ../kpathsea/expand.h ../kpathsea/fontmap.h ../kpathsea/hash.h \ - ../kpathsea/pathsearch.h ../kpathsea/str-llist.h \ - ../kpathsea/tex-glyph.h ../kpathsea/tex-file.h ../kpathsea/tex-make.h \ - ../kpathsea/variable.h -tex-hush.lo: tex-hush.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/pathsearch.h \ - ../kpathsea/str-llist.h ../kpathsea/tex-hush.h ../kpathsea/variable.h -tex-make.lo: tex-make.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-fopen.h \ - ../kpathsea/c-pathch.h ../kpathsea/concatn.h ../kpathsea/c-vararg.h \ - ../kpathsea/db.h ../kpathsea/str-list.h ../kpathsea/fn.h \ - ../kpathsea/magstep.h ../kpathsea/readable.h ../kpathsea/tex-make.h \ - ../kpathsea/tex-file.h ../kpathsea/variable.h -tilde.lo: tilde.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathch.h \ - ../kpathsea/tilde.h -truncate.lo: truncate.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-namemx.h \ - ../kpathsea/c-pathch.h ../kpathsea/c-pathmx.h ../kpathsea/truncate.h -uppercasify.lo: uppercasify.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-ctype.h -variable.lo: variable.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-ctype.h \ - ../kpathsea/cnf.h ../kpathsea/fn.h ../kpathsea/variable.h -version.lo: version.c -xcalloc.lo: xcalloc.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -xfopen.lo: xfopen.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -xfseek.lo: xfseek.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -xftell.lo: xftell.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -xgetcwd.lo: xgetcwd.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/c-pathmx.h -xmalloc.lo: xmalloc.c -xopendir.lo: xopendir.c ../kpathsea/config.h c-auto.h \ - ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/xopendir.h \ - ../kpathsea/c-dir.h -xputenv.lo: xputenv.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h -xrealloc.lo: xrealloc.c -xstat.lo: xstat.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h ../kpathsea/xstat.h \ - ../kpathsea/c-stat.h -xstrdup.lo: xstrdup.c ../kpathsea/config.h c-auto.h ../kpathsea/c-std.h \ - ../kpathsea/c-unistd.h ../kpathsea/systypes.h \ - ../kpathsea/c-memstr.h \ - ../kpathsea/c-errno.h \ - ../kpathsea/c-minmax.h \ - ../kpathsea/c-limits.h \ - ../kpathsea/c-proto.h ../kpathsea/debug.h ../kpathsea/types.h \ - ../kpathsea/lib.h ../kpathsea/progname.h +strtol.lo: strtol.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +tex-file.lo: tex-file.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/cnf.h \ + $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/default.h $(kpathsea_srcdir)/expand.h \ + $(kpathsea_srcdir)/fontmap.h $(kpathsea_srcdir)/hash.h $(kpathsea_dir)/paths.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/tex-make.h $(kpathsea_srcdir)/variable.h +tex-glyph.lo: tex-glyph.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/expand.h \ + $(kpathsea_srcdir)/fontmap.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/tex-glyph.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/tex-make.h $(kpathsea_srcdir)/variable.h +tex-hush.lo: tex-hush.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/tex-hush.h $(kpathsea_srcdir)/variable.h +tex-make.lo: tex-make.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/c-vararg.h \ + $(kpathsea_srcdir)/db.h $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/fn.h \ + $(kpathsea_srcdir)/magstep.h $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/tex-make.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h +tilde.lo: tilde.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/tilde.h +truncate.lo: truncate.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-namemx.h $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h $(kpathsea_srcdir)/c-pathmx.h \ + $(kpathsea_srcdir)/truncate.h +uppercasify.lo: uppercasify.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h +variable.lo: variable.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/cnf.h $(kpathsea_srcdir)/fn.h $(kpathsea_srcdir)/variable.h +version.lo: version.c c-auto.h +win32lib.lo: win32lib.c +xcalloc.lo: xcalloc.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xfopen.lo: xfopen.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xfseek.lo: xfseek.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xftell.lo: xftell.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xgetcwd.lo: xgetcwd.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathmx.h +xmalloc.lo: xmalloc.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xopendir.lo: xopendir.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/xopendir.h $(kpathsea_srcdir)/c-dir.h +xputenv.lo: xputenv.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xrealloc.lo: xrealloc.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xstat.lo: xstat.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/xstat.h $(kpathsea_srcdir)/c-stat.h +xstrdup.lo: xstrdup.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h
--- a/kpathsea/NEWS +++ b/kpathsea/NEWS @@ -1,5 +1,40 @@ This file records noteworthy changes. - +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
--- a/kpathsea/PROJECTS +++ b/kpathsea/PROJECTS @@ -1,5 +1,5 @@ Here are some ideas for improvements. If you would like to contribute, -please send mail to me (kb@mail.tug.org) first. +please send mail to me (infovore@xs4all.nl) first. If the library is built shared, it would be nice if the binaries did not
--- a/kpathsea/README +++ b/kpathsea/README @@ -4,7 +4,7 @@ See `NEWS' for changes by release, `ChangeLog` for all changes. See `INSTALL' for installation instructions. See `BUGS' for bug reporting details. -See `CONFIGURE' for details on running Autoconf-generated configure scripts. +See `README.CONFIGURE' for details on running the configure scripts. See `PROJECTS' for future improvements you might like to work on. Suggestions for improvements in either the library or the documentation,
new file mode 100644 --- /dev/null +++ b/kpathsea/README.CONFIGURE @@ -0,0 +1,193 @@ +Contents: + + Basic Installation + Compilers and Options + Compiling For Multiple Architectures + Installation Names + Optional Features + Specifying the System Type + Sharing Defaults + Operation Controls + + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. +
--- a/kpathsea/absolute.c +++ b/kpathsea/absolute.c @@ -21,11 +21,6 @@ #include <kpathsea/absolute.h> #include <kpathsea/c-pathch.h> -#ifdef DOSISH -#include <kpathsea/c-ctype.h> /* for ISALPHA */ -#endif /* DOS */ - - /* Sorry this is such a system-dependent mess, but I can't see any way to usefully generalize. */ @@ -38,8 +33,13 @@ #else /* not VMS */ boolean absolute = IS_DIR_SEP (*filename) #ifdef DOSISH - || ISALPHA (*filename) && IS_DEVICE_SEP (filename[1]) + /* Novell allows non-alphanumeric drive letters. */ + || (*filename && IS_DEVICE_SEP (filename[1])) #endif /* DOSISH */ +#ifdef WIN32 + /* UNC names */ + || (*filename == '\\' && filename[1] == '\\') +#endif #ifdef AMIGA /* Colon anywhere means a device. */ || strchr (filename, ':')
new file mode 100644 --- /dev/null +++ b/kpathsea/access.c @@ -0,0 +1,94 @@ +/* access -- test for access permissions of a file. + Copyright (C) 1997 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include <stdio.h> +#include <kpathsea/config.h> +#include <kpathsea/c-unistd.h> + +#ifdef WIN32 +#include <string.h> +#endif + +/* + * 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 (argc, argv) + 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@mail.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 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 `access --help' for more information.\n", argv[0]); + exit(1); + } + + /* The option parsing is somewhat primitive: '-' need not be the first + * character of the mode. The mode must be specified in a single + * option. Both of these 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; + case 'x': mode |= X_OK; break; + 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; +}
new file mode 100644 --- /dev/null +++ b/kpathsea/access.man @@ -0,0 +1,64 @@ +.TH ACCESS 1 "4 January 1998" "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 +access \- determine whether a file can be accessed +.SH SYNOPSIS +.B access +.I -mode +.I file +.\"===================================================================== +.SH DESCRIPTION +Exit successfully if +.I file +can be accessed with the specified mode. +.I mode +is one or more letters of +.IR rwx , +where +.I r +is for readable, +.I w +is for writable, and +.I x +is for executable. +.PP +The difference between +.B access +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 access +accepts the following additional options: +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH "SEE ALSO" +.BR access (2)
--- a/kpathsea/acconfig.h +++ b/kpathsea/acconfig.h @@ -1,9 +1,14 @@ -/* acconfig.h -- used by autoheader when generating c-auto.h.in. +/* acconfig.h -- used by autoheader when generating c-auto.in. If you're thinking of editing acconfig.h to fix a configuration problem, don't. Edit the c-auto.h file created by configure, instead. Even better, fix configure to give the right answer. */ +/* kpathsea: the version string. */ +#define KPSEVERSION "REPLACE-WITH-KPSEVERSION" +/* web2c: the version string. */ +#define WEB2CVERSION "REPLACE-WITH-WEB2CVERSION" + /* kpathsea/configure.in tests for these functions with kb_AC_KLIBTOOL_REPLACE_FUNCS, and naturally Autoheader doesn't know about that macro. Since the shared library stuff is all preliminary @@ -17,12 +22,20 @@ @TOP@ +/* Define if your compiler understands prototypes. */ +#undef HAVE_PROTOTYPES + /* Define if your putenv doesn't waste space when the same environment variable is assigned more than once, with different (malloced) values. This is true only on NetBSD/FreeBSD, as far as I know. See xputenv.c. */ #undef SMART_PUTENV +/* Define if getcwd if 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 if you are using GNU libc or otherwise have global variables `program_invocation_name' and `program_invocation_short_name'. */ #undef HAVE_PROGRAM_INVOCATION_NAME @@ -59,6 +72,7 @@ #define EDITOR "vi +%d %s" /* web2c: Window system support for Metafont. */ +#undef EPSFWIN #undef HP2627WIN #undef MFTALKWIN #undef NEXTWIN
--- a/kpathsea/acklibtool.m4 +++ b/kpathsea/acklibtool.m4 @@ -1,5 +1,5 @@ dnl Autoconf support for Klibtool. -dnl $Id: acklibtool.m4,v 1.2 1997-06-05 21:27:07 jwe Exp $ +dnl $Id: acklibtool.m4,v 1.3 1998-04-24 04:24:35 jwe Exp $ dnl dnl dnl Find the script, check for subprogs, etc. @@ -20,31 +20,30 @@ exit 1 fi # -## For use with Octave, ignore these options and only build static libraries. -## ## Argument parsing: we support --enable-shared and --enable-static. -##AC_ARG_ENABLE(shared, -##[ --enable-shared build shared libraries [default=no]],, -## enable_shared=no) -### -##AC_ARG_ENABLE(static, -##[ --enable-static build shared libraries [default=yes]],, -## enable_static=yes) -enable_shared=no -enable_static=yes +AC_ARG_ENABLE(shared, +[ --enable-shared build shared libraries [default=no]],, + enable_shared=no) +# +AC_ARG_ENABLE(static, +[ --enable-static build static libraries [default=yes]],, + enable_static=yes) # # If they explicitly --enable-static, make that the link type. # More commonly, they will just --enable-shared; make that the link type. -# In either case, prepend to any existing LIBTOOL_OBJTYPES. +# If they --disable-static, implicitly --enable-shared. +# In any case, prepend to any existing LIBTOOL_OBJTYPES. # If they really want to build both and link statically, # then they set LIBTOOL_OBJTYPES to SHARED and --enable-static. test "$enable_static" = yes && LIBTOOL_OBJTYPES=STATIC:$LIBTOOL_OBJTYPES -test "$enable_shared" = yes && LIBTOOL_OBJTYPES=SHARED:$LIBTOOL_OBJTYPES +(test "$enable_shared" = yes \ + || test "$enable_static" = no) \ +&& LIBTOOL_OBJTYPES=SHARED:$LIBTOOL_OBJTYPES # Don't bother to remove the trailing :, it'll be ignored. # ## Finally: Run the klibtool configure command. LIBTOOL_OBJTYPES=$LIBTOOL_OBJTYPES RANLIB=$RANLIB \ - $LIBTOOL --config-dir $ac_aux_dir configure "$host" + $LIBTOOL --source-dir $ac_aux_dir --config-dir .. configure "$host" AC_MSG_RESULT($LIBTOOL_OBJTYPES) ])dnl dnl
--- a/kpathsea/bugs.texi +++ b/kpathsea/bugs.texi @@ -211,9 +211,9 @@ @vindex KPATHSEA_DEBUG @vindex kpathsea_debug You can also set the environment variable @code{KPATHSEA_DEBUG}; in this -case, you should use the numbers below. Also, if you run the program -under a debugger and set the variable @code{kpathsea_debug}, Also use -the numbers below +case, you should use the numbers below. If you run the program under a +debugger and set the variable @code{kpathsea_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 @@ -283,6 +283,26 @@ @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:} @@ -354,9 +374,10 @@ @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 MakeTeXPK fails. +* Unable to generate fonts:: If mktexpk fails. * TeX or Metafont failing:: Likely compiler bugs. +* Empty Makefiles:: When configure produces empty makefiles. * XtStrings:: When _XtStrings is undefined. * dlopen:: When dlopen is undefined. * ShellWidgetClass:: For dynamic linking troubles under OpenWindows. @@ -411,12 +432,12 @@ be searched for subdirectories if you didn't want it to be. @item -If the fonts (or whatever) don't already exist, @code{MakeTeXPK} (or -@code{MakeTeXMF} or @code{MakeTeXTFM}) will try to create them. If +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{MakeTeXPK}; the workaround is to generate the necessary +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}). @@ -466,11 +487,11 @@ @cindex unable to generate fonts @cindex font generation failures -This can happen if either @code{MakeTeXPK} hasn't been installed +This can happen if either @code{mktexpk} hasn't been installed properly, or if the local installation of Metafont isn't correct. @cindex Metafont installation -If @code{mf} is a command not found by @code{MakeTeXPK}, then you need +If @code{mf} is a command not found by @code{mktexpk}, then you need to install Metafont (@pxref{unixtex.ftp}). @cindex Metafont using the wrong resolution @@ -478,7 +499,7 @@ If Metafont runs, but generates fonts at the wrong resolution, you need to be sure the @samp{M} and @samp{D} lines in your Dvips configuration file match (@pxref{Config files,,, dvips, Dvips}). For example, if -@code{MakeTeXPK} is generating 300@dmn{dpi} fonts, but you need +@code{mktexpk} is generating 300@dmn{dpi} fonts, but you need 600@dmn{dpi} fonts, you should have: @example M ljfour @@ -536,7 +557,7 @@ @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; @pxref{Bugs,,, gcc, +recommend reporting a bug to the GCC mailing list; see @ref{Bugs,,, gcc, Using and Porting GNU CC}. @cindex compiler bugs, finding @@ -546,8 +567,17 @@ through @TeX{}'s (or whatever program's) data structures. Things are not helped by all-too-common bugs in the debugger itself. Good luck. +@cindex ANSI C +@cindex HP-UX, compiling on +@cindex compiling on HP-UX +One known cause of trouble is the way arrays are handled. Some of the +Pascal arrays have a lower index other than 0, and the C code will take +the pointer to the allocated memory, subtract the lower index, and use +the resulting pointer for the array. While this trick often works, ANSI +C doesn't guarantee that it will. It it known to fail on HP-UX 10 +mchines when the native compiler is used, unless the @samp{+u} compiler +switch was specified. Using GCC will work on this platform as well. -@ignore @node Empty Makefiles @subsubsection Empty Makefiles @@ -558,10 +588,11 @@ @cindex FreeBSD @code{configure} error @cindex Mach10 @code{configure} error @cindex AIX 4.1 @code{configure} error +@cindex NeXT @code{sed} error On some systems (NetBSD, FreeBSD, AIX 4.1, and Mach10), @code{configure} -cannot properly create the Makefiles. Instead, you get an error -something like this: +may fail to properly create the Makefiles. Instead, you get an error +which looks something like this: @example prompt$ ./configure @@ -580,7 +611,17 @@ @code{/bin/sh}. You can get Bash from @url{ftp://prep.ai.mit.edu/pub/gnu} and mirrors. +Another possible cause (reported for NeXT) is a bug in the @code{sed} +command. In that case the error may look like this: +@example +Unrecognized command: \@@^ac_include make/paths.make@@r make/paths.make +@end example + +In this case, installing GNU @code{sed} should solve the problem. You +can get GNU @code{sed} from the same places as Bash. + +@ignore @node wchar_t @subsubsection @code{wchar_t} @@ -718,7 +759,7 @@ @item Statically link the @code{Xmu} library into the executable. @item Avoid using @code{Xmu} at all. If you are compiling -Metafont, @pxref{Online Metafont graphics,,, web2c, Web2c}. If you are +Metafont, see @ref{Online Metafont graphics,,, web2c, Web2c}. If you are compiling Xdvi, see the @code{-DNOTOOL} option in @file{xdvik/INSTALL}. @item Ignore the errors. The binary runs fine regardless.
deleted file mode 100644 --- a/kpathsea/c-auto.h.in +++ /dev/null @@ -1,105 +0,0 @@ -/* c-auto.h.in. Generated automatically from configure.in by autoheader. */ -/* acconfig.h -- used by autoheader when generating c-auto.h.in. - - If you're thinking of editing acconfig.h to fix a configuration - problem, don't. Edit the c-auto.h file created by configure, - instead. Even better, fix configure to give the right answer. */ - -/* kpathsea/configure.in tests for these functions with - kb_AC_KLIBTOOL_REPLACE_FUNCS, and naturally Autoheader doesn't know - about that macro. Since the shared library stuff is all preliminary - anyway, I decided not to change Autoheader, but rather to hack them - in here. */ -#undef HAVE_BASENAME -#undef HAVE_PUTENV -#undef HAVE_STRCASECMP -#undef HAVE_STRTOL -#undef HAVE_STRSTR - - -/* Define if the closedir function returns void instead of int. */ -#undef CLOSEDIR_VOID - -/* Define to empty if the keyword does not work. */ -#undef const - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if your putenv doesn't waste space when the same environment - variable is assigned more than once, with different (malloced) - values. This is true only on NetBSD/FreeBSD, as far as I know. See - xputenv.c. */ -#undef SMART_PUTENV - -/* Define if you are using GNU libc or otherwise have global variables - `program_invocation_name' and `program_invocation_short_name'. */ -#undef HAVE_PROGRAM_INVOCATION_NAME - -/* all: Define to enable running scripts when missing input files. */ -#define MAKE_TEX_MF_BY_DEFAULT 0 -#define MAKE_TEX_PK_BY_DEFAULT 0 -#define MAKE_TEX_TEX_BY_DEFAULT 0 -#define MAKE_TEX_TFM_BY_DEFAULT 0 -#define MAKE_OMEGA_OFM_BY_DEFAULT 0 -#define MAKE_OMEGA_OCP_BY_DEFAULT 0 - -/* Define if you have the basename function. */ -#undef HAVE_BASENAME - -/* Define if you have the bcopy function. */ -#undef HAVE_BCOPY - -/* Define if you have the getwd function. */ -#undef HAVE_GETWD - -/* Define if you have the putenv function. */ -#undef HAVE_PUTENV - -/* Define if you have the strcasecmp function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the strstr function. */ -#undef HAVE_STRSTR - -/* Define if you have the strtol function. */ -#undef HAVE_STRTOL - -/* Define if you have the <assert.h> header file. */ -#undef HAVE_ASSERT_H - -/* Define if you have the <dirent.h> header file. */ -#undef HAVE_DIRENT_H - -/* Define if you have the <float.h> header file. */ -#undef HAVE_FLOAT_H - -/* Define if you have the <limits.h> header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the <ndir.h> header file. */ -#undef HAVE_NDIR_H - -/* Define if you have the <pwd.h> header file. */ -#undef HAVE_PWD_H - -/* Define if you have the <stdlib.h> header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the <string.h> header file. */ -#undef HAVE_STRING_H - -/* Define if you have the <sys/dir.h> header file. */ -#undef HAVE_SYS_DIR_H - -/* Define if you have the <sys/ndir.h> header file. */ -#undef HAVE_SYS_NDIR_H - -/* Define if you have the <sys/param.h> header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H
new file mode 100644 --- /dev/null +++ b/kpathsea/c-auto.in @@ -0,0 +1,121 @@ +/* c-auto.in. Generated automatically from configure.in by autoheader. */ +/* acconfig.h -- used by autoheader when generating c-auto.in. + + If you're thinking of editing acconfig.h to fix a configuration + problem, don't. Edit the c-auto.h file created by configure, + instead. Even better, fix configure to give the right answer. */ + +/* kpathsea: the version string. */ +#define KPSEVERSION "REPLACE-WITH-KPSEVERSION" +/* web2c: the version string. */ +#define WEB2CVERSION "REPLACE-WITH-WEB2CVERSION" + +/* kpathsea/configure.in tests for these functions with + kb_AC_KLIBTOOL_REPLACE_FUNCS, and naturally Autoheader doesn't know + about that macro. Since the shared library stuff is all preliminary + anyway, I decided not to change Autoheader, but rather to hack them + in here. */ +#undef HAVE_BASENAME +#undef HAVE_PUTENV +#undef HAVE_STRCASECMP +#undef HAVE_STRTOL +#undef HAVE_STRSTR + + +/* Define if the closedir function returns void instead of int. */ +#undef CLOSEDIR_VOID + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if your compiler understands prototypes. */ +#undef HAVE_PROTOTYPES + +/* Define if your putenv doesn't waste space when the same environment + variable is assigned more than once, with different (malloced) + values. This is true only on NetBSD/FreeBSD, as far as I know. See + xputenv.c. */ +#undef SMART_PUTENV + +/* Define if getcwd if 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 if you are using GNU libc or otherwise have global variables + `program_invocation_name' and `program_invocation_short_name'. */ +#undef HAVE_PROGRAM_INVOCATION_NAME + +/* all: Define to enable running scripts when missing input files. */ +#define MAKE_TEX_MF_BY_DEFAULT 0 +#define MAKE_TEX_PK_BY_DEFAULT 0 +#define MAKE_TEX_TEX_BY_DEFAULT 0 +#define MAKE_TEX_TFM_BY_DEFAULT 0 +#define MAKE_OMEGA_OFM_BY_DEFAULT 0 +#define MAKE_OMEGA_OCP_BY_DEFAULT 0 + +/* Define if you have the basename function. */ +#undef HAVE_BASENAME + +/* Define if you have the bcopy function. */ +#undef HAVE_BCOPY + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getwd function. */ +#undef HAVE_GETWD + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strstr function. */ +#undef HAVE_STRSTR + +/* Define if you have the strtol function. */ +#undef HAVE_STRTOL + +/* Define if you have the <assert.h> header file. */ +#undef HAVE_ASSERT_H + +/* Define if you have the <dirent.h> header file. */ +#undef HAVE_DIRENT_H + +/* Define if you have the <float.h> header file. */ +#undef HAVE_FLOAT_H + +/* Define if you have the <limits.h> header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the <ndir.h> header file. */ +#undef HAVE_NDIR_H + +/* Define if you have the <pwd.h> header file. */ +#undef HAVE_PWD_H + +/* Define if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define if you have the <sys/dir.h> header file. */ +#undef HAVE_SYS_DIR_H + +/* Define if you have the <sys/ndir.h> header file. */ +#undef HAVE_SYS_NDIR_H + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H
--- a/kpathsea/c-dir.h +++ b/kpathsea/c-dir.h @@ -19,6 +19,12 @@ #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> @@ -41,4 +47,6 @@ #endif /* not DIRENT */ +#endif /* not WIN32 */ + #endif /* not KPATHSEA_C_DIR_H */
--- a/kpathsea/c-fopen.h +++ b/kpathsea/c-fopen.h @@ -34,23 +34,16 @@ /* How to open a binary file for reading: */ #ifndef FOPEN_RBIN_MODE -#ifdef DOS -#define FOPEN_RBIN_MODE "r+b" -#else -#if defined (VMS) || defined (VMCMS) || defined (OS2) || defined (WIN32) +#if defined (VMS) || defined (VMCMS) || defined(DOS) || defined (OS2) || defined (WIN32) || defined (__DJGPP__) || defined (__CYGWIN32__) #define FOPEN_RBIN_MODE "rb" #else #define FOPEN_RBIN_MODE "r" -#endif /* not (VM/CMS or VMS or OS2 or WIN32) */ -#endif /* not DOS */ +#endif /* not (VM/CMS or VMS or DOS or OS2 or WIN32 or __DJGPP__ or __CYGWIN32__) */ #endif /* not FOPEN_RBIN_MODE */ /* How to open a binary file for writing: */ #ifndef FOPEN_WBIN_MODE -#ifdef DOS -#define FOPEN_WBIN_MODE "w+b" -#else -#if defined (OS2) || defined (WIN32) +#if defined (DOS) || defined (OS2) || defined (WIN32) || defined (__DJGPP__) || defined (__CYGWIN32__) #define FOPEN_WBIN_MODE "wb" #else #ifdef VMCMS @@ -58,8 +51,37 @@ #else #define FOPEN_WBIN_MODE "w" #endif /* not VM/CMS */ -#endif /* not (OS2 or WIN32) */ -#endif /* not DOS */ +#endif /* not (DOS or OS2 or WIN32 or DJGPP or CYGWIN32) */ #endif /* not FOPEN_WBIN_MODE */ +/* How to open a binary file for appending: */ +#ifndef FOPEN_ABIN_MODE +#if defined (DOS) || defined (OS2) || defined (WIN32) || defined (__DJGPP__) || defined (__CYGWIN32__) +#define FOPEN_ABIN_MODE "ab" +#else +#define FOPEN_ABIN_MODE "a" +#endif /* not (DOS or OS2 or WIN32 or DJGPP or CYGWIN32) */ +#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. */ +#include <fcntl.h> +#ifdef DOSISH +#include <io.h> +#ifndef O_BINARY +#ifdef _O_BINARY +#define O_BINARY _O_BINARY +#endif +#endif +#if defined (__DJGPP__) || defined (WIN32) || defined (__CYGWIN32__) +#define SET_BINARY(f) setmode((f), O_BINARY) +#endif +#else /* not DOSISH */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif +#define SET_BINARY(f) 0 +#endif /* not DOSISH */ + #endif /* not C_FOPEN_H */
--- a/kpathsea/c-pathch.h +++ b/kpathsea/c-pathch.h @@ -34,8 +34,7 @@ #define DIR_SEP '/' #define DIR_SEP_STRING "/" #define IS_DEVICE_SEP(ch) ((ch) == ':') -#define NAME_BEGINS_WITH_DEVICE(name) \ - (ISALPHA(*(name)) && IS_DEVICE_SEP((name)[1])) +#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) == '\\') #else
--- a/kpathsea/c-proto.h +++ b/kpathsea/c-proto.h @@ -19,7 +19,10 @@ #ifndef KPATHSEA_C_PROTO_H #define KPATHSEA_C_PROTO_H -#if !defined(WIN32) || (defined(_DLL) && !defined(_IMPORT)) +#if !defined(WIN32) +#define DllImport +#define __cdecl +#elif (defined(_DLL) && !defined(_IMPORT)) || !defined(_DLL) #define DllImport #else #define DllImport __declspec(dllimport) @@ -30,7 +33,7 @@ definitions. Cf. <ansidecl.h> from the GNU C library. P1H(void) also works for definitions of routines which take no args. */ -#if __STDC__ +#ifdef HAVE_PROTOTYPES #define AA(args) args /* For an arbitrary number; ARGS must be in parens. */ @@ -40,6 +43,7 @@ #define P4H(p1,p2,p3,p4) (p1, p2, p3, p4) #define P5H(p1,p2,p3,p4,p5) (p1, p2, p3, p4, p5) #define P6H(p1,p2,p3,p4,p5,p6) (p1, p2, p3, p4, p5, p6) +#define P7H(p1,p2,p3,p4,p5,p6,p7) (p1, p2, p3, p4, p5, p6, p7) #define P1C(t1,n1)(t1 n1) #define P2C(t1,n1, t2,n2)(t1 n1, t2 n2) @@ -49,17 +53,20 @@ (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5) #define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) \ (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6) +#define P7C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7) \ + (t1 n1, t2 n2, t3 n3, t4 n4, t5 n5, t6 n6, t7 n7) -#else /* not __STDC__ */ +#else /* not HAVE_PROTOTYPES */ #define AA(args) () - + #define P1H(p1) () #define P2H(p1, p2) () #define P3H(p1, p2, p3) () #define P4H(p1, p2, p3, p4) () #define P5H(p1, p2, p3, p4, p5) () #define P6H(p1, p2, p3, p4, p5, p6) () +#define P7H(p1, p2, p3, p4, p5, p6, p7) () #define P1C(t1,n1) (n1) t1 n1; #define P2C(t1,n1, t2,n2) (n1,n2) t1 n1; t2 n2; @@ -70,7 +77,10 @@ t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; #define P6C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6) (n1,n2,n3,n4,n5,n6) \ t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; +#define P7C(t1,n1, t2,n2, t3,n3, t4,n4, t5,n5, t6,n6, t7,n7) \ + (n1,n2,n3,n4,n5,n6,n7) \ + t1 n1; t2 n2; t3 n3; t4 n4; t5 n5; t6 n6; t7 n7; -#endif /* not __STDC__ */ +#endif /* not HAVE_PROTOTYPES */ #endif /* not KPATHSEA_C_PROTO_H */
--- a/kpathsea/c-stat.h +++ b/kpathsea/c-stat.h @@ -23,8 +23,7 @@ #include <sys/stat.h> #ifdef WIN32 -#include <io.h> -#define stat _stat +#include <kpathsea/win32lib.h> #endif /* WIN32 */ /* POSIX predicates for testing file attributes. */
--- a/kpathsea/c-vararg.h +++ b/kpathsea/c-vararg.h @@ -19,13 +19,13 @@ #ifndef C_VARARG_H #define C_VARARG_H -/* See `kpathsea/init-path.c' for an example of use. The idea is to say - PVAR1(type1, parameter1, ap) in the function header, and then end - the function with two }}'s. We do this to avoid having to specify - the argument list (with types) twice -- once in the function header, - and once in a (hypothetical) VA_START1. */ +/* See function `init_path' in `kpathsea/tex-file.c' for an example of use. + The idea is to say PVAR1C(type1, parameter1, ap) in the function header, + and then end the function with two }}'s. We do this to avoid having to + specify the argument list (with types) twice -- once in the function + header, and once in a (hypothetical) VA_START1. */ -#if __STDC__ +#ifdef HAVE_PROTOTYPES #include <stdarg.h> #define PVAR1H(p1) (p1, ...) @@ -39,7 +39,7 @@ #define PVAR3C(t1, n1, t2, n2, t3, n3, ap) \ (t1 n1, t2 n2, t3 n3, ...) { va_list ap; va_start (ap, n3); -#else /* not __STDC__ */ +#else /* not HAVE_PROTOTYPES */ #include <varargs.h> #define PVAR1H(p1) () @@ -56,6 +56,6 @@ (va_alist) va_dcl { t1 n1; t2 n2; t3 n3; va_list ap; va_start (ap); \ n1 = va_arg (ap, t1); n2 = va_arg (ap, t2); \ n3 = va_arg (ap, t3); -#endif /* not __STDC__ */ +#endif /* not HAVE_PROTOTYPES */ #endif /* not C_VARARG_H */
--- a/kpathsea/cnf.c +++ b/kpathsea/cnf.c @@ -94,8 +94,8 @@ prog[len] = 0; /* If we are running `prog', fine; otherwise, we're done. */ - assert (program_invocation_short_name); - if (!FILESTRCASEEQ (prog, program_invocation_short_name)) { + assert (kpse_program_name); + if (!FILESTRCASEEQ (prog, kpse_program_name)) { free (prog); free (var); return; @@ -143,7 +143,9 @@ #endif #endif -#if !defined (ALLOW_SEMICOLON_IN_FILENAMES) && defined (unix) +/* DJGPP defines `unix' (for portability), but generates MSDOS programs. */ +#ifndef __DJGPP__ +#if !defined (ALLOW_SEMICOLON_IN_FILENAMES) && defined (unix) { string loc; for (loc = value; *loc; loc++) { @@ -152,6 +154,7 @@ } } #endif +#endif /* We want TEXINPUTS.prog to override plain TEXINPUTS. The simplest way is to put both in the hash table (so we don't have to write @@ -238,9 +241,9 @@ kpse_init_db (); } - /* First look up NAME.`program_invocation_short_name', then NAME. */ - assert (program_invocation_short_name); - try = concat3 (name, ".", program_invocation_short_name); + /* First look up NAME.`kpse_program_name', then NAME. */ + assert (kpse_program_name); + try = concat3 (name, ".", kpse_program_name); ret_list = hash_lookup (cnf_hash, try); if (ret_list) { ret = *ret_list;
--- a/kpathsea/common.ac +++ b/kpathsea/common.ac @@ -2,11 +2,15 @@ dnl use the m4 `sinclude' builtin instead of `include', since Autoconf dnl disables `include'.) +dnl These configure scripts won't work with anything else. +AC_PREREQ(2.12) + dnl Write output here, instead of putting a zillion -D's on the command line. -AC_CONFIG_HEADER(c-auto.h) +AC_CONFIG_HEADER(c-auto.h:c-auto.in) AC_PROG_CC AC_PROG_INSTALL +AC_PROG_LN_S AC_PROG_MAKE_SET AC_HEADER_DIRENT @@ -28,10 +32,20 @@ dnl If the list of functions here changes, also change acconfig.h. */ kb_AC_KLIBTOOL_REPLACE_FUNCS(basename putenv strcasecmp strtol strstr) -AC_CHECK_FUNCS(bcopy getwd) +AC_CHECK_FUNCS(bcopy getcwd getwd) AC_C_CONST +# Check whether prototypes work. +AC_MSG_CHECKING(whether the compiler accepts prototypes) +AC_CACHE_VAL(kb_cv_c_prototypes, +[AC_TRY_COMPILE([#include <stdarg.h>], [extern void foo(int i,...);], + kb_cv_c_prototypes=yes, kb_cv_c_prototypes=no)])dnl +AC_MSG_RESULT($kb_cv_c_prototypes) +if test "$kb_cv_c_prototypes" = yes; then + AC_DEFINE(HAVE_PROTOTYPES) +fi + # This is a GNU libc invention. AC_MSG_CHECKING(whether program_invocation_name is predefined) AC_CACHE_VAL(kb_cv_var_program_inv_name, @@ -105,5 +119,25 @@ AC_DEFINE(SMART_PUTENV) fi +if test $ac_cv_func_getcwd = yes; then +# We only need to run this if we have getcwd. +AC_MSG_CHECKING(whether getcwd uses fork or vfork) +AC_CACHE_VAL(kb_cv_func_getcwd_forks, +[AC_TRY_RUN([ +int fork() { exit(1); } +int vfork() { exit(1); } +extern char *getcwd(); +char path[100]; +int main() { +getcwd(path,100); +return 0; +}], kb_cv_func_getcwd_forks=no, kb_cv_func_getcwd_forks=yes, + kb_cv_func_getcwd_forks=no)])dnl +AC_MSG_RESULT($kb_cv_func_getcwd_forks) +if test $kb_cv_func_getcwd_forks = yes; then + AC_DEFINE(GETCWD_FORKS) +fi +fi + # Common --with and --enable options. -sinclude(../kpathsea/withenable.ac) +sinclude(withenable.ac)
--- a/kpathsea/config.guess +++ b/kpathsea/config.guess @@ -52,11 +52,53 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` + cat <<EOF >dummy.s + .globl main + .ent main +main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 @@ -68,11 +110,32 @@ echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) - echo m68k-cbm-openbsd${UNAME_RELEASE} - exit 0 ;; + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; @@ -111,6 +174,18 @@ sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; @@ -118,19 +193,25 @@ echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) - echo m68k-atari-openbsd${UNAME_RELEASE} + echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) - echo m68k-sun-openbsd${UNAME_RELEASE} + echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) - echo m68k-apple-openbsd${UNAME_RELEASE} + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} @@ -144,6 +225,9 @@ VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >dummy.c int main (argc, argv) int argc; char **argv; { @@ -378,8 +462,8 @@ hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; - hp3[0-9][05]:OpenBSD:*:*) - echo m68k-hp-openbsd${UNAME_RELEASE} + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -396,6 +480,9 @@ i*:CYGWIN*:*) echo i386-pc-cygwin32 exit 0 ;; + i*:MINGW*:*) + echo i386-pc-mingw32 + exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin32 exit 0 ;; @@ -403,33 +490,79 @@ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,-.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. ld_help_string=`ld --help 2>&1` - if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then - echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then - echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then - echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then - echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then - echo "powerpc-unknown-linux-gnu" ; exit 0 - elif test "${UNAME_MACHINE}" = "alpha" ; then - echo alpha-unknown-linux-gnu ; exit 0 - elif test "${UNAME_MACHINE}" = "sparc" ; then - echo sparc-unknown-linux-gnu ; exit 0 + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <<EOF >dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + LIBC="" + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >dummy.c <<EOF main(argc, argv) -int argc; -char *argv[]; + int argc; + char *argv[]; { #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); @@ -443,20 +576,41 @@ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 rm -f dummy.c dummy else - # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us - # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. - test ! -d /usr/lib/ldscripts/. \ - && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac # Determine whether the default compiler is a.out or elf cat >dummy.c <<EOF +#include <features.h> main(argc, argv) -int argc; -char *argv[]; + int argc; + char *argv[]; { #ifdef __ELF__ - printf ("%s-pc-linux-gnu\n", argv[1]); +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif #else - printf ("%s-pc-linux-gnuaout\n", argv[1]); + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } @@ -469,6 +623,14 @@ i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} @@ -490,6 +652,11 @@ echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; @@ -565,6 +732,9 @@ mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE}
--- a/kpathsea/config.h +++ b/kpathsea/config.h @@ -1,7 +1,7 @@ /* config.h: master configuration file, included first by all compilable source files (not headers). -Copyright (C) 1993, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1993, 95, 96, 97 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -20,15 +20,40 @@ #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 VMCMS VMS WIN32. I do not use any of these systems + myself; if you do, I'd be grateful for any changes. --kb@mail.tug.org */ + +/* If we have either DOS or OS2, we are DOSISH. */ +#if defined (DOS) || defined (OS2) || defined (WIN32) || defined(__MSDOS__) +#define DOSISH +#endif + +#if defined (DOSISH) +#define MONOCASE_FILENAMES /* case-insensitive filename comparisons */ +#endif + #ifdef WIN32 #define __STDC__ 1 -#include "../win32/win32-compat.h" +#include <kpathsea/win32lib.h> #endif /* not WIN32 */ +#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 32 +#endif + /* System dependencies that are figured out by `configure'. If we are compiling standalone, we get our c-auto.h. Otherwise, the package containing us must provide this (unless it can somehow generate ours - from c-auto.h.in). We use <...> instead of "..." so that the current + from c-auto.in). We use <...> instead of "..." so that the current cpp directory (i.e., kpathsea/) won't be searched. */ #include <c-auto.h> @@ -41,21 +66,15 @@ #include <kpathsea/types.h> /* <sys/types.h>, boolean, string, etc. */ #include <kpathsea/progname.h> /* for program_invocation_*name */ -/* 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 VMCMS VMS WIN32. I do not use any of these systems - myself; if you do, I'd be grateful for any changes. --kb@mail.tug.org */ -/* If we have either DOS or OS2, we are DOSISH. */ -#if defined (DOS) || defined (OS2) || defined (WIN32) -#define DOSISH -#endif - /* 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 (DOSISH) && !defined (VMS) && !defined (VMCMS) +#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
--- a/kpathsea/config.sub +++ b/kpathsea/config.sub @@ -1,6 +1,6 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -149,13 +149,14 @@ case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ - | arme[lb] | pyramid \ + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 \ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | i370 | sh \ - | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel \ - | sparc | sparclet | sparclite | sparc64) + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) basic_machine=$basic_machine-unknown ;; # We use `pc' rather than `unknown' @@ -170,14 +171,18 @@ exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) + vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -204,9 +209,9 @@ amiga | amiga-*) basic_machine=m68k-cbm ;; - amigados) + amigaos | amigados) basic_machine=m68k-cbm - os=-amigados + os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm @@ -391,11 +396,11 @@ ;; mipsel*-linux*) basic_machine=mipsel-unknown - os=-linux + os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown - os=-linux + os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` @@ -566,6 +571,12 @@ basic_machine=i386-sequent os=-dynix ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -585,7 +596,7 @@ basic_machine=vax-dec os=-vms ;; - vpp*|vx|vx-*) + vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) @@ -615,7 +626,7 @@ # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) - if [ x$os = x-linux ]; then + if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips @@ -680,9 +691,12 @@ -solaris) os=-solaris2 ;; - -unixware* | svr4*) + -svr4*) os=-sysv4 ;; + -unixware*) + os=-sysv4.2uw + ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; @@ -693,7 +707,8 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ @@ -701,7 +716,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -linux-gnu* | -uxpv*) + | -mingw32* | -linux-gnu* | -uxpv*) # Remember, each alternative MUST END IN *, to match a version number. ;; -linux*) @@ -827,7 +842,7 @@ os=-sysv ;; *-cbm) - os=-amigados + os=-amigaos ;; *-dg) os=-dgux
new file mode 100755 --- /dev/null +++ b/kpathsea/configure @@ -0,0 +1,2232 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.12 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-shared build shared libraries [default=no]" +ac_help="$ac_help + --enable-static build static libraries [default=yes]" +ac_help="$ac_help + --without-mktexmf-default do not run mktexmf if MF source missing" +ac_help="$ac_help + --without-mktexpk-default do not run mktexpk if PK font missing" +ac_help="$ac_help + --without-mktextfm-default do not run mktextfm if TFM file missing" +ac_help="$ac_help + --without-mkocp-default do not run mkocp if OCP file missing" +ac_help="$ac_help + --without-mkofm-default do not run mkofm if OFM file missing" +ac_help="$ac_help + --enable-multiplatform put executables in bin/PLATFORM" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -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 ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$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" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$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) + # 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 << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --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 +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$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" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + 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) + 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" ;; + + -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 ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.12" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=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" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=pathsearch.c + +# 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 its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + 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 + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +KPSEVERSION=3.2 + +cat >> confdefs.h <<EOF +#define KPSEVERSION "kpathsea version $KPSEVERSION" +EOF + + + + + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:554: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:583: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_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 $# -gt 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 + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:631: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <<EOF +#line 641 "configure" +#include "confdefs.h" +main(){return(0);} +EOF +if { (eval echo configure:645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:665: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:670: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:694: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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 + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +# 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 +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:751: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&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_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:801: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:822: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:854: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 859 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <$ac_hdr> +int main() { +DIR *dirp = 0; +; return 0; } +EOF +if { (eval echo configure:867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_dirent_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + ac_header_dirent=$ac_hdr; break +else + echo "$ac_t""no" 1>&6 +fi +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:892: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldir $LIBS" +cat > conftest.$ac_ext <<EOF +#line 900 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir(); + +int main() { +opendir() +; return 0; } +EOF +if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 +fi + +else +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:933: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lx $LIBS" +cat > conftest.$ac_ext <<EOF +#line 941 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir(); + +int main() { +opendir() +; return 0; } +EOF +if { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:975: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext <<EOF +#line 990 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext <<EOF +#line 1007 "configure" +#include "confdefs.h" +#include <assert.h> +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1036: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1041 "configure" +#include "confdefs.h" +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext <<EOF +#line 1066 "configure" +#include "confdefs.h" +#include <string.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + 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 > conftest.$ac_ext <<EOF +#line 1084 "configure" +#include "confdefs.h" +#include <stdlib.h> +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + 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 > conftest.$ac_ext <<EOF +#line 1105 "configure" +#include "confdefs.h" +#include <ctype.h> +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#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)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6 +echo "configure:1140: checking whether closedir returns void" >&5 +if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_closedir_void=yes +else + cat > conftest.$ac_ext <<EOF +#line 1148 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <$ac_header_dirent> +int closedir(); main() { exit(closedir(opendir(".")) != 0); } +EOF +if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_func_closedir_void=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_closedir_void=yes +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$ac_cv_func_closedir_void" 1>&6 +if test $ac_cv_func_closedir_void = yes; then + cat >> confdefs.h <<\EOF +#define CLOSEDIR_VOID 1 +EOF + +fi + +for ac_hdr in assert.h float.h limits.h memory.h pwd.h stdlib.h \ + string.h sys/param.h unistd.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1181: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1186 "configure" +#include "confdefs.h" +#include <$ac_hdr> +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <<EOF +#define $ac_tr_hdr 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + + + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1223: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1256: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + + + +# +echo $ac_n "checking for libtool object types""... $ac_c" 1>&6 +echo "configure:1280: checking for libtool object types" >&5 +# +## Check that the klibtool script is in ac_aux_dir. Don't bother to +# scan PATH. For one thing, if we found it somewhere there, we couldn't +# use that directory to put the config file ... and that's what we need +# to do, to avoid having to configure in every subdirectory. +LIBTOOL=$ac_aux_dir/klibtool + +if test ! -r $LIBTOOL; then + { echo "configure: error: klibtool not in $ac_aux_dir, goodbye" 1>&2; exit 1; } + exit 1 +fi +# +## Argument parsing: we support --enable-shared and --enable-static. +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + : +else + enable_shared=no +fi + +# +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + : +else + enable_static=yes +fi + +# +# If they explicitly --enable-static, make that the link type. +# More commonly, they will just --enable-shared; make that the link type. +# If they --disable-static, implicitly --enable-shared. +# In any case, prepend to any existing LIBTOOL_OBJTYPES. +# If they really want to build both and link statically, +# then they set LIBTOOL_OBJTYPES to SHARED and --enable-static. +test "$enable_static" = yes && LIBTOOL_OBJTYPES=STATIC:$LIBTOOL_OBJTYPES +(test "$enable_shared" = yes \ + || test "$enable_static" = no) \ +&& LIBTOOL_OBJTYPES=SHARED:$LIBTOOL_OBJTYPES +# Don't bother to remove the trailing :, it'll be ignored. +# +## Finally: Run the klibtool configure command. +LIBTOOL_OBJTYPES=$LIBTOOL_OBJTYPES RANLIB=$RANLIB \ + $LIBTOOL --source-dir $ac_aux_dir --config-dir .. configure "$host" +echo "$ac_t""$LIBTOOL_OBJTYPES" 1>&6 + + for ac_func in basename putenv strcasecmp strtol strstr +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1332: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1337 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* 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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +LTLIBOBJS="$LTLIBOBJS $ac_func.lo" +fi +done + + + +for ac_func in bcopy getcwd getwd +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1390: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1395 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* 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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <<EOF +#define $ac_tr_func 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi +done + + +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:1444: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1449 "configure" +#include "confdefs.h" + +int main() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* 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"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 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 saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + +# Check whether prototypes work. +echo $ac_n "checking whether the compiler accepts prototypes""... $ac_c" 1>&6 +echo "configure:1521: checking whether the compiler accepts prototypes" >&5 +if eval "test \"`echo '$''{'kb_cv_c_prototypes'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1526 "configure" +#include "confdefs.h" +#include <stdarg.h> +int main() { +extern void foo(int i,...); +; return 0; } +EOF +if { (eval echo configure:1533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + kb_cv_c_prototypes=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + kb_cv_c_prototypes=no +fi +rm -f conftest* +fi +echo "$ac_t""$kb_cv_c_prototypes" 1>&6 +if test "$kb_cv_c_prototypes" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PROTOTYPES 1 +EOF + +fi + +# This is a GNU libc invention. +echo $ac_n "checking whether program_invocation_name is predefined""... $ac_c" 1>&6 +echo "configure:1554: checking whether program_invocation_name is predefined" >&5 +if eval "test \"`echo '$''{'kb_cv_var_program_inv_name'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1559 "configure" +#include "confdefs.h" + +int main() { +extern char *program_invocation_name; program_invocation_name = "love"; +; return 0; } +EOF +if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + kb_cv_var_program_inv_name=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + kb_cv_var_program_inv_name=no +fi +rm -f conftest* +fi +echo "$ac_t""$kb_cv_var_program_inv_name" 1>&6 +if test "$kb_cv_var_program_inv_name" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PROGRAM_INVOCATION_NAME 1 +EOF + +fi + +# Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment. +# This test program is due to Mike Hibler <mike@cs.utah.edu>. +# We don't actually need to run this if we don't have putenv, but it +# doesn't hurt. +echo $ac_n "checking whether putenv uses malloc""... $ac_c" 1>&6 +echo "configure:1590: checking whether putenv uses malloc" >&5 +if eval "test \"`echo '$''{'kb_cv_func_putenv_malloc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + kb_cv_func_putenv_malloc=no +else + cat > conftest.$ac_ext <<EOF +#line 1598 "configure" +#include "confdefs.h" + +#define VAR "YOW_VAR" +#define STRING1 "GabbaGabbaHey" +#define STRING2 "Yow!!" /* should be shorter than STRING1 */ +extern char *getenv (); /* in case char* and int don't mix gracefully */ +main () +{ + char *str1, *rstr1, *str2, *rstr2; + str1 = getenv (VAR); + if (str1) + exit (1); + str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1); + if (str1 == 0) + exit (2); + strcpy (str1, VAR); + strcat (str1, "="); + strcat (str1, STRING1); + if (putenv (str1) < 0) + exit (3); + rstr1 = getenv (VAR); + if (rstr1 == 0) + exit (4); + rstr1 -= strlen (VAR) + 1; + if (strncmp (rstr1, VAR, strlen (VAR))) + exit (5); + str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1); + if (str2 == 0 || str1 == str2) + exit (6); + strcpy (str2, VAR); + strcat (str2, "="); + strcat (str2, STRING2); + if (putenv (str2) < 0) + exit (7); + rstr2 = getenv (VAR); + if (rstr2 == 0) + exit (8); + rstr2 -= strlen (VAR) + 1; +#if 0 + printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2); + /* + * If string from first call was reused for the second call, + * you had better not do a free on the first string! + */ + if (rstr1 == rstr2) + printf ("#define SMART_PUTENV\n"); + else + printf ("#undef SMART_PUTENV\n"); +#endif + exit (rstr1 == rstr2 ? 0 : 1); +} +EOF +if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + kb_cv_func_putenv_malloc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + kb_cv_func_putenv_malloc=no +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$kb_cv_func_putenv_malloc" 1>&6 +if test $kb_cv_func_putenv_malloc = yes; then + cat >> confdefs.h <<\EOF +#define SMART_PUTENV 1 +EOF + +fi + +if test $ac_cv_func_getcwd = yes; then +# We only need to run this if we have getcwd. +echo $ac_n "checking whether getcwd uses fork or vfork""... $ac_c" 1>&6 +echo "configure:1675: checking whether getcwd uses fork or vfork" >&5 +if eval "test \"`echo '$''{'kb_cv_func_getcwd_forks'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + kb_cv_func_getcwd_forks=no +else + cat > conftest.$ac_ext <<EOF +#line 1683 "configure" +#include "confdefs.h" + +int fork() { exit(1); } +int vfork() { exit(1); } +extern char *getcwd(); +char path[100]; +int main() { +getcwd(path,100); +return 0; +} +EOF +if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + kb_cv_func_getcwd_forks=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + kb_cv_func_getcwd_forks=yes +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$kb_cv_func_getcwd_forks" 1>&6 +if test $kb_cv_func_getcwd_forks = yes; then + cat >> confdefs.h <<\EOF +#define GETCWD_FORKS 1 +EOF + +fi +fi + +# Common --with and --enable options. + +# Check whether --with-mktexmf-default or --without-mktexmf-default was given. +if test "${with_mktexmf_default+set}" = set; then + withval="$with_mktexmf_default" + : +else + withval=yes +fi + +if test "x$withval" = xyes; then + cat >> confdefs.h <<\EOF +#define MAKE_TEX_MF_BY_DEFAULT 1 +EOF + +fi +# Check whether --with-mktexpk-default or --without-mktexpk-default was given. +if test "${with_mktexpk_default+set}" = set; then + withval="$with_mktexpk_default" + : +else + withval=yes +fi + +if test "x$withval" = xyes; then + cat >> confdefs.h <<\EOF +#define MAKE_TEX_PK_BY_DEFAULT 1 +EOF + +fi +# Check whether --with-mktextfm-default or --without-mktextfm-default was given. +if test "${with_mktextfm_default+set}" = set; then + withval="$with_mktextfm_default" + : +else + withval=yes +fi + +if test "x$withval" = xyes; then + cat >> confdefs.h <<\EOF +#define MAKE_TEX_TFM_BY_DEFAULT 1 +EOF + +fi +# Check whether --with-mkocp-default or --without-mkocp-default was given. +if test "${with_mkocp_default+set}" = set; then + withval="$with_mkocp_default" + : +else + withval=yes +fi + +if test "x$withval" = xyes; then + cat >> confdefs.h <<\EOF +#define MAKE_OMEGA_OCP_BY_DEFAULT 1 +EOF + +fi +# Check whether --with-mkofm-default or --without-mkofm-default was given. +if test "${with_mkofm_default+set}" = set; then + withval="$with_mkofm_default" + : +else + withval=yes +fi + +if test "x$withval" = xyes; then + cat >> confdefs.h <<\EOF +#define MAKE_OMEGA_OFM_BY_DEFAULT 1 +EOF + +fi + + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:1797: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`$ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +# Check whether --enable-multiplatform or --disable-multiplatform was given. +if test "${enable_multiplatform+set}" = set; then + enableval="$enable_multiplatform" + if test "x$enable_multiplatform" = xyes && + test "x$bindir" = 'x${exec_prefix}/bin' +then + bindir="$bindir/$host" +fi +fi + + +echo $ac_n "checking where the main texmf tree is located""... $ac_c" 1>&6 +echo "configure:1829: checking where the main texmf tree is located" >&5 +texmfmain= +if test "x$datadir" != 'x${prefix}/share'; then + # First case, datadir is defined... + eval p=\"$datadir\" + if test -d "$p/texmf"; then + texmfmain="$p/texmf" + fi +else + # Second case, datadir is default... + if test "x$prefix" = "xNONE"; then + p="$ac_default_prefix" + else + eval p=\"$prefix\" + fi + for e in share/texmf lib/texmf texmf; do + if test -d "$p/$e"; then + texmfmain="$p/$e" + break + fi + done +fi +texmfmain=`echo "$texmfmain" | sed 's,//*,/,g'` +if test -n "$texmfmain"; then + echo "$ac_t"""$texmfmain"" 1>&6 +else + echo "$ac_t""not found" 1>&6 + echo "configure: warning: The main texmf tree was not found. + Specify the location of its parent directory with the --datadir option. + If you do not have the files, you can retrieve a minimal set from + ftp://ftp.tug.org/tex/texmflib.tar.gz, which is mirrored on CTAN hosts + in systems/web2c. Winging it by using the default location." 1>&2 + texmfmain="$datadir/texmf" +fi + + + + +trap '' 1 2 15 +cat > confcache <<\EOF +# 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. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# 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. +(set) 2>&1 | + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS <<EOF +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.12" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir +ac_given_INSTALL="$INSTALL" + +trap 'rm -fr `echo "Makefile c-auto.h:c-auto.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS <<EOF + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@KPSEVERSION@%$KPSEVERSION%g +s%@CC@%$CC%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@LN_S@%$LN_S%g +s%@SET_MAKE@%$SET_MAKE%g +s%@CPP@%$CPP%g +s%@RANLIB@%$RANLIB%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@LIBTOOL@%$LIBTOOL%g +s%@LTLIBOBJS@%$LTLIBOBJS%g +s%@texmfmain@%$texmfmain%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <<EOF + +CONFIG_FILES=\${CONFIG_FILES-"Makefile"} +EOF +cat >> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <<EOF + CONFIG_HEADERS="c-auto.h:c-auto.in" +EOF +cat >> $CONFIG_STATUS <<\EOF +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #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. +cat >> conftest.vals <<\EOF +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + +EOF +cat >> $CONFIG_STATUS <<EOF + +EOF +cat >> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + +date >stamp-auto
--- a/kpathsea/configure.in +++ b/kpathsea/configure.in @@ -1,6 +1,12 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(pathsearch.c) +KPSEVERSION=3.2 +AC_SUBST(KPSEVERSION) +AC_DEFINE_UNQUOTED(KPSEVERSION, "kpathsea version $KPSEVERSION") + sinclude(common.ac) AC_OUTPUT(Makefile) +dnl Update stamp-auto, since we just remade `c-auto.h'. +date >stamp-auto
--- a/kpathsea/db.c +++ b/kpathsea/db.c @@ -30,8 +30,11 @@ #include <kpathsea/variable.h> static hash_table_type db; /* The hash table for all the ls-R's. */ +/* SMALL: The old size of the hash table was 7603, with the assumption + that a minimal ls-R bas about 3500 entries. But a typical ls-R will + be more like double that size. */ #ifndef DB_HASH_SIZE -#define DB_HASH_SIZE 7603 /* A minimal ls-R has about 3500 entries. */ +#define DB_HASH_SIZE 15991 #endif #ifndef DB_NAME #define DB_NAME "ls-R" @@ -166,7 +169,7 @@ if (db.buckets) { const_string dir_part; string fname = xstrdup (passed_fname); - string baseptr = (string) basename (fname); + string baseptr = (string)basename (fname); const_string file_part = xstrdup (baseptr); *baseptr = '\0'; /* Chop off the filename. */ @@ -185,9 +188,8 @@ { const_string original_filename = filename; boolean matched = false; - boolean done = false; - for (; !done && *filename && *path_elt; filename++, path_elt++) { + for (; *filename && *path_elt; filename++, path_elt++) { if (FILECHARCASEEQ (*filename, *path_elt)) /* normal character match */ ; @@ -199,7 +201,7 @@ /* Trailing //, matches anything. We could make this part of the other case, but it seems pointless to do the extra work. */ matched = true; - done = true; + break; } else { /* Intermediate //, have to match rest of PATH_ELT. */ for (; !matched && *filename; filename++) { @@ -208,11 +210,13 @@ && FILECHARCASEEQ (*filename, *path_elt)) matched = match (filename, path_elt); } + /* Prevent filename++ when *filename='\0'. */ + break; } } else /* normal character nonmatch, quit */ - done = true; + break; } /* If we've reached the end of PATH_ELT, check that we're at the last @@ -457,10 +461,10 @@ string db_file = concat (*db_dirs, try); boolean matched = match (db_file, path_elt); - #ifdef KPSE_DEBUG +#ifdef KPSE_DEBUG if (KPSE_DEBUG_P (KPSE_DEBUG_SEARCH)) DEBUGF3 ("db:match(%s,%s) = %d\n", db_file, path_elt, matched); - #endif +#endif /* We got a hit in the database. Now see if the file actually exists, possibly under an alias. */
--- a/kpathsea/db.h +++ b/kpathsea/db.h @@ -36,7 +36,7 @@ const_string path_elt, boolean all); /* Insert the filename FNAME into the database. - Called by MakeTeXPK et al. */ + Called by mktexpk et al. */ extern void kpse_db_insert P1H(const_string fname); #endif /* not KPATHSEA_DB_H */
--- a/kpathsea/debug.h +++ b/kpathsea/debug.h @@ -26,6 +26,29 @@ #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 @@ -44,7 +67,8 @@ #define KPSE_DEBUG_PATHS 3 /* search path initializations */ #define KPSE_DEBUG_EXPAND 4 /* path element expansion */ #define KPSE_DEBUG_SEARCH 5 /* searches */ -#define KPSE_LAST_DEBUG KPSE_DEBUG_SEARCH +#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)
new file mode 100644 --- /dev/null +++ b/kpathsea/depend.make @@ -0,0 +1,608 @@ +absolute.lo: absolute.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h +access.o: access.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +atou.lo: atou.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +basename.lo: basename.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +cnf.lo: cnf.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/cnf.h $(kpathsea_srcdir)/db.h $(kpathsea_srcdir)/str-list.h \ + $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/line.h $(kpathsea_dir)/paths.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h +concat.lo: concat.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +concat3.lo: concat3.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +concatn.lo: concatn.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/c-vararg.h +db.lo: db.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h $(kpathsea_srcdir)/db.h \ + $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/line.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h +debug.lo: debug.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +dir.lo: dir.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-dir.h \ + $(kpathsea_srcdir)/c-stat.h \ + $(kpathsea_srcdir)/hash.h +elt-dirs.lo: elt-dirs.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/expand.h $(kpathsea_srcdir)/fn.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/xopendir.h $(kpathsea_srcdir)/c-dir.h +expand.lo: expand.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/expand.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/tilde.h $(kpathsea_srcdir)/variable.h \ + $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/absolute.h +extend-fname.lo: extend-fname.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +file-p.lo: file-p.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/xstat.h $(kpathsea_srcdir)/c-stat.h +find-suffix.lo: find-suffix.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h +fn.lo: fn.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/fn.h +fontmap.lo: fontmap.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/fontmap.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/line.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/tex-file.h +getopt.lo: getopt.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +getopt1.lo: getopt1.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h getopt.h +hash.lo: hash.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/str-list.h +kdefault.lo: kdefault.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/default.h +kpsestat.o: kpsestat.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-stat.h +kpsewhich.o: kpsewhich.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/expand.h $(kpathsea_srcdir)/getopt.h \ + $(kpathsea_srcdir)/line.h $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/proginit.h $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/tex-glyph.h \ + $(kpathsea_srcdir)/variable.h +line.lo: line.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/line.h +magstep.lo: magstep.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/magstep.h +make-suffix.lo: make-suffix.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h +path-elt.lo: path-elt.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h +pathsearch.lo: pathsearch.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/expand.h \ + $(kpathsea_srcdir)/db.h $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/variable.h +proginit.lo: proginit.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/proginit.h $(kpathsea_srcdir)/tex-file.h +progname.lo: progname.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h $(kpathsea_srcdir)/c-stat.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/tex-file.h +putenv.lo: putenv.c +readable.lo: readable.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-stat.h \ + $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/tex-hush.h \ + $(kpathsea_srcdir)/truncate.h +readlink.o: readlink.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathmx.h $(kpathsea_srcdir)/c-stat.h +rm-suffix.lo: rm-suffix.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +str-list.lo: str-list.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/str-list.h +str-llist.lo: str-llist.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/str-llist.h +strcasecmp.lo: strcasecmp.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +strstr.lo: strstr.c +strtol.lo: strtol.c config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +tex-file.lo: tex-file.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/c-vararg.h $(kpathsea_srcdir)/cnf.h \ + $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/default.h $(kpathsea_srcdir)/expand.h \ + $(kpathsea_srcdir)/fontmap.h $(kpathsea_srcdir)/hash.h $(kpathsea_dir)/paths.h \ + $(kpathsea_srcdir)/pathsearch.h $(kpathsea_srcdir)/str-llist.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/tex-make.h $(kpathsea_srcdir)/variable.h +tex-glyph.lo: tex-glyph.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/absolute.h $(kpathsea_srcdir)/expand.h \ + $(kpathsea_srcdir)/fontmap.h $(kpathsea_srcdir)/hash.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/tex-glyph.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/tex-make.h $(kpathsea_srcdir)/variable.h +tex-hush.lo: tex-hush.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/pathsearch.h \ + $(kpathsea_srcdir)/str-llist.h $(kpathsea_srcdir)/tex-hush.h $(kpathsea_srcdir)/variable.h +tex-make.lo: tex-make.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-fopen.h \ + $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/concatn.h $(kpathsea_srcdir)/c-vararg.h \ + $(kpathsea_srcdir)/db.h $(kpathsea_srcdir)/str-list.h $(kpathsea_srcdir)/fn.h \ + $(kpathsea_srcdir)/magstep.h $(kpathsea_srcdir)/readable.h $(kpathsea_srcdir)/tex-make.h \ + $(kpathsea_srcdir)/tex-file.h $(kpathsea_srcdir)/variable.h +tilde.lo: tilde.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathch.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/tilde.h +truncate.lo: truncate.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-namemx.h $(kpathsea_srcdir)/c-pathch.h \ + $(kpathsea_srcdir)/c-ctype.h $(kpathsea_srcdir)/c-pathmx.h \ + $(kpathsea_srcdir)/truncate.h +uppercasify.lo: uppercasify.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h +variable.lo: variable.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-ctype.h \ + $(kpathsea_srcdir)/cnf.h $(kpathsea_srcdir)/fn.h $(kpathsea_srcdir)/variable.h +version.lo: version.c c-auto.h +win32lib.lo: win32lib.c +xcalloc.lo: xcalloc.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xfopen.lo: xfopen.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xfseek.lo: xfseek.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xftell.lo: xftell.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xgetcwd.lo: xgetcwd.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/c-pathmx.h +xmalloc.lo: xmalloc.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xopendir.lo: xopendir.c $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/xopendir.h $(kpathsea_srcdir)/c-dir.h +xputenv.lo: xputenv.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xrealloc.lo: xrealloc.c \ + $(kpathsea_srcdir)/config.h c-auto.h \ + $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h \ + $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h +xstat.lo: xstat.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h $(kpathsea_srcdir)/xstat.h $(kpathsea_srcdir)/c-stat.h +xstrdup.lo: xstrdup.c $(kpathsea_srcdir)/config.h c-auto.h $(kpathsea_srcdir)/c-std.h \ + $(kpathsea_srcdir)/c-unistd.h \ + $(kpathsea_srcdir)/systypes.h \ + $(kpathsea_srcdir)/c-memstr.h $(kpathsea_srcdir)/c-errno.h \ + $(kpathsea_srcdir)/c-minmax.h \ + $(kpathsea_srcdir)/c-limits.h \ + $(kpathsea_srcdir)/c-proto.h \ + $(kpathsea_srcdir)/debug.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/lib.h \ + $(kpathsea_srcdir)/progname.h
--- a/kpathsea/dir.c +++ b/kpathsea/dir.c @@ -29,10 +29,16 @@ boolean dir_p P1C(const_string, fn) { +#ifdef WIN32 + int fa = GetFileAttributes(fn); + return (fa != 0xFFFFFFFF && (fa & FILE_ATTRIBUTE_DIRECTORY)); +#else struct stat stats; return stat (fn, &stats) == 0 && S_ISDIR (stats.st_mode); +#endif } +#ifndef WIN32 /* 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 @@ -83,3 +89,5 @@ return ret; } + +#endif /* !WIN32 */
--- a/kpathsea/elt-dirs.c +++ b/kpathsea/elt-dirs.c @@ -155,9 +155,8 @@ 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); - if (dir_p (FN_STRING (name))) - dir_list_add (str_list_ptr, FN_STRING (name)); - fn_shrink_to (&name, elt_length); + expand_elt (str_list_ptr, FN_STRING (name), elt_length); + fn_shrink_to (&name, elt_length); } proceed = 1; while (proceed) { @@ -170,16 +169,6 @@ /* 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 (str_list_ptr, FN_STRING (name), potential_len); - fn_shrink_to (&name, potential_len); - } do_subdir (str_list_ptr, FN_STRING (name), potential_len, post); } @@ -208,8 +197,7 @@ 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); - if (dir_p (FN_STRING (name))) - dir_list_add (str_list_ptr, FN_STRING (name)); + expand_elt (str_list_ptr, FN_STRING (name), elt_length); fn_shrink_to (&name, elt_length); } @@ -233,18 +221,6 @@ /* 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 (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 @@ -295,8 +271,7 @@ expand_elt P3C(str_llist_type *, str_list_ptr, const_string, elt, unsigned, start) { - boolean found_special = false; - const_string dir = elt + start; + const_string dir = elt + start, post; while (*dir != 0) { @@ -305,13 +280,9 @@ /* If two or more consecutive /'s, find subdirectories. */ if (IS_DIR_SEP (dir[1])) { - unsigned slash_count; - for (slash_count = 1; IS_DIR_SEP (dir[slash_count + 1]); - slash_count++) ; - do_subdir (str_list_ptr, elt, dir - elt + 1, - dir + 1 + slash_count); - found_special = true; - dir += slash_count; /* Don't find this // again. */ + for (post = dir + 1; IS_DIR_SEP (*post); post++) ; + do_subdir (str_list_ptr, elt, dir - elt + 1, post); + return; } /* No special stuff at this slash. Keep going. */ @@ -320,9 +291,8 @@ dir++; } - if (!found_special) - /* When we reach the end of ELT, it will be a normal filename. */ - checked_dir_list_add (str_list_ptr, elt); + /* When we reach the end of ELT, it will be a normal filename. */ + checked_dir_list_add (str_list_ptr, elt); } /* Here is the entry point. Returns directory list for ELT. */ @@ -333,7 +303,7 @@ str_llist_type *ret; /* If given nothing, return nothing. */ - if (!elt) + if (!elt || !*elt) return NULL; /* If we've already cached the answer for ELT, return it. */ @@ -344,22 +314,9 @@ /* We're going to have a real directory list to return. */ ret = XTALLOC1 (str_llist_type); *ret = NULL; - - /* If ELT is the empty string, just return cwd. */ - if (*elt == 0) - { /* Some old compilers do not support aggregate initialization. */ - char cwd[3]; - cwd[0] = '.'; - cwd[1] = DIR_SEP; - cwd[2] = 0; - - checked_dir_list_add (ret, cwd); - } - /* OK, so much for the trivial cases. We handle the hard case in - a subroutine. */ - else - expand_elt (ret, elt, 0); + /* We handle the hard case in a subroutine. */ + expand_elt (ret, elt, 0); /* Remember the directory list we just found, in case future calls are made with the same ELT. */ @@ -396,7 +353,7 @@ dirs = kpse_element_dirs (elt); if (!dirs) - printf ("(null)"); + printf ("(nil)"); else { str_llist_elt_type *dir; @@ -414,24 +371,19 @@ main () { /* DEBUG_SET (DEBUG_STAT); */ -#ifdef AMIGA - print_element_dirs (NULL); /* */ - print_element_dirs (""); /* ./ */ - print_element_dirs ("/kpathsea"); /* /kpathsea/ */ - print_element_dirs (".//"); /* ./ */ - print_element_dirs (":fonts//"); /* lots */ - print_element_dirs (":fonts//public/ascii//"); /* several */ - print_element_dirs (":fonts//"); /* lots again [cache] */ - print_element_dirs ("texmf:"); /* texmf: */ - print_element_dirs ("texmf:/"); /* texmf: and all subdirs */ - print_element_dirs ("${LOGNAME}"); /* ??? */ -#else /* not AMIGA */ /* 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 */
--- a/kpathsea/expand.c +++ b/kpathsea/expand.c @@ -3,7 +3,7 @@ code in kpathsea. The part of the file that I wrote (the first couple of functions) is covered by the LGPL. -Copyright (C) 1993, 94, 95, 96, 97 Karl Berry. +Copyright (C) 1993, 94, 95, 96, 97 Karl Berry & O. Weber. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -26,6 +26,8 @@ #include <kpathsea/pathsearch.h> #include <kpathsea/tilde.h> #include <kpathsea/variable.h> +#include <kpathsea/concatn.h> +#include <kpathsea/absolute.h> /* Do variable expansion first so ~${USER} works. (Besides, it's what the @@ -47,22 +49,80 @@ } +/* Forward declarations of functions from the original expand.c */ static char **brace_expand P1H(const_string); static void free_array P1H(char **); +/* If $KPSE_DOT is defined in the environment, prepend it to any relative + path components. */ + +static string +kpse_expand_kpse_dot P1C(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 = 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 = kpse_path_element (path); elt; elt = kpse_path_element (NULL)) { + string save_ret = ret; + /* We assume that the !! magic is only used on absolute components. + Single "." get special treatment, as does "./" or its equivalent. */ + if (kpse_absolute_p (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 { + ret = concatn (ret, kpse_dot, DIR_SEP_STRING, elt, ENV_SEP_STRING, NULL); +#endif + } + 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 -kpse_brace_expand P1C(const_string, elt) +kpse_brace_expand_element P1C(const_string, elt) { unsigned i; string *expansions = brace_expand (elt); string ret = xmalloc (1); *ret = 0; - + for (i = 0; expansions[i]; i++) { /* Do $ and ~ expansion on each element. */ string x = kpse_expand (expansions[i]); @@ -73,26 +133,27 @@ must terminate. (In practice, it's unlikely there will ever be more than one level of recursion.) */ string save_x = x; - x = kpse_brace_expand (x); + x = kpse_brace_expand_element (x); free (save_x); } ret = concat3 (ret, x, ENV_SEP_STRING); free (save_ret); free (x); } - + free_array (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 -kpse_path_expand P1C(const_string, path) +kpse_brace_expand P1C(const_string, path) { + string kpse_dot_expansion; string elt; + unsigned len; /* Must do variable expansion first because if we have foo = .:~ TEXINPUTS = $foo @@ -102,25 +163,101 @@ string xpath = kpse_var_expand (path); string ret = xmalloc (1); *ret = 0; - + for (elt = kpse_path_element (xpath); elt; elt = kpse_path_element (NULL)) { string save_ret = ret; /* Do brace expansion first, so tilde expansion happens in {~ka,~kb}. */ - string expansion = kpse_brace_expand (elt); + string expansion = kpse_brace_expand_element (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. */ - ret[strlen (ret) - 1] = 0; + len = strlen (ret); + if (len != 0) + ret[len - 1] = 0; free (xpath); + + kpse_dot_expansion = kpse_expand_kpse_dot (ret); + if (kpse_dot_expansion != ret) + free (ret); + + return kpse_dot_expansion; +} + +/* Expand all special constructs in a path, and include only the actually + existing directories in the result. */ +string +kpse_path_expand P1C(const_string, path) +{ + string ret; + string xpath; + string elt; + unsigned len; + + /* Initialise ret to the empty string. */ + ret = xmalloc (1); + *ret = 0; + len = 0; + /* Expand variables and braces first. */ + xpath = kpse_brace_expand (path); + + /* Now expand each of the path elements, printing the results */ + for (elt = kpse_path_element (xpath); elt; elt = kpse_path_element (NULL)) { + str_llist_type *dirs; + + /* Skip and ignore magic leading chars. */ + if (*elt == '!' && *(elt + 1) == '!') + elt += 2; + + /* Do not touch the device if present */ + if (NAME_BEGINS_WITH_DEVICE (elt)) { + while (IS_DIR_SEP (*(elt + 2)) && IS_DIR_SEP (*(elt + 3))) { + *(elt + 2) = *(elt + 1); + *(elt + 1) = *elt; + elt++; + } + } else { + /* We never want to search the whole disk. */ + while (IS_DIR_SEP (*elt) && IS_DIR_SEP (*(elt + 1))) + elt++; + } + + /* Search the disk for all dirs in the component specified. + Be faster to check the database, but this is more reliable. */ + dirs = kpse_element_dirs (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; + /* Retain trailing slash if that's the root directory. */ + 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; } /* braces.c -- code for doing word expansion in curly braces. Taken from - bash 1.14.5. + bash 1.14.5. [Ans subsequently modified for kpatshea.] Copyright (C) 1987,1991 Free Software Foundation, Inc. @@ -274,7 +411,15 @@ for (start = 0, i = 0, c = 1; c; start = ++i) { - c = brace_gobbler (text, &i, brace_arg_separator); + int c0, c1; + int i0, i1; + i0 = i; + c0 = brace_gobbler (text, &i0, brace_arg_separator); + i1 = i; + c1 = brace_gobbler (text, &i1, ENV_SEP); + c = c0 | c1; + i = (i0 < i1 ? i0 : i1); + tem = xmalloc (1 + (i - start)); strncpy (tem, &text[start], (i - start)); tem[i- start] = 0; @@ -325,21 +470,22 @@ result = xmalloc ((1 + (len1 * len2)) * sizeof (char *)); len = 0; - for (i = 0; i < len1; i++) + for (i = 0; i < len2; i++) { - int strlen_1 = strlen (arr1[i]); + int strlen_2 = strlen (arr2[i]); - for (j = 0; j < len2; j++) + for (j = 0; j < len1; j++) { + int strlen_1 = strlen (arr1[j]); + result[len] = - xmalloc (1 + strlen_1 + strlen (arr2[j])); - strcpy (result[len], arr1[i]); - strcpy (result[len] + strlen_1, arr2[j]); + xmalloc (1 + strlen_1 + strlen_2); + strcpy (result[len], arr1[j]); + strcpy (result[len] + strlen_1, arr2[i]); len++; } - free (arr1[i]); } - free (arr1); + free_array (arr1); result[len] = NULL; return (result);
--- a/kpathsea/expand.h +++ b/kpathsea/expand.h @@ -31,6 +31,12 @@ 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 string kpse_brace_expand P1H(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 string kpse_path_expand P1H(const_string path); #endif /* not KPATHSEA_EXPAND_H */
--- a/kpathsea/fontmap.c +++ b/kpathsea/fontmap.c @@ -1,6 +1,6 @@ /* fontmap.c: read files for additional font names. -Copyright (C) 1993, 94, 95, 96 Free Software Foundation, Inc. +Copyright (C) 1993, 94, 95, 96, 97 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -69,9 +69,8 @@ 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; unfortunately, we can't have TeX - read that same file, since most of the real filenames start with an - `r', because of the virtual fonts Dvips uses. */ + same order as in Dvips' psfonts.map. Perhaps someday the programs + will both read the same file. */ static void map_file_parse P1C(const_string, map_filename)
--- a/kpathsea/getopt.c +++ b/kpathsea/getopt.c @@ -81,6 +81,7 @@ #if defined (WIN32) && !defined (__CYGWIN32__) /* It's not Unix, really. See? Capital letters. */ +#include <stdlib.h> #include <windows.h> #define getpid() GetCurrentProcessId() #endif @@ -198,7 +199,7 @@ /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; -#ifdef __GNU_LIBRARY__ +#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
--- a/kpathsea/getopt.h +++ b/kpathsea/getopt.h @@ -22,6 +22,12 @@ #ifndef _GETOPT_H #define _GETOPT_H 1 +#if !defined(WIN32) || (defined(_DLL) && !defined(_IMPORT)) || !defined(_DLL) +#define DllImport +#else +#define DllImport __declspec(dllimport) +#endif + #ifdef __cplusplus extern "C" { #endif @@ -32,7 +38,7 @@ Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ -extern char *optarg; +extern DllImport char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -46,16 +52,16 @@ Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ -extern int optind; +extern DllImport int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ -extern int opterr; +extern DllImport int opterr; /* Set to an option character which was unrecognized. */ -extern int optopt; +extern DllImport int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
--- a/kpathsea/hash.c +++ b/kpathsea/hash.c @@ -1,6 +1,6 @@ /* hash.c: hash table operations. -Copyright (C) 1994, 95, 96 Karl Berry. +Copyright (C) 1994, 95, 96, 97 Karl Berry & Olaf Weber. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -47,13 +47,14 @@ hash_table_type hash_create P1C(unsigned, size) { + /* hash_table_type ret; changed into "static ..." to work around gcc + optimizer bug for Alpha. */ + static hash_table_type ret; unsigned b; - hash_table_type ret; ret.buckets = XTALLOC (size, hash_element_type *); ret.size = size; - /* calloc's zeroes aren't necessarily NULL, according to ANSI, so be - safe. (Not that I know of any exceptions in reality.) */ + /* calloc's zeroes aren't necessarily NULL, so be safe. */ for (b = 0; b <ret.size; b++) ret.buckets[b] = NULL; @@ -87,6 +88,28 @@ } } +/* Remove a (KEY, VALUE) pair. */ + +void +hash_remove P3C(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 STR in MAP. Return a (dynamically-allocated) list of the corresponding strings or NULL if no match. */
--- a/kpathsea/hash.h +++ b/kpathsea/hash.h @@ -51,6 +51,10 @@ extern void hash_insert P3H(hash_table_type *table, const_string key, const_string value); +/* Remove the (KEY,VALUE) association from TABLE. */ +extern void hash_remove P3H(hash_table_type *table, const_string key, + const_string value); + /* Look up KEY in MAP, and return NULL-terminated list of all matching values (not copies), in insertion order. If none, return NULL. */ extern string *hash_lookup P2H(hash_table_type table, const_string key);
--- a/kpathsea/hier.texi +++ b/kpathsea/hier.texi @@ -25,7 +25,7 @@ under a single top-level directory such as @file{/usr/local/texmf} or @file{/opt/texmf}---in the terms used below, make @var{prefix} and @var{texmf} the same. For specific instructions on doing that, -@pxref{configure scenarios}. +see @ref{configure scenarios}. Here is a skeleton of the default directory structure, extracted from the TDS document:
--- a/kpathsea/install-sh +++ b/kpathsea/install-sh @@ -1,23 +1,10 @@ -#! /bin/sh +#!/bin/sh + # # install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology +# This comes from X11R5; it is not part of GNU. # -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # # This script is compatible with the BSD install script, but was written # from scratch. @@ -39,12 +26,9 @@ chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" -transformbasename="" -transform_arg="" instcmd="$mvprog" -chmodcmd="$chmodprog 0755" +chmodcmd="" chowncmd="" chgrpcmd="" stripcmd="" @@ -52,7 +36,6 @@ mvcmd="$mvprog" src="" dst="" -dir_arg="" while [ x"$1" != x ]; do case $1 in @@ -60,10 +43,6 @@ shift continue;; - -d) dir_arg=true - shift - continue;; - -m) chmodcmd="$chmodprog $2" shift shift @@ -83,20 +62,10 @@ shift continue;; - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - *) if [ x"$src" = x ] then src=$1 else - # this colon is to work around a 386BSD /bin/sh bug - : dst=$1 fi shift @@ -106,145 +75,45 @@ if [ x"$src" = x ] then - echo "install: no input file specified" + echo "install: no input file specified" exit 1 -else - true fi -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. +if [ x"$dst" = x ] +then + echo "install: no destination specified" + exit 1 +fi - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi +if [ -d $dst ] +then + dst="$dst"/`basename $src` fi -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - # Make a temp file name in the proper directory. - dsttmp=$dstdir/#inst.$$# +dstdir=`dirname $dst` +dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && +$doit $instcmd $src $dsttmp # and set any options; do chmod last to preserve setuid bits -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && +if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi +if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi +if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi +if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi # Now rename the file to the real destination. - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && +$doit $rmcmd $dst +$doit $mvcmd $dsttmp $dst exit 0
--- a/kpathsea/install.texi +++ b/kpathsea/install.texi @@ -16,8 +16,8 @@ @end ifset The procedure for Kpathsea (and Web2c, etc.) configuration and -installation follows. If trouble, @pxref{Common problems}, a copy of -which is in the file @file{kpathsea/BUGS}. +installation follows. If you encounter trouble, see @ref{Common +problems}, a copy of which is in the file @file{kpathsea/BUGS}. @menu * Simple installation:: If you just want to do it. @@ -39,13 +39,17 @@ @cindex installation, getting executables instead of Installing @TeX{} and friends for the first time can be a daunting experience. Thus, you may prefer to skip this whole thing and just get -precompiled executables: @pxref{unixtex.ftp}. +precompiled executables: see @ref{unixtex.ftp}. This section explains what to do if you wish to take the defaults for -everything (installing under @file{/usr/local}), and generally to -install in the simplest possible way. Most steps here refer to -corresponding subsection in the next section which explains how to -override defaults and generally gives more details. +everything, and generally to install in the simplest possible way. Most +steps here refer to corresponding subsection in the next section which +explains how to override defaults and generally gives more details. + +By default everything will be installed under @file{/usr/local} and the +following discussion assumes this. However, if you already have @TeX{} +installed, its location is used to derive the directory under which +everything is to be installed. @enumerate @item @@ -78,7 +82,12 @@ @xref{Running configure}. @item -@samp{make}. @xref{Running make}. +@samp{make}. @xref{Running make}. If you are using a BSD 4.4 system +such as FreeBSD or NetBSD, use GNU make (often installed in +@file{/usr/local/bin}), not the BSD make. + +If you are using a HP-UX 10 system and the native compiler, specify the +@samp{+u} flag in @code{XCFLAGS}. @item @samp{make install}. @xref{Installing files}. @@ -90,7 +99,7 @@ Set up a cron job to rebuild the filename database that makes searching faster. This line will rebuild it every midnight: @example -0 0 * * * cd /usr/local/share/texmf && @var{/bindir}/MakeTeXls-R +0 0 * * * cd /usr/local/share/texmf && @var{/bindir}/mktexlsr @end example @xref{Filename database generation}, and @ref{Filename database}. @@ -101,26 +110,27 @@ If you're installing Dvips, you also need to set up configuration files for your printers and make any additional PostScript fonts available. @xref{Installation,,, dvips, Dvips}. If you have any color printers, -@pxref{Color device configuration,,, dvips, Dvips}. +see @ref{Color device configuration,,, dvips, Dvips}. @item The first time you run a DVI driver, a bunch of PK fonts will be built -by Metafont via @code{MakeTeXPK} (and added to the filename database). +by Metafont via @code{mktexpk} (and added to the filename database). This will take some time. Don't be alarmed; they will created only this first time (unless something is wrong with your path definitions). -By default, @code{MakeTeXPK} assumes @file{/usr/local/share/texmf/fonts} -is globally writable. If you need a different arrangement, -@pxref{MakeTeX configuration}. +By default, @code{mktexpk} will create these fonts in a hierarchy +under @file{/var/tmp/texfonts}; it simply assumes that @file{/var/tmp} +exists and is globally writable. If you need a different arrangement, +see @ref{mktex configuration}. -@xref{MakeTeX scripts}. +@xref{mktex scripts}. @item @cindex fonts, being created -@pindex MakeTeXPK @r{, initial runs} +@pindex mktexpk @r{, initial runs} @cindex tests, simple For some simple tests, try @samp{tex story \\bye} and @samp{latex -simple}. Then run @file{xdvi story} or @file{dvips simple} on the +sample2e}. Then run @file{xdvi story} or @file{dvips sample2e} on the resulting DVI files to preview/print the documents. @xref{Installation testing}. @end enumerate @@ -166,7 +176,7 @@ * Installing files:: * Cleaning up:: * Filename database generation:: -* MakeTeX scripts:: +* mktex scripts:: * Installation testing:: @end menu @@ -184,6 +194,7 @@ are approximate. @multitable {distribution} {.tar.gz} {unpacked} {compiled} {installed} +@item Distribution @tab .tar.gz @tab Unpacked @tab Compiled @tab Installed @item dviljk @tab .9 @tab 3.8 @tab @item dvipsk @tab .9 @tab 3.2 @tab @item xdvik @tab .7 @tab 2.5 @tab @@ -248,22 +259,22 @@ @cindex search paths, changing default @cindex paths, changing default -@flindex texmf.cnf.in@r{, editing} +@flindex texmf.in@r{, editing} If the search paths for your installation differ from the standard @TeX{} directory structure (@pxref{Top,, Introduction, tds, A Directory -Structure for @TeX{} files}), edit the file @file{kpathsea/texmf.cnf.in} +Structure for @TeX{} files}), edit the file @file{kpathsea/texmf.in} as desired, before running @code{configure}. For example, if you have all your fonts or macros in one big directory. -You may also wish to edit the file @file{MakeTeXnames.cnf}, either -before or after installation, to control various aspects of -@code{MakeTeXPK} and friends. @xref{MakeTeX configuration}. +You may also wish to edit the file @file{mktex.cnf}, either before or +after installation, to control various aspects of @code{mktexpk} and +friends. @xref{mktex configuration}. -You do not need to edit @file{texmf.cnf.in} to change the default +You do not need to edit @file{texmf.in} to change the default top-level or other installation @emph{directories} (only the paths). You can and should do that when you run @code{configure} (next step). -You also do not need to edit @file{texmf.cnf.in} if you are willing to +You also do not need to edit @file{texmf.in} if you are willing to rely on @file{texmf.cnf} at runtime to define the paths, and let the compile-time default paths be incorrect. Usually there is no harm in doing this. @@ -286,7 +297,7 @@ above is to avoid having the same information in more than one place. If you change the installation directories or top-level prefix at @code{configure}-time, those changes will propagate through the whole -sequence. And if you change the default paths in @file{texmf.cnf.in}, +sequence. And if you change the default paths in @file{texmf.in}, those changes are propagated to the compile-time defaults. The Make definitions are all repeated in several @t{Makefile}'s; but @@ -316,10 +327,10 @@ is mode-independent (e.g., @code{pktype}). To make the paths independent of the mode, simply edit -@file{texmf.cnf.in} before installation, or the installed +@file{texmf.in} before installation, or the installed @file{texmf.cnf}, and remove the @samp{$MAKETEX_MODE}. -@xref{MakeTeX script arguments}, for how this interacts with @code{MakeTeXPK}. +@xref{mktex script arguments}, for how this interacts with @code{mktexpk}. @flindex HIER @flindex kpathsea/HIER @@ -358,10 +369,10 @@ define the installation directories. @item -@flindex texmf.cnf.in +@flindex texmf.in @flindex texmf.cnf@r{, generated} @file{texmf.sed} (together with a little extra magic---see -@file{kpathsea/Makefile}) is applied to @file{texmf.cnf.in} to generate +@file{kpathsea/Makefile}) is applied to @file{texmf.in} to generate @file{texmf.cnf}. This is the file that will eventually be installed and used. @@ -381,7 +392,7 @@ @subsection Running @code{configure} @flindex configure@r{, running} -@flindex c-auto.h.in +@flindex c-auto.in @flindex Makefile.in @findex ac_include@r{, Autoconf extension} @cindex @@@var{var}@@ substitutions @@ -392,17 +403,17 @@ @code{configure} adapts the source distribution to the present system via @code{#define}'s in @file{*/c-auto.h}, which are created from the -corresponding @file{c-auto.h.in}. It also creates a @file{Makefile} from +corresponding @file{c-auto.in}. It also creates a @file{Makefile} from the corresponding @file{Makefile.in}, doing @samp{@@@var{var}@@} and @samp{ac_include} substitutions). -@flindex CONFIGURE -@flindex kpathsea/CONFIGURE +@flindex README.CONFIGURE +@flindex kpathsea/README.CONFIGURE @code{configure} is the best place to control the configuration, compilation, and installed location of the software, either via command-line options, or by setting environment variables before -invoking it. For example, you can disable @code{MakeTeXPK} by default -with the option @samp{--disable-maketexpk}. +invoking it. For example, you can disable @code{mktexpk} by default +with the option @samp{--disable-mktexpk}. @xref{configure options}. @menu @@ -458,14 +469,14 @@ @cindex @code{configure} options For a complete list of all @code{configure} options, run @samp{configure ---help} or @pxref{Invoking configure,, Running @code{configure} scripts, -autoconf, Autoconf} (a copy is in the file @file{kpathsea/CONFIGURE}). +--help} or see @ref{Invoking configure,, Running @code{configure} scripts, +autoconf, Autoconf}, (a copy is in the file @file{kpathsea/README.CONFIGURE}). The generic options are listed first in the @samp{--help} output, and the package-specific options come last. The environment variables @code{configure} pays attention to are listed below. Options particularly likely to be useful are @samp{--prefix}, -@samp{--datadir}, and the like; @pxref{configure scenarios}. +@samp{--datadir}, and the like; see @ref{configure scenarios}. @opindex --with @r{options} @opindex --enable @r{options} @@ -476,22 +487,29 @@ accept. @table @samp -@item --without-maketexmf-default -@itemx --without-maketexpk-default -@itemx --without-maketextfm-default -@itemx --with-maketextex-default -Enable or disable the dynamic generation programs. @xref{MakeTeX +@item --without-mktexmf-default +@itemx --without-mktexpk-default +@itemx --without-mktextfm-default +@itemx --with-mktextex-default +Enable or disable the dynamic generation programs. @xref{mktex configuration}. @item --enable-shared +@opindex --enable-shared Build Kpathsea as a shared library, and link against it. Also build the usual static library. @xref{Shared library}. @item --disable-static -Build only the shared library. +@opindex --disable-static +Build only the shared library. Implies @samp{--enable-shared}. + +@item --enable-maintainer-mode +@opindex --enable-maintainer-mode +Enables make targets that are useful for the maintainer and likely to be +a pain for anyone else; the makefiles created when this option is +enabled may not work at all for you. You have been warned. @end table - @node configure environment @subsubsection @code{configure} environment @@ -561,11 +579,11 @@ @item @cindex @TeX{} hierarchy, one Putting the binaries, @TeX{} files, GNU info files, etc.@: into a single -@TeX{} hierarchy, say @var{texmf}, requires overriding defaults in both +@TeX{} hierarchy, say @file{/texmf}, requires overriding defaults in both @code{configure} and @code{make}: @example -configure --prefix=@var{texmf} --datadir=@var{texmf} -make texmf=@var{texmf} +configure --prefix=@file{/texmf} --datadir=@file{/texmf} +make texmf=@file{/texmf} @end example @item @@ -631,15 +649,16 @@ (e.g., @code{LD_LIBRARY_PATH}) to find shared libraries. If you want to do this, you will need to add the necessary options to @code{LDFLAGS} yourself; for example, on Solaris, include something like -@samp{-R$@{prefix@}/lib}. (Unfortunately, making this happen by default -is very difficult, because of interactions with an existing installed -shared library.) +@samp{-R$@{prefix@}/lib}, on IRIX or Linux, use +@samp{-rpath$@{prefix@}/lib}. (Unfortunately, making this happen by +default is very difficult, because of interactions with an existing +installed shared library.) -Currently, shared library support is implemented only on SunOS 4 -(Solaris 1) and SunOS 5 (Solaris 2). If you're interested and willing -in adding support for other systems, please see the @samp{configure} -mode in the @file{klibtool} script, especially the host-specific case -statement around line 250. +Currently, shared library support is implemented only on Linux, SunOS 4 +(Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're +interested and willing in adding support for other systems, please see +the @samp{configure} mode in the @file{klibtool} script, especially the +host-specific case statement around line 250. @node Running make @@ -787,7 +806,7 @@ @item @findex mostlyclean @r{Make target} @code{make mostlyclean} if you intend to compile on another -architecture. For Web2c, since the generated C files are portable, +architecture. For Web2C, since the generated C files are portable, they are not removed. If the @code{lex} vs.@: @code{flex} situation is going to be different on the next machine, @code{rm web2c/lex.yy.c}. @@ -821,30 +840,30 @@ You will probably want to set up a @code{cron} entry on the appropriate machine(s) to rebuild the filename database nightly or so, as in: @example -0 0 * * * cd @var{texmf} && @var{/bindir}/MakeTeXls-R +0 0 * * * cd @var{texmf} && @var{/bindir}/mktexlsr @end example @noindent @xref{Filename database}. -Although the @code{MakeTeX@dots{}} scripts make every effort to add +Although the @code{mktex@dots{}} scripts make every effort to add newly-created files on the fly, it can't hurt to make sure you get a fresh version every so often. -@node MakeTeX scripts -@subsection @file{MakeTeX} scripts +@node mktex scripts +@subsection @file{mktex} scripts -@cindex @file{MakeTeX} 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 DC 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{MakeTeX configuration}). This is most useful for +dynamically (@pxref{mktex configuration}). This is most useful for fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as -the Sauter and DC fonts), since any given document can use fonts never +the Sauter and EC fonts), since any given document can use fonts never before referenced. Trying to build all fonts in advance is therefore impractical, if not impossible. @@ -854,69 +873,68 @@ diagnostics to standard error. @menu -* MakeTeX configuration:: -* MakeTeX script names:: -* MakeTeX script arguments:: +* mktex configuration:: +* mktex script names:: +* mktex script arguments:: @end menu -@node MakeTeX configuration -@subsubsection @file{MakeTeX} configuration +@node mktex configuration +@subsubsection @file{mktex} configuration -@cindex @file{MakeTeX} script configuration -@cindex configuration of @file{MakeTeX} scripts -@cindex enabling @file{MakeTeX} scripts -@cindex disabling @file{MakeTeX} scripts +@cindex @file{mktex} script configuration +@cindex configuration of @file{mktex} scripts +@cindex enabling @file{mktex} scripts +@cindex disabling @file{mktex} scripts The following file types can run an external program to create missing files: @file{pk}, @file{tfm}, @file{mf}, @file{tex}; the scripts are -named @file{MakeTeXPK}, @file{MakeTeXTFM}, @file{MakeTeXMF}, and -@file{MakeTeXTeX}. +named @file{mktexpk}, @file{mktextfm}, @file{mktexmf}, and +@file{mktextex}. In the absence of @code{configure} options specifying otherwise, -everything but @file{MakeTeXTeX} will be enabled by default. The +everything but @file{mktextex} will be enabled by default. The @code{configure} options to change the defaults are: -@cindex @code{configure} options for @file{MakeTeX} scripts -@opindex --without-maketexmf-default -@opindex --without-maketexpk-default -@opindex --without-maketextfm-default -@opindex --with-maketextex-default +@cindex @code{configure} options for @file{mktex} scripts +@opindex --without-mktexmf-default +@opindex --without-mktexpk-default +@opindex --without-mktextfm-default +@opindex --with-mktextex-default @example ---without-maketexmf-default ---without-maketexpk-default ---without-maketextfm-default ---with-maketextex-default +--without-mktexmf-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{MAKETEXPK} (@pxref{MakeTeX script arguments}). +@file{MKTEXPK} (@pxref{mktex script arguments}). -@flindex MakeTeX.site -@cindex site overrides for @code{MakeTeX@dots{}} +@flindex mktex.cnf +@cindex site overrides for @code{mktex@dots{}} As distributed, all the scripts source a file -@file{texmf/web2c/MakeTeX.site} if it exists, so you can override -various defaults. See @file{MakeTeXcommon}, for instance, which defines -the default mode, resolution, directory permissions, some special -directory names, etc. If you prefer not to change the distributed -scripts, you can simply create @file{MakeTeX.site} with the appropriate -definitions (you do not need to create it if you have nothing to put in -it). @file{MakeTeX.site} has no special syntax; it's an arbitrary -Bourne shell script. The distribution contains a sample -@file{MakeTeX.site} for you to copy and modify as you please (it is not -installed anywhere). +@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 MakeTeXnames.cnf +@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{MakeTeX.site}, as just mentioned; +in @file{mktex.opt}, as just mentioned; @item -by editing the file @file{MakeTeXnames.cnf}, either before @samp{make +by editing the file @file{mktex.opt}, either before @samp{make install} (in the source hierarchy) or after (in the installed hierarchy); @@ -924,46 +942,86 @@ or in the environment. @end itemize -By default, @code{MakeTeXPK} installs fonts into the standard @TeX{} -directory structure (@pxref{TeX directory structure,, @TeX{} directory -structure}). It uses aliases and directory names from the Fontname -distribution (@pxref{Top,, Introduction, fontname, Fontname}). Most of -the options here change that. +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 MakeTeXmkdir -Tell @code{MakeTeXmkdir} to create directories append-only, i.e., set +@flindex mktexdir +Tell @code{mktexdir} to create directories append-only, i.e., set their sticky bit (@pxref{Mode Structure,,, fileutils, GNU File -Utilities}). +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}. +@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 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. +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/tex/fonts +@flindex /var/tmp/texfonts @vindex VARTEXFONTS @cindex Linux File System Standard -Put @code{MakeTeXPK}-generated fonts under the directory named -by @code{VARTEXFONTS}; the default value in @file{kpathsea/texmf.cnf.in} -is @file{/var/tex/fonts}, as recommended by the @cite{Linux File System -Standard} (but unless @samp{varfonts} is enabled, nothing cares about -that value). +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 @@ -972,11 +1030,11 @@ @end vtable -@node MakeTeX script names -@subsubsection @file{MakeTeX} script names +@node mktex script names +@subsubsection @file{mktex} script names -@cindex @file{MakeTeX} script names -@cindex names for @file{MakeTeX} scripts +@cindex @file{mktex} script names +@cindex names for @file{mktex} scripts @flindex tex-make.c @vindex kpse_make_specs @@ -985,20 +1043,20 @@ in @file{kpathsea/tex-make.c}.) @table @file -@item MakeTeXPK -@pindex MakeTeXPK +@item mktexpk +@pindex mktexpk Glyph fonts. -@item MakeTeXTeX -@pindex MakeTeXTeX +@item mktextex +@pindex mktextex @TeX{} input files. -@item MakeTeXMF -@pindex MakeTeXMF +@item mktexmf +@pindex mktexmf Metafont input files. -@item MakeTeXTFM -@pindex MakeTeXTFM +@item mktextfm +@pindex mktextfm TFM files. @end table @@ -1010,8 +1068,8 @@ @comment next two paragraphs are repeated in dvips.texi @flindex missfont.log -@cindex failed @code{MakeTeX@dots{}} script invocation -If a @code{MakeTeX@dots{}} script fails, the invocation is appended to a +@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. @@ -1025,75 +1083,56 @@ configuration file value. -@node MakeTeX script arguments -@subsubsection @file{MakeTeX} script arguments +@node mktex script arguments +@subsubsection @file{mktex} script arguments -@cindex arguments to @file{MakeTeX} +@cindex arguments to @file{mktex} -The first argument to a @file{MakeTeX} script is always the name +The first argument to a @file{mktex} script is always the name of the file to be created. -In the default @file{MakeTeXPK} implementation, from three to five -additional arguments may also passed, via environment variables: - -@enumerate -@item -@vindex KPATHSEA_DPI -The resolution to make the font at (@code{KPATHSEA_DPI}). - -@item -@vindex MAKETEX_BASE_DPI -@cindex base dpi -The ``base dpi'' the program is operating at (@code{MAKETEX_BASE_DPI}), -i.e., the assumed resolution of the output device. +In the default @file{mktexpk} implementation, additional arguments may +also be passed: -@item -@vindex MAKETEX_MAG -@vindex mag @r{Metafont variable} -@cindex magstep for @code{MakeTeXPK} -A ``magstep'' string suitable for the Metafont @code{mag} variable -(@code{MAKETEX_MAG}). - -@item -@vindex MAKETEX_MODE -@vindex mode @r{Metafont variable} -@cindex Metafont mode name for @code{MakeTeXPK} -Optionally, a Metafont mode name to assign to the Metafont @code{mode} -variable (@code{MAKETEX_MODE}). Otherwise, (the default) -@code{MakeTeXPK} guesses the mode from the resolution. @xref{TeX -directory structure,, @TeX{} directory structure}. +@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 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 -@item -@vindex mtp_destdir -@cindex destination directory for @code{MakeTeXPK} -Optionally, 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 (from environment variables @code{DESTDIR} or -@code{MTP_DESTDIR} or a compile-time default). If this argument is not -supplied, the mode name is appended to the root destination directory. -@end enumerate - -@noindent Kpathsea sets @code{KPATHSEA_DPI} appropriately for each -attempt at building a font. It's up to the program using Kpathsea to -set the others. (@xref{Calling sequence}.) - -@vindex MAKETEXPK @r{environment variable} -@cindex specification for @code{MakeTeXPK} -You can change the specification for the arguments passed to the -external script by setting the environment variable named as the script -name, but all capitals---@code{MAKETEXPK}, for example. If you've -changed the script name by setting (say) @code{DVIPSMAKEPK} to -@samp{foo}, then the spec is taken from the environment variable -@code{FOO}. - -The spec can contain any variable references, to the above variables or -any others. As an example, the default spec for @code{MakeTeXPK} is: -@example -$KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE -@end example - -@noindent The convention of passing the name of the file to be created -as the first argument cannot be changed. +@c The feature mentioned here doesn't seem to be implemented. +@c Worse, the variable name clashed with the "switch" used to select +@c whether a mktex program is run at all. However, a dearth of +@c complains suggests that no-one was using it anyway. +@c +@c @vindex MKTEXPK @r{environment variable} +@c @cindex specification for @code{mktexpk} +@c You can change the specification for the arguments passed to the +@c external script by setting the environment variable named as the script +@c name, but all capitals---@code{MKTEXPK}, for example. If you've +@c changed the script name by setting (say) @code{DVIPSMAKEPK} to +@c @samp{foo}, then the spec is taken from the environment variable +@c @code{FOO}. +@c +@c The spec can contain any variable references, to the above variables or +@c any others. As an example, the default spec for @code{mktexpk} is: +@c @example +@c $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE +@c @end example +@c +@c @noindent The convention of passing the name of the file to be created +@c as the first argument cannot be changed. @node Installation testing @@ -1104,7 +1143,7 @@ Besides the tests listed in @ref{Simple installation}, you can try running @samp{make check}. This includes the torture tests (trip, trap, -and mptrap) that come with Web2c (@pxref{Torture tests,,, web2c, Web2c}). +and mptrap) that come with Web2c (@pxref{Triptrap,,, web2c, Web2c}). @node Security @@ -1130,33 +1169,46 @@ details,,, dvips, Dvips}, the xdvi man page, and @ref{tex invocation,,, web2c, Web2c}, respectively. -@cindex globally writable directories +@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{MakeTeXPK} +necessary---to make arbitrary fonts on user demand with @code{mktexpk} and friends. Where do these files get installed? By default, the -@code{MakeTeXPK} distributed with Kpathsea assumes a globally writable -@file{texmf} tree; this is the simplest and most convenient approach, -but it may not suit your situation. +@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 append-only directories and @code{MakeTeXPK} +@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{MakeTeXnames.cnf}. @xref{MakeTeX configuration}. +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{MakeTeXPK} et al.@: setgid to that group (or setuid to that +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 local cache of fonts -@cindex cache of fonts, loca -Finally, using a central writable @file{texmf} tree may be completely -impossible, because it's on an NFS filesystem that you cannot export -read/write, or AFS is in use, or simply because ``it's policy''. Then -you must resort to each user's machine having its own local directory of -dynamically-created fonts; again, @file{MakeTeXnames.cnf} has an option -to do this, and again, @pxref{MakeTeX configuration}. +@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.
--- a/kpathsea/kdefault.c +++ b/kpathsea/kdefault.c @@ -102,10 +102,10 @@ test_expand_default (NULL, default_path); test_expand_default ("", default_path); test_expand_default ("none", default_path); - test_expand_default (":", default_path); - test_expand_default (":first", default_path); - test_expand_default ("last:", default_path); - test_expand_default ("middle::elddim", 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; }
--- a/kpathsea/klibtool +++ b/kpathsea/klibtool @@ -16,7 +16,7 @@ # the binary, etc.) See the configure mode. I can send you the # hello,world Makefile I used for testing if you want it. # -rcs_version='$Id: klibtool,v 1.1 1997-05-23 03:09:13 jwe Exp $' +rcs_version='$Id: klibtool,v 1.2 1998-04-24 04:24:36 jwe Exp $' version=0.1 maint=tex-k@mail.tug.org help="Usage: $0 [OPTION]... MODE [ARG]... @@ -32,6 +32,7 @@ version Options: + --source-dir DIR --config-dir DIR -n, --dry-run --help @@ -53,6 +54,7 @@ chicken= show=echo config_dir= +source_dir= # Yes, this option parsing is imperfect, e.g., -xcruddy will be # recognized as --config-dir. I don't think it's worth the trouble to @@ -61,6 +63,8 @@ case "$1" in configure|compile|archive|link|install-lib|install-prog|version) mode=$1; break;; + --source-dir) # --source-dir + shift; source_dir=$1;; -*c*) # --config-dir shift; config_dir=$1;; -n|-*d*) # -n, --dry-run @@ -92,18 +96,25 @@ # the user told us where it is, great. More likely, though, it's only # in the directory with the library that we're eventually going to # link with. We have no way of knowing what that is, so let's use the - # location of this script itself as the default. + # location of this script itself as the default if not in `.', `..', + # or `../..'. + test -z "$config_dir" && config_dir=$KLIBTOOL_CONFIG_DIR if test -z "$config_dir"; then if test -r ./klibtool.config; then config_dir=. + elif test -r ../klibtool.config; then + config_dir=.. + elif test -r ../../klibtool.config; then + config_dir=../.. else dir=`echo $0 | sed 's,/[^/]*$,,'` test -r $dir/klibtool.config && config_dir=$dir fi fi if test -z "$config_dir"; then - echo "$0: Cannot find klibtool.config in . or $dir," >&2 - echo "$0: and no --config-dir option specified." >&2 + echo "$0: Cannot find klibtool.config in . or .. or $dir," >&2 + echo "$0: and no --config-dir option specified" >&2 + echo "$0: or KLIBTOOL_CONFIG_DIR environment variable set." >&2 exit 1 fi # Read the file. @@ -165,14 +176,18 @@ config_dir=. # $0 is just the script name, no directory part. fi fi + if test -z "$source_dir"; then + source_dir=$config_dir + fi config_file=$config_dir/klibtool.config + config_tmp=$config_dir/klt$$.tmp $verbose "$0: writing to config_file = $config_file." # If no specified HOSTTYPE, guess it. if test $# -eq 0; then - config_guess=$config_dir/config.guess + config_guess=$source_dir/config.guess if test ! -r $config_guess; then - echo "$0: config.guess not in $config_dir." >&2 + echo "$0: config.guess not in $source_dir." >&2 echo "$0: Either specify a host type or get the scripts." >&2 exit 1 fi @@ -184,9 +199,9 @@ fi # Convert the original host type to canonical form. - config_sub=$config_dir/config.sub + config_sub=$source_dir/config.sub if test ! -r $config_sub; then - echo "$0: config.sub missing from $config_dir; it's required." >&2 + echo "$0: config.sub missing from $source_dir; it's required." >&2 exit 1 fi host_type=`$config_sub $host_alias` @@ -195,9 +210,6 @@ exit 1 fi - # Finally, we'll be creating something. - rm -f $config_file - # Define defaults, to be overridden in the system-specific cases. config_vars="LIBTOOL_OBJTYPES shared_support shared_ext libpath_var CC args_STATIC_compile args_SHARED_compile @@ -224,6 +236,9 @@ if test -f $dir/gcc; then CC=gcc break + elif test -f $dir/gcc.exe; then + CC=gcc + break fi done fi @@ -275,17 +290,39 @@ fi ;; + *-*-irix5*|*-*-irix6*) + shared_support=true + args_SHARED_compile= + ;; + + *-*-*djgpp* | *-*-*go32* | *-*-msdos*) + shared_support=false + libpath_var=LIBRARY_PATH + ;; + *) echo "$0: $host_type not explicitly supported, using defaults." >&2 ;; esac + # Finally, we'll be creating something. + rm -f $config_tmp + # Output values. for v in $config_vars; do config_line=$v=\'`eval echo '$'$v`\' $verbose "$0: writing config line $config_line." - echo $config_line >>$config_file + echo $config_line >>$config_tmp done + + # Check if this changed anything. + if cmp -s $config_file $config_tmp 2>/dev/null; then + $verbose "$0: $config_file is unchanged" + rm -f $config_tmp + else + rm -f $config_file + mv $config_tmp $config_file + fi ;; @@ -312,7 +349,7 @@ # Construct and run the cmd. cmd="$compiler ""$@"" $ot_args $output_arg" $show $cmd - $chicken $cmd + $chicken eval "$cmd" status=$? test $status -eq 0 || break done # end of objtypes loop for compile mode @@ -368,7 +405,7 @@ # If it supports shared libraries, it supports symlinks. # Although this is unnecessary on (e.g.) SunOS, it # doesn't hurt, and it is necessary on (e.g.) Solaris. - post="&& ln -s $lib_basename $lib_base" + post="&& rm -f $lib_base && ln -s $lib_basename $lib_base" elif test $ot = STATIC; then ranlib=`eval echo '$'${ot}_ranlib` $verbose "${ot}_ranlib = $ranlib." @@ -392,8 +429,10 @@ fi # Remove old archive file because we recommend `ar q', not `r', - # and the user can't necessarily know the library name. - cmd="cd $lib_dir/$ot && rm -f $lib_base* && $cmdname $args $post" + # and the user can't necessarily know the library name. We remove + # both $lib_base and $lib_base* because on MS-DOS the latter may not + # match the former. + cmd="cd $lib_dir/$ot && rm -f $lib_base $lib_base* && $cmdname $args $post" $show $cmd $chicken eval "($cmd)" status=$? @@ -491,7 +530,7 @@ # Do the link. cmd="$cmdname $args" $show $cmd - $chicken $cmd + $chicken eval "$cmd" status=$? if test $status -eq 0 && test -n "$real_output_name"; then @@ -566,7 +605,7 @@ # Link libfoo.so to libfoo.so.1.2.3. lib_base=`echo $lib_basename | sed 's/[.0-9]*$//'` $verbose "$0: linking $libdir/$lib_base to $lib_basename" - (cd $libdir && ln -s $lib_basename $lib_base) + (cd $libdir && rm -f $lib_base && ln -s $lib_basename $lib_base) fi # # Run ldconfig, etc. @@ -608,7 +647,7 @@ # FIXME: On SunOS, AIX, and HP-UX, relink to avoid hardwired libdirs. cmd="${INSTALL_PROGRAM-cp} $arg$suffix $dir/$arg" $show $cmd - $chicken $cmd + $chicken eval "$cmd" done ;;
deleted file mode 100644 --- a/kpathsea/klibtool.version +++ /dev/null @@ -1,3 +0,0 @@ -# Version information for Klibtool. -# MAJOR MINOR DELTA -kpathsea 3 0 0
deleted file mode 100644 --- a/kpathsea/kpathsea.aux +++ /dev/null @@ -1,231 +0,0 @@ -'xrdef {Introduction-title}{Introduction} -'xrdef {Introduction-pg}{1} -'xrdef {Introduction-snt}{Chapter'tie1} -'xrdef {History-title}{History} -'xrdef {History-pg}{1} -'xrdef {History-snt}{Section'tie1.1} -'xrdef {Installation-title}{Installation} -'xrdef {Installation-pg}{3} -'xrdef {Installation-snt}{Chapter'tie2} -'xrdef {Simple installation-title}{Simple installation} -'xrdef {Simple installation-pg}{3} -'xrdef {Simple installation-snt}{Section'tie2.1} -'xrdef {Custom installation-title}{Custom installation} -'xrdef {Custom installation-pg}{4} -'xrdef {Custom installation-snt}{Section'tie2.2} -'xrdef {Disk space-title}{Disk space} -'xrdef {Disk space-pg}{4} -'xrdef {Disk space-snt}{Section'tie2.2.1} -'xrdef {Kpathsea application distributions-title}{Kpathsea application distributions} -'xrdef {Kpathsea application distributions-pg}{5} -'xrdef {Kpathsea application distributions-snt}{Section'tie2.2.2} -'xrdef {Changing search paths-title}{Changing search paths} -'xrdef {Changing search paths-pg}{5} -'xrdef {Changing search paths-snt}{Section'tie2.2.3} -'xrdef {Default path features-title}{Default path features} -'xrdef {Default path features-pg}{5} -'xrdef {Default path features-snt}{Section'tie2.2.3.1} -'xrdef {Default path generation-title}{Default path generation} -'xrdef {Default path generation-pg}{6} -'xrdef {Default path generation-snt}{Section'tie2.2.3.2} -'xrdef {Running configure-title}{Running \code {configure}} -'xrdef {Running configure-pg}{7} -'xrdef {Running configure-snt}{Section'tie2.2.4} -'xrdef {configure shells-title}{\code {configure} shells} -'xrdef {configure shells-pg}{7} -'xrdef {configure shells-snt}{Section'tie2.2.4.1} -'xrdef {configure options-title}{\code {configure} options} -'xrdef {configure options-pg}{7} -'xrdef {configure options-snt}{Section'tie2.2.4.2} -'xrdef {configure environment-title}{\code {configure} environment} -'xrdef {configure environment-pg}{8} -'xrdef {configure environment-snt}{Section'tie2.2.4.3} -'xrdef {configure scenarios-title}{\code {configure} scenarios} -'xrdef {configure scenarios-pg}{8} -'xrdef {configure scenarios-snt}{Section'tie2.2.4.4} -'xrdef {Shared library-title}{Shared library} -'xrdef {Shared library-pg}{9} -'xrdef {Shared library-snt}{Section'tie2.2.4.5} -'xrdef {Running make-title}{Running \code {make}} -'xrdef {Running make-pg}{9} -'xrdef {Running make-snt}{Section'tie2.2.5} -'xrdef {Installing files-title}{Installing files} -'xrdef {Installing files-pg}{10} -'xrdef {Installing files-snt}{Section'tie2.2.6} -'xrdef {Cleaning up-title}{Cleaning up} -'xrdef {Cleaning up-pg}{11} -'xrdef {Cleaning up-snt}{Section'tie2.2.7} -'xrdef {Filename database generation-title}{Filename database generation} -'xrdef {Filename database generation-pg}{11} -'xrdef {Filename database generation-snt}{Section'tie2.2.8} -'xrdef {MakeTeX scripts-title}{\file {MakeTeX} scripts} -'xrdef {MakeTeX scripts-pg}{11} -'xrdef {MakeTeX scripts-snt}{Section'tie2.2.9} -'xrdef {MakeTeX configuration-title}{\file {MakeTeX} configuration} -'xrdef {MakeTeX configuration-pg}{12} -'xrdef {MakeTeX configuration-snt}{Section'tie2.2.9.1} -'xrdef {MakeTeX script names-title}{\file {MakeTeX} script names} -'xrdef {MakeTeX script names-pg}{13} -'xrdef {MakeTeX script names-snt}{Section'tie2.2.9.2} -'xrdef {MakeTeX script arguments-title}{\file {MakeTeX} script arguments} -'xrdef {MakeTeX script arguments-pg}{13} -'xrdef {MakeTeX script arguments-snt}{Section'tie2.2.9.3} -'xrdef {Installation testing-title}{Installation testing} -'xrdef {Installation testing-pg}{14} -'xrdef {Installation testing-snt}{Section'tie2.2.10} -'xrdef {Security-title}{Security} -'xrdef {Security-pg}{14} -'xrdef {Security-snt}{Section'tie2.3} -'xrdef {TeX directory structure-title}{\TeX{} directory structure} -'xrdef {TeX directory structure-pg}{15} -'xrdef {TeX directory structure-snt}{Section'tie2.4} -'xrdef {unixtex.ftp-title}{\file {unixtex.ftp}: Obtaining \TeX{}} -'xrdef {unixtex.ftp-pg}{16} -'xrdef {unixtex.ftp-snt}{Section'tie2.5} -'xrdef {Electronic distribution-title}{Electronic distribution} -'xrdef {Electronic distribution-pg}{17} -'xrdef {Electronic distribution-snt}{Section'tie2.5.1} -'xrdef {CD-ROM distribution-title}{CD-ROM distribution} -'xrdef {CD-ROM distribution-pg}{18} -'xrdef {CD-ROM distribution-snt}{Section'tie2.5.2} -'xrdef {Tape distribution-title}{Tape distribution} -'xrdef {Tape distribution-pg}{18} -'xrdef {Tape distribution-snt}{Section'tie2.5.3} -'xrdef {Other TeX packages-title}{Other \TeX{} packages} -'xrdef {Other TeX packages-pg}{18} -'xrdef {Other TeX packages-snt}{Section'tie2.5.4} -'xrdef {Reporting bugs-title}{Reporting bugs} -'xrdef {Reporting bugs-pg}{19} -'xrdef {Reporting bugs-snt}{Section'tie2.6} -'xrdef {Bug checklist-title}{Bug checklist} -'xrdef {Bug checklist-pg}{19} -'xrdef {Bug checklist-snt}{Section'tie2.6.1} -'xrdef {Mailing lists-title}{Mailing lists} -'xrdef {Mailing lists-pg}{20} -'xrdef {Mailing lists-snt}{Section'tie2.6.2} -'xrdef {Debugging-title}{Debugging} -'xrdef {Debugging-pg}{21} -'xrdef {Debugging-snt}{Section'tie2.6.3} -'xrdef {Logging-title}{Logging} -'xrdef {Logging-pg}{22} -'xrdef {Logging-snt}{Section'tie2.6.4} -'xrdef {Common problems-title}{Common problems} -'xrdef {Common problems-pg}{22} -'xrdef {Common problems-snt}{Section'tie2.6.5} -'xrdef {Unable to find files-title}{Unable to find files} -'xrdef {Unable to find files-pg}{23} -'xrdef {Unable to find files-snt}{Section'tie2.6.5.1} -'xrdef {Slow path searching-title}{Slow path searching} -'xrdef {Slow path searching-pg}{23} -'xrdef {Slow path searching-snt}{Section'tie2.6.5.2} -'xrdef {Unable to generate fonts-title}{Unable to generate fonts} -'xrdef {Unable to generate fonts-pg}{24} -'xrdef {Unable to generate fonts-snt}{Section'tie2.6.5.3} -'xrdef {TeX or Metafont failing-title}{\TeX{} or Metafont failing} -'xrdef {TeX or Metafont failing-pg}{24} -'xrdef {TeX or Metafont failing-snt}{Section'tie2.6.5.4} -'xrdef {XtStrings-title}{\code {XtStrings}} -'xrdef {XtStrings-pg}{25} -'xrdef {XtStrings-snt}{Section'tie2.6.5.5} -'xrdef {dlopen-title}{\code {dlopen}} -'xrdef {dlopen-pg}{25} -'xrdef {dlopen-snt}{Section'tie2.6.5.6} -'xrdef {ShellWidgetClass-title}{\code {ShellWidgetClass}} -'xrdef {ShellWidgetClass-pg}{25} -'xrdef {ShellWidgetClass-snt}{Section'tie2.6.5.7} -'xrdef {Pointer combination warnings-title}{Pointer combination warnings} -'xrdef {Pointer combination warnings-pg}{26} -'xrdef {Pointer combination warnings-snt}{Section'tie2.6.5.8} -'xrdef {Path searching-title}{Path searching} -'xrdef {Path searching-pg}{27} -'xrdef {Path searching-snt}{Chapter'tie3} -'xrdef {Searching overview-title}{Searching overview} -'xrdef {Searching overview-pg}{27} -'xrdef {Searching overview-snt}{Section'tie3.1} -'xrdef {Path sources-title}{Path sources} -'xrdef {Path sources-pg}{28} -'xrdef {Path sources-snt}{Section'tie3.2} -'xrdef {Config files-title}{Config files} -'xrdef {Config files-pg}{28} -'xrdef {Config files-snt}{Section'tie3.2.1} -'xrdef {Path expansion-title}{Path expansion} -'xrdef {Path expansion-pg}{29} -'xrdef {Path expansion-snt}{Section'tie3.3} -'xrdef {Default expansion-title}{Default expansion} -'xrdef {Default expansion-pg}{29} -'xrdef {Default expansion-snt}{Section'tie3.3.1} -'xrdef {Variable expansion-title}{Variable expansion} -'xrdef {Variable expansion-pg}{30} -'xrdef {Variable expansion-snt}{Section'tie3.3.2} -'xrdef {Tilde expansion-title}{Tilde expansion} -'xrdef {Tilde expansion-pg}{30} -'xrdef {Tilde expansion-snt}{Section'tie3.3.3} -'xrdef {Brace expansion-title}{Brace expansion} -'xrdef {Brace expansion-pg}{31} -'xrdef {Brace expansion-snt}{Section'tie3.3.4} -'xrdef {Subdirectory expansion-title}{Subdirectory expansion} -'xrdef {Subdirectory expansion-pg}{31} -'xrdef {Subdirectory expansion-snt}{Section'tie3.3.5} -'xrdef {Filename database-title}{Filename database (\code {ls-R})} -'xrdef {Filename database-pg}{32} -'xrdef {Filename database-snt}{Section'tie3.4} -'xrdef {ls-R-title}{\file {ls-R}} -'xrdef {ls-R-pg}{32} -'xrdef {ls-R-snt}{Section'tie3.4.1} -'xrdef {Filename aliases-title}{Filename aliases} -'xrdef {Filename aliases-pg}{33} -'xrdef {Filename aliases-snt}{Section'tie3.4.2} -'xrdef {Database format-title}{Database format} -'xrdef {Database format-pg}{33} -'xrdef {Database format-snt}{Section'tie3.4.3} -'xrdef {Invoking kpsewhich-title}{\code {kpsewhich}: Standalone path searching} -'xrdef {Invoking kpsewhich-pg}{34} -'xrdef {Invoking kpsewhich-snt}{Section'tie3.5} -'xrdef {Path searching options-title}{Path searching options} -'xrdef {Path searching options-pg}{34} -'xrdef {Path searching options-snt}{Section'tie3.5.1} -'xrdef {Auxiliary tasks-title}{Auxiliary tasks} -'xrdef {Auxiliary tasks-pg}{36} -'xrdef {Auxiliary tasks-snt}{Section'tie3.5.2} -'xrdef {Standard options-title}{Standard options} -'xrdef {Standard options-pg}{37} -'xrdef {Standard options-snt}{Section'tie3.5.3} -'xrdef {TeX support-title}{\TeX{} support} -'xrdef {TeX support-pg}{38} -'xrdef {TeX support-snt}{Chapter'tie4} -'xrdef {Supported file formats-title}{Supported file formats} -'xrdef {Supported file formats-pg}{38} -'xrdef {Supported file formats-snt}{Section'tie4.1} -'xrdef {File lookup-title}{File lookup} -'xrdef {File lookup-pg}{40} -'xrdef {File lookup-snt}{Section'tie4.2} -'xrdef {Glyph lookup-title}{Glyph lookup} -'xrdef {Glyph lookup-pg}{40} -'xrdef {Glyph lookup-snt}{Section'tie4.3} -'xrdef {Basic glyph lookup-title}{Basic glyph lookup} -'xrdef {Basic glyph lookup-pg}{41} -'xrdef {Basic glyph lookup-snt}{Section'tie4.3.1} -'xrdef {Fontmap-title}{Fontmap} -'xrdef {Fontmap-pg}{41} -'xrdef {Fontmap-snt}{Section'tie4.3.2} -'xrdef {Fallback font-title}{Fallback font} -'xrdef {Fallback font-pg}{42} -'xrdef {Fallback font-snt}{Section'tie4.3.3} -'xrdef {Suppressing warnings-title}{Suppressing warnings} -'xrdef {Suppressing warnings-pg}{42} -'xrdef {Suppressing warnings-snt}{Section'tie4.4} -'xrdef {Programming-title}{Programming} -'xrdef {Programming-pg}{44} -'xrdef {Programming-snt}{Chapter'tie5} -'xrdef {Programming overview-title}{Programming overview} -'xrdef {Programming overview-pg}{44} -'xrdef {Programming overview-snt}{Section'tie5.1} -'xrdef {Calling sequence-title}{Calling sequence} -'xrdef {Calling sequence-pg}{44} -'xrdef {Calling sequence-snt}{Section'tie5.2} -'xrdef {Programming with config files-title}{Programming with config files} -'xrdef {Programming with config files-pg}{45} -'xrdef {Programming with config files-snt}{Section'tie5.3} -'xrdef {Index-title}{Index} -'xrdef {Index-pg}{47} -'xrdef {Index-snt}{}
--- a/kpathsea/kpathsea.cps +++ b/kpathsea/kpathsea.cps @@ -1,788 +1,808 @@ \initial {!} -\entry {\code {!! \r {in path specifications}}}{33} +\entry {\code {!! \r {in path specifications}}}{36} \initial {$} -\entry {\code {$ \r {expansion}}}{30} +\entry {\code {$ \r {expansion}}}{33} \initial {-} -\entry {\code {--color=tty}}{32} -\entry {\code {--debug=\var {num}}}{36} -\entry {\code {--dpi=\var {num}}}{34} -\entry {\code {--enable \r {options}}}{7} -\entry {\code {--enable-shared}}{9} -\entry {\code {--expand-path=\var {string}}}{36} -\entry {\code {--expand-var=\var {string}}}{36} -\entry {\code {--format=\var {name}}}{35} -\entry {\code {--help}}{37} -\entry {\code {--interactive}}{36} -\entry {\code {--mode=\var {string}}}{36} -\entry {\code {--must-exist}}{36} -\entry {\code {--path=\var {string}}}{36} -\entry {\code {--progname=\var {name}}}{36} -\entry {\code {--separator=\var {string}}}{36} -\entry {\code {--show-path=\var {name}}}{36} -\entry {\code {--srcdir\r {, for building multiple architectures}}}{8} -\entry {\code {--version}}{37} -\entry {\code {--with \r {options}}}{7} -\entry {\code {--with-maketextex-default}}{12} -\entry {\code {--without-maketexmf-default}}{12} -\entry {\code {--without-maketexpk-default}}{12} -\entry {\code {--without-maketextfm-default}}{12} -\entry {\code {-1 \r {debugging value}}}{21} -\entry {\code {-A \r {option to \code {ls}}}}{32} -\entry {\code {-Bdynamic}}{26} -\entry {\code {-Bstatic}}{26} -\entry {\code {-D \var {num}}}{34} -\entry {\code {-dynamic}}{26} -\entry {\code {-g\r {, compiling without}}}{9} -\entry {\code {-L \r {option to \code {ls}}}}{33} -\entry {\code {-maketex=\var {filetype}}}{36} -\entry {\code {-no-maketex=\var {filetype}}}{36} -\entry {\code {-O\r {, compiling with}}}{9} -\entry {\code {-static}}{26} +\entry {\code {--color=tty}}{36} +\entry {\code {--debug=\var {num}}}{40} +\entry {\code {--disable-static}}{9} +\entry {\code {--dpi=\var {num}}}{38} +\entry {\code {--enable \r {options}}}{8} +\entry {\code {--enable-maintainer-mode}}{9} +\entry {\code {--enable-shared}}{9, 10} +\entry {\code {--expand-braces=\var {string}}}{40} +\entry {\code {--expand-path=\var {string}}}{40} +\entry {\code {--expand-var=\var {string}}}{40} +\entry {\code {--format=\var {name}}}{38} +\entry {\code {--help}}{40} +\entry {\code {--interactive}}{39} +\entry {\code {--mode=\var {string}}}{39} +\entry {\code {--must-exist}}{39} +\entry {\code {--path=\var {string}}}{39} +\entry {\code {--progname=\var {name}}}{39} +\entry {\code {--show-path=\var {name}}}{40} +\entry {\code {--srcdir\r {, for building multiple architectures}}}{10} +\entry {\code {--version}}{40} +\entry {\code {--with \r {options}}}{8} +\entry {\code {--with-mktextex-default}}{13} +\entry {\code {--without-mktexmf-default}}{13} +\entry {\code {--without-mktexpk-default}}{13} +\entry {\code {--without-mktextfm-default}}{13} +\entry {\code {-1 \r {debugging value}}}{23} +\entry {\code {-A \r {option to \code {ls}}}}{36} +\entry {\code {-Bdynamic}}{29} +\entry {\code {-Bstatic}}{29} +\entry {\code {-D \var {num}}}{38} +\entry {\code {-dynamic}}{29} +\entry {\code {-g\r {, compiling without}}}{10} +\entry {\code {-L \r {option to \code {ls}}}}{36} +\entry {\code {-mktex=\var {filetype}}}{39} +\entry {\code {-no-mktex=\var {filetype}}}{39} +\entry {\code {-O\r {, compiling with}}}{10} +\entry {\code {-static}}{29} \initial {.} -\entry {\code {. \r {directories, ignored}}}{32} -\entry {\code {. \r {files}}}{32} -\entry {\code {.2602gf}}{24} -\entry {\code {.afm}}{38} -\entry {\code {.base}}{38} -\entry {\code {.bib}}{38} -\entry {\code {.bst}}{38} -\entry {\code {.cnf}}{38} -\entry {\code {.dtx}}{39} -\entry {\code {.eps}}{39} -\entry {\code {.epsi}}{39} -\entry {\code {.fmt}}{38} -\entry {\code {.gf}}{38} -\entry {\code {.ist}}{38} -\entry {\code {.ltx}}{39} -\entry {\code {.map}}{38} -\entry {\code {.mem}}{38} -\entry {\code {.mf}}{39} -\entry {\code {.mft}}{39} -\entry {\code {.mp}}{39} -\entry {\code {.ocp}}{39} -\entry {\code {.ofm}}{39} -\entry {\code {.opl}}{39} -\entry {\code {.otp}}{39} -\entry {\code {.ovf}}{39} -\entry {\code {.ovp}}{39} -\entry {\code {.pfa}}{39} -\entry {\code {.pfb}}{39} -\entry {\code {.pk}}{39} -\entry {\code {.pool}}{39} -\entry {\code {.pro}}{39} -\entry {\code {.rhosts\r {, writable by \TeX{}}}}{14} -\entry {\code {.tex}}{39} -\entry {\code {.tex \r {file, included in \file {ls-R}}}}{32} -\entry {\code {.texi}}{39} -\entry {\code {.texinfo}}{39} -\entry {\code {.tfm}}{39} -\entry {\code {.txi}}{39} -\entry {\code {.vf}}{40} +\entry {\code {. \r {directories, ignored}}}{36} +\entry {\code {. \r {files}}}{36} +\entry {\code {.2602gf}}{27} +\entry {\code {.afm}}{41} +\entry {\code {.base}}{41} +\entry {\code {.bib}}{41} +\entry {\code {.bst}}{41} +\entry {\code {.cnf}}{41} +\entry {\code {.eps}}{42} +\entry {\code {.epsi}}{42} +\entry {\code {.fmt}}{41} +\entry {\code {.ist}}{42} +\entry {\code {.map}}{42} +\entry {\code {.mem}}{42} +\entry {\code {.mf}}{42} +\entry {\code {.mft}}{42} +\entry {\code {.mp}}{42} +\entry {\code {.ocp}}{42} +\entry {\code {.ofm}}{42} +\entry {\code {.opl}}{42} +\entry {\code {.otp}}{42} +\entry {\code {.ovf}}{42} +\entry {\code {.ovp}}{42} +\entry {\code {.pfa}}{43} +\entry {\code {.pfb}}{43} +\entry {\code {.pk}}{42} +\entry {\code {.pool}}{42, 43} +\entry {\code {.pro}}{42} +\entry {\code {.rhosts\r {, writable by \TeX{}}}}{16} +\entry {\code {.tex}}{42} +\entry {\code {.tex \r {file, included in \file {ls-R}}}}{36} +\entry {\code {.tfm}}{43} +\entry {\code {.ttc}}{43} +\entry {\code {.ttf}}{43} +\entry {\code {.vf}}{43} \initial {/} -\entry {\code {/ \r {may not be /}}}{27} -\entry {\code {/\r {, trailing in home directory}}}{31} -\entry {\code {//}}{31} -\entry {\code {/afs/\dots {} \r {, installing into}}}{10} -\entry {\code {/etc/profile}}{23} -\entry {\code {/etc/profile \r {and aliases}}}{32} -\entry {\code {/var/tex/fonts}}{12} +\entry {\code {/ \r {may not be /}}}{30} +\entry {\code {/\r {, trailing in home directory}}}{34} +\entry {\code {//}}{34} +\entry {\code {/afs/\dots {} \r {, installing into}}}{12} +\entry {\code {/etc/profile}}{25} +\entry {\code {/etc/profile \r {and aliases}}}{36} +\entry {\code {/var/tmp/texfonts}}{14} \initial {:} -\entry {\code {: \r {may not be :}}}{27} -\entry {\code {:: \r {expansion}}}{29} +\entry {\code {: \r {may not be :}}}{30} +\entry {\code {:: \r {expansion}}}{32} \initial {@} -\entry {@\var {var}@ substitutions}{7} +\entry {@\var {var}@ substitutions}{8} \initial {{\tt\char '173}} -\entry {\code {{\tt\char '173} \r {expansion}}}{31} +\entry {\code {{\tt\char '173} \r {expansion}}}{34} \initial {{\tt\char '176}} -\entry {\code {~ \r {expansion}}}{30} +\entry {\code {~ \r {expansion}}}{33} \initial {{\tt\indexbackslash }} -\entry {\code {{\tt\rawbackslashxx }\r {, line continuation in \file {texmf.cnf}}}}{28} -\entry {\code {{\tt\rawbackslashxx }openin}}{27} -\entry {\code {{\tt\rawbackslashxx }special\r {, suppressing warnings about}}}{43} +\entry {\code {{\tt\rawbackslashxx }\r {, line continuation in \file {texmf.cnf}}}}{31} +\entry {\code {{\tt\rawbackslashxx }openin}}{30} +\entry {\code {{\tt\rawbackslashxx }special\r {, suppressing warnings about}}}{46} \initial {2} -\entry {\code {2602gf}}{24} +\entry {\code {2602gf}}{27} \initial {4} -\entry {4all\TeX{} Live CD-ROM}{18} +\entry {4all\TeX{} Live CD-ROM}{20} \initial {8} -\entry {8.3 filenames, using}{12} +\entry {8.3 filenames, using}{14} \initial {A} -\entry {absolute filenames}{27} -\entry {\code {ac_include\r {, Autoconf extension}}}{7} -\entry {access warnings}{27} -\entry {Acorn \TeX{} implementations}{18} -\entry {\code {AFMFONTS}}{38} -\entry {AFS}{10} -\entry {AIX shells and \code {configure}}{7} -\entry {aliases for fonts}{41} -\entry {aliases, for filenames}{33} -\entry {\code {all}}{42} -\entry {alphabetical order, not}{31} -\entry {Amiga support}{4} -\entry {Amiga \TeX{} implementations}{18} -\entry {Andrew File System, installing with}{10} -\entry {announcement mailing list}{20} -\entry {append-only directories and \code {MakeTeXPK}}{14} -\entry {\code {appendonlydir}}{12} -\entry {architecture-(in)dependent files, installing only}{10} -\entry {architectures, compiling multiple}{8} -\entry {arguments to \file {MakeTeX}}{13} -\entry {\code {argv[0]}}{44} -\entry {\code {ash\r {, losing with \code {configure}}}}{7} -\entry {\code {autoconf\r {, recommended}}}{45} -\entry {automounter, and configuration}{9} -\entry {automounter, and \file {ls-R}}{33} -\entry {auxiliary tasks}{36} +\entry {absolute filenames}{30} +\entry {\code {ac_include\r {, Autoconf extension}}}{8} +\entry {access warnings}{30} +\entry {Acorn \TeX{} implementations}{21} +\entry {\code {AFMFONTS}}{41} +\entry {AFS}{12} +\entry {AIX 4.1 \code {configure} error}{27} +\entry {AIX shells and \code {configure}}{8} +\entry {aliases for fonts}{45} +\entry {aliases, for filenames}{36} +\entry {\code {all}}{46} +\entry {alphabetical order, not}{34} +\entry {Amiga support}{5} +\entry {Amiga \TeX{} implementations}{21} +\entry {Andrew File System, installing with}{12} +\entry {announcement mailing list}{22, 23} +\entry {ANSI C}{27} +\entry {append-only directories and \code {mktexpk}}{16} +\entry {\code {appendonlydir}}{13, 14} +\entry {architecture-(in)dependent files, installing only}{12} +\entry {architectures, compiling multiple}{10} +\entry {arguments to \file {mktex}}{15} +\entry {\code {argv[0]}}{47, 48} +\entry {\code {ash\r {, losing with \code {configure}}}}{8} +\entry {\code {autoconf\r {, recommended}}}{48} +\entry {automounter, and configuration}{10} +\entry {automounter, and \file {ls-R}}{36} +\entry {auxiliary tasks}{39} \initial {B} -\entry {Babel}{5, 10} -\entry {Bach, Johann Sebastian}{30} -\entry {backbone of CTAN}{17} -\entry {backslash-newline}{28} -\entry {base dpi}{13} -\entry {\code {bash\r {, recommended for running \code {configure}}}}{7} -\entry {basic glyph lookup}{41} -\entry {\code {BIBINPUTS}}{38} -\entry {binary mode, for file transfers}{17} -\entry {blank lines, in \file {texmf.cnf}}{28} -\entry {brace expansion}{31} -\entry {BSD universe}{10} -\entry {\code {bsh\r {, ok with \code {configure}}}}{7} -\entry {\code {BSTINPUTS}}{38} -\entry {bug address}{19} -\entry {bug checklist}{19} -\entry {bug mailing list}{20} -\entry {bugs, reporting}{19} +\entry {Babel}{6, 11} +\entry {Bach, Johann Sebastian}{33} +\entry {backbone of CTAN}{18} +\entry {backslash-newline}{31} +\entry {\code {bash\r {, recommended for running \code {configure}}}}{8} +\entry {basic glyph lookup}{44} +\entry {Berry, Karl}{2} +\entry {\code {BIBINPUTS}}{41} +\entry {binary mode, for file transfers}{19} +\entry {blank lines, in \file {texmf.cnf}}{31} +\entry {brace expansion}{34} +\entry {BSD universe}{11} +\entry {\code {bsh\r {, ok with \code {configure}}}}{8} +\entry {\code {BSTINPUTS}}{41} +\entry {bug address}{21} +\entry {bug checklist}{21} +\entry {bug mailing list}{22} +\entry {bugs, reporting}{21} \initial {C} -\entry {\code {c-*.h}}{45} -\entry {\code {c-auto.h.in}}{7} -\entry {cache of fonts, loca}{14} -\entry {calling sequence}{44} -\entry {\code {CC}}{8} -\entry {\code {cc \r {warnings}}}{26} -\entry {\code {cc\r {, compiling with}}}{8} -\entry {CD-ROM distributions}{18} -\entry {\code {CFLAGS}}{8} -\entry {\code {ChangeLog \r {entry}}}{20} -\entry {checklist for bug reports}{19} -\entry {\code {checksum}}{42} -\entry {circle fonts}{41} -\entry {\code {clean \r {Make target}}}{11} -\entry {\code {client_path \r {in \code {kpse_format_info}}}}{45} -\entry {\code {cmr10\r {, as fallback font}}}{42} -\entry {\code {cmr10.vf}}{27} -\entry {\code {cnf.c}}{29} -\entry {\code {cnf.h}}{46} -\entry {code sharing}{9} -\entry {color printers, configuring}{3} -\entry {comments, in fontmap files}{41} -\entry {comments, in \file {texmf.cnf}}{28} +\entry {\code {c-*.h}}{48} +\entry {\code {c-auto.in}}{8} +\entry {cache of fonts, local}{16} +\entry {calling sequence}{47} +\entry {\code {CC}}{9} +\entry {\code {cc \r {warnings}}}{29} +\entry {\code {cc\r {, compiling with}}}{9} +\entry {CD-ROM distributions}{20} +\entry {\code {CFLAGS}}{9} +\entry {\code {ChangeLog \r {entry}}}{22} +\entry {checklist for bug reports}{21} +\entry {\code {checksum}}{46} +\entry {circle fonts}{45} +\entry {\code {clean \r {Make target}}}{12} +\entry {\code {client_path \r {in \code {kpse_format_info}}}}{48} +\entry {\code {cmr10\r {, as fallback font}}}{46} +\entry {\code {cmr10.vf}}{30} +\entry {\code {cnf.c}}{32} +\entry {\code {cnf.h}}{49} +\entry {code sharing}{10} +\entry {color printers, configuring}{5} +\entry {comments, in fontmap files}{45} +\entry {comments, in \file {texmf.cnf}}{31} \entry {comments, making}{1} -\entry {common features in glyph lookup}{41} -\entry {common problems}{22} -\entry {\code {comp.sys.sun.admin \r {FAQ}}}{25} -\entry {\code {comp.text.tex}}{20} -\entry {compilation}{3} -\entry {compilation value, source for path}{28} -\entry {compiler bugs}{24} -\entry {compiler bugs, finding}{24} -\entry {compiler options, additional}{10} -\entry {compiler options, specifying}{8} -\entry {compiler, changing}{10} +\entry {common features in glyph lookup}{44} +\entry {common problems}{25} +\entry {\code {comp.sys.sun.admin \r {FAQ}}}{29} +\entry {\code {comp.text.tex}}{23} +\entry {compilation}{4} +\entry {compilation value, source for path}{31} +\entry {compiler bugs}{27} +\entry {compiler bugs, finding}{27} +\entry {compiler options, additional}{11} +\entry {compiler options, specifying}{9} +\entry {compiler, changing}{11} +\entry {compiling on HP-UX}{27} \entry {conditions for use}{1} -\entry {config files}{28} -\entry {config files, for Kpathsea-using programs}{45} -\entry {config files, programming with}{45} -\entry {\code {config.log}}{19} -\entry {\code {config.ps\r {, search path for}}}{40} -\entry {\code {config.status}}{19} -\entry {configuration}{3} -\entry {configuration bugs}{19} -\entry {configuration compiler options}{8} -\entry {configuration file, source for path}{28} -\entry {configuration files as shell scripts.}{29} -\entry {configuration of \file {MakeTeX} scripts}{12} -\entry {configuration of optional features}{7} -\entry {\code {CONFIGURE}}{7} -\entry {\code {configure} options}{7} -\entry {\code {configure} options for \file {MakeTeX} scripts}{12} -\entry {\code {configure\r {, running}}}{7} -\entry {context diff}{20} -\entry {continuation character}{28} -\entry {core dumps, reporting}{20} -\entry {\code {CPPFLAGS}}{8} -\entry {crashes, reporting}{20} -\entry {CTAN, defined}{17} -\entry {\code {CTAN.sites}}{17} -\entry {custom installation}{4} +\entry {config files}{31} +\entry {config files, for Kpathsea-using programs}{48} +\entry {config files, programming with}{49} +\entry {\code {config.log}}{22} +\entry {\code {config.ps\r {, search path for}}}{41} +\entry {\code {config.status}}{22} +\entry {configuration}{4} +\entry {configuration bugs}{22} +\entry {configuration compiler options}{9} +\entry {configuration file, source for path}{31} +\entry {configuration files as shell scripts.}{32} +\entry {configuration of \file {mktex} scripts}{13} +\entry {configuration of optional features}{8} +\entry {\code {configure \r {error from \code {sed}}}}{27} +\entry {\code {configure} options}{8} +\entry {\code {configure} options for \file {mktex} scripts}{13} +\entry {\code {configure\r {, running}}}{8} +\entry {context diff}{22} +\entry {continuation character}{31} +\entry {core dumps, reporting}{22} +\entry {\code {CPPFLAGS}}{9} +\entry {crashes, reporting}{22} +\entry {CTAN, defined}{18} +\entry {\code {CTAN.sites}}{19} +\entry {custom installation}{5} \initial {D} -\entry {database search}{27} -\entry {database, for filenames}{32} -\entry {database, format of}{33} -\entry {DC fonts, and dynamic source creation}{11} -\entry {\code {debug.h}}{21} -\entry {debugger}{20} -\entry {debugging}{21} -\entry {debugging options, in Kpathsea-using program}{45} -\entry {debugging output}{21} -\entry {debugging with \samp {-g}, disabling}{9} -\entry {DEC shells and \code {configure}}{7} -\entry {default expansion}{29} -\entry {default path features}{5} -\entry {default paths, changing}{6} -\entry {default paths, how they're made}{6} -\entry {\code {default_texsizes}}{42} -\entry {\code {DEFS}}{8} -\entry {\code {depot}}{9} -\entry {destination directory for \code {MakeTeXPK}}{13} -\entry {directories, changing default installation}{6} -\entry {directories, making append-only}{12} -\entry {directory structure, for \TeX{} files}{15} -\entry {disabling \file {MakeTeX} scripts}{12} -\entry {disk search}{27} -\entry {disk searching, avoiding}{33} -\entry {disk space, needed}{4} -\entry {disk usage, reducing}{22} -\entry {\code {distclean \r {Make target}}}{11} -\entry {distributions, compiling simultaneously}{5} -\entry {distributions, not compiling}{5} -\entry {distributions, on CD-ROM}{18} -\entry {distributions, on tape}{18} -\entry {distributions, via ftp}{17} -\entry {\code {dlclose}}{25} -\entry {\code {dlopen}}{25} -\entry {\code {dlsym}}{25} -\entry {\code {dlsym.c}}{25} -\entry {\code {doc files}}{39} -\entry {DOS compatible names}{12} -\entry {DOS support}{4} -\entry {DOS \TeX{} implementations}{18} -\entry {\code {dosnames}}{12} -\entry {dot files}{32} -\entry {doubled colons}{29} -\entry {\code {dpi\var {nnn} directories}}{12} -\entry {DVI drivers}{5} -\entry {\code {DVILJMAKEPK}}{13} -\entry {\code {DVILJSIZES}}{42} -\entry {\code {DVIPSFONTS}}{40} -\entry {\code {DVIPSHEADERS}}{39} -\entry {\code {DVIPSMAKEPK}}{13} -\entry {\code {DVIPSSIZES}}{42} -\entry {dynamic creation of files}{11} -\entry {dynamic linking problems with OpenWin libraries}{25} +\entry {Dante \TeX{} CD-ROM}{20} +\entry {database search}{30} +\entry {database, for filenames}{35} +\entry {database, format of}{37} +\entry {\code {debug.h}}{23} +\entry {debugger}{22} +\entry {debugging}{23} +\entry {debugging options, in Kpathsea-using program}{48} +\entry {debugging output}{23} +\entry {debugging with \samp {-g}, disabling}{10} +\entry {DEC shells and \code {configure}}{8} +\entry {default expansion}{32} +\entry {default path features}{7} +\entry {default paths, changing}{7} +\entry {default paths, how they're made}{7} +\entry {\code {default_texsizes}}{46} +\entry {\code {DEFS}}{9} +\entry {\code {depot}}{10} +\entry {directories, changing default installation}{7} +\entry {directories, making append-only}{14} +\entry {directory permissions}{16} +\entry {directory structure, for \TeX{} files}{16} +\entry {disabling \file {mktex} scripts}{13} +\entry {disk search}{30} +\entry {disk searching, avoiding}{36} +\entry {disk space, needed}{5} +\entry {disk usage, reducing}{25} +\entry {\code {distclean \r {Make target}}}{12} +\entry {distributions, compiling simultaneously}{6} +\entry {distributions, not compiling}{6} +\entry {distributions, on CD-ROM}{20} +\entry {distributions, on tape}{20} +\entry {distributions, via ftp}{18} +\entry {\code {dlclose}}{28} +\entry {\code {dlopen}}{28} +\entry {\code {dlsym}}{28} +\entry {\code {dlsym.c}}{28} +\entry {\code {doc files}}{43} +\entry {DOS compatible names}{14} +\entry {DOS support}{5} +\entry {DOS \TeX{} implementations}{21} +\entry {\code {dosnames}}{14} +\entry {dot files}{36} +\entry {doubled colons}{32} +\entry {\code {dpi\var {nnn} directories}}{14} +\entry {DVI drivers}{6} +\entry {\code {DVILJMAKEPK}}{15} +\entry {\code {DVILJSIZES}}{46} +\entry {\code {DVIPSFONTS}}{43} +\entry {\code {DVIPSHEADERS}}{43} +\entry {\code {DVIPSMAKEPK}}{15} +\entry {\code {DVIPSSIZES}}{46} +\entry {dynamic creation of files}{13} +\entry {dynamic linking problems with OpenWin libraries}{29} \initial {E} -\entry {\code {elt-dirs.c}}{32} -\entry {email CTAN access}{17} -\entry {enabling \file {MakeTeX} scripts}{12} -\entry {environment variable, source for path}{28} -\entry {environment variables for \TeX{}}{38} -\entry {environment variables in paths}{30} -\entry {environment variables, old}{23} -\entry {epoch, seconds since}{22} -\entry {error message macros}{44} -\entry {excessive startup time}{23} -\entry {\code {expand.c}}{31} -\entry {expanding symlinks}{44} -\entry {expansion, default}{29} -\entry {expansion, path element}{27} -\entry {expansion, search path}{29} -\entry {expansion, subdirectory}{31} -\entry {expansion, tilde}{30} -\entry {expansion, variable}{30} -\entry {explicitly relative filenames}{27} -\entry {externally-built filename database}{32} -\entry {extra colons}{29} -\entry {\code {extraclean \r {Make target}}}{11} +\entry {EC fonts, and dynamic source creation}{13} +\entry {\code {elt-dirs.c}}{35} +\entry {email CTAN access}{19} +\entry {enabling \file {mktex} scripts}{13} +\entry {environment variable, source for path}{31} +\entry {environment variables for \TeX{}}{41} +\entry {environment variables in paths}{33} +\entry {environment variables, old}{25} +\entry {epoch, seconds since}{25} +\entry {error message macros}{47} +\entry {excessive startup time}{26} +\entry {\code {expand.c}}{34} +\entry {expanding symlinks}{47} +\entry {expansion, default}{32} +\entry {expansion, path element}{30} +\entry {expansion, search path}{32} +\entry {expansion, subdirectory}{34} +\entry {expansion, tilde}{33} +\entry {expansion, variable}{33} +\entry {explicitly relative filenames}{30} +\entry {externally-built filename database}{35} +\entry {extra colons}{32} +\entry {\code {extraclean \r {Make target}}}{12} \initial {F} -\entry {failed \code {MakeTeX\dots {}} script invocation}{13} -\entry {fallback font}{42} -\entry {fallback resolutions}{42} -\entry {fallback resolutions, overriding}{9} -\entry {FAQ, \t {comp.sys.sun.admin}}{25} -\entry {FAQ, Kpathsea}{22} -\entry {Farwell, Matthew}{31} -\entry {features, of default paths}{5} -\entry {file formats, supported}{38} -\entry {file lookup}{40} -\entry {file types, registering new}{44} -\entry {filename aliases}{33} -\entry {filename database}{32} -\entry {filename database generation}{11} -\entry {filenames, absolute or explicitly relative}{27} -\entry {files, unable to find}{23} -\entry {filesystem search}{27} -\entry {floating directories}{27} -\entry {font alias files}{41} -\entry {font generation failures}{24} -\entry {font of last resort}{42} -\entry {font set, infinite}{11} -\entry {fontmap files}{41} -\entry {fontnames, arbitrary length}{41} -\entry {fonts, being created}{4} -\entry {\code {fopen\r {, redefined}}}{21} -\entry {format of external database}{33} -\entry {Free Software Foundation}{18} -\entry {FreeBSD shells and \code {configure}}{7} -\entry {FSF Source Code CD-ROM}{18} -\entry {ftp retrieval}{17} -\entry {\code {ftp.tug.org}}{16} +\entry {failed \code {mktex\dots {}} script invocation}{15} +\entry {fallback font}{46} +\entry {fallback resolutions}{46} +\entry {fallback resolutions, overriding}{11} +\entry {FAQ, \t {comp.sys.sun.admin}}{29} +\entry {FAQ, Kpathsea}{25} +\entry {Farwell, Matthew}{35} +\entry {features, of default paths}{7} +\entry {file formats, supported}{41} +\entry {file lookup}{44} +\entry {file permissions}{16} +\entry {file types, registering new}{47} +\entry {filename aliases}{36} +\entry {filename database}{35} +\entry {filename database generation}{12} +\entry {filenames, absolute or explicitly relative}{30} +\entry {files, unable to find}{25} +\entry {filesystem search}{30} +\entry {floating directories}{30} +\entry {font alias files}{45} +\entry {font generation failures}{26} +\entry {font of last resort}{46} +\entry {font set, infinite}{13} +\entry {fontmap files}{45} +\entry {\code {fontmaps}}{14} +\entry {fontname}{14} +\entry {fontnames, arbitrary length}{45} +\entry {fonts, being created}{5} +\entry {\code {FOOINPUTS}}{43} +\entry {\code {fopen\r {, redefined}}}{24} +\entry {format of external database}{37} +\entry {Free Software Foundation}{20} +\entry {FreeBSD \code {configure} error}{27} +\entry {FreeBSD shells and \code {configure}}{8} +\entry {FSF Source Code CD-ROM}{20} +\entry {ftp retrieval}{18} +\entry {\code {ftp.tug.org}}{18} \entry {fundamental purpose of Kpathsea}{1} \initial {G} -\entry {\code {gcc\r {, compiling with}}}{8} -\entry {\code {gdb\r {, recommended}}}{20} -\entry {generation of filename database}{11} -\entry {\code {get_applicationShellWidgetClass}}{25} -\entry {\code {get_wmShellWidgetClass}}{25} -\entry {\code {GFFONTS}}{38} -\entry {globally writable directories}{14} -\entry {glyph lookup}{40} -\entry {glyph lookup bitmap tolerance}{41} -\entry {\code {GLYPHFONTS}}{38, 39} -\entry {GNU C compiler bugs}{24} +\entry {\code {gcc\r {, compiling with}}}{9} +\entry {\code {gdb\r {, recommended}}}{22} +\entry {generation of filename database}{12} +\entry {German \TeX{} CD info}{20} +\entry {\code {get_applicationShellWidgetClass}}{29} +\entry {\code {get_wmShellWidgetClass}}{29} +\entry {\code {gf}}{41} +\entry {\code {GFFONTS}}{41} +\entry {globally writable directories}{16} +\entry {glyph lookup}{44} +\entry {glyph lookup bitmap tolerance}{44} +\entry {\code {GLYPHFONTS}}{41, 42} +\entry {GNU C compiler bugs}{27} \entry {GNU General Public License}{1} -\entry {Gopher CTAN access}{17} -\entry {group-writable directories}{14} -\entry {GUTenberg}{18} +\entry {Gopher CTAN access}{19} +\entry {group-writable directories}{16} +\entry {\code {GSFTOPK_DEBUG \r {(128)}}}{24} +\entry {GUTenberg}{20} \initial {H} -\entry {hash table buckets, printing}{22} -\entry {hash table routines}{45} -\entry {\code {hash_summary_only \r {variable for debugging}}}{22} -\entry {help, mailing list for general \TeX{}}{20} -\entry {\code {HIER}}{6} -\entry {history of Kpathsea}{1} -\entry {home directories in paths}{30} -\entry {\code {HOME\r {, as ~ expansion}}}{30} +\entry {hash table buckets, printing}{24} +\entry {hash table routines}{48} +\entry {\code {hash_summary_only \r {variable for debugging}}}{24} +\entry {help, mailing list for general \TeX{}}{23} +\entry {\code {HIER}}{7} +\entry {history of Kpathsea}{2} +\entry {home directories in paths}{33} +\entry {\code {HOME\r {, as ~ expansion}}}{33} +\entry {HP-UX, compiling on}{27} \initial {I} -\entry {identifiers, characters valid in}{28} -\entry {illegal pointer combination warnings}{26} -\entry {\code {include \r {fontmap directive}}}{41} -\entry {\code {INDEXSTYLE}}{38} -\entry {\code {info-tex@shsu.edu}}{20} -\entry {input lines, reading}{45} -\entry {\code {install-data \r {Make target}}}{10} -\entry {\code {install-exec \r {Make target}}}{10} -\entry {installation}{3} -\entry {installation testing}{14} -\entry {installation, architecture-(in)dependent files only}{10} -\entry {installation, changing default directories}{6} -\entry {installation, customized}{4} -\entry {installation, getting executables instead of}{3} -\entry {installation, simple}{3} -\entry {installing files}{10} -\entry {interactive query}{36} +\entry {identifiers, characters valid in}{31} +\entry {illegal pointer combination warnings}{29} +\entry {\code {include \r {fontmap directive}}}{45} +\entry {\code {INDEXSTYLE}}{42} +\entry {\code {info-tex@shsu.edu}}{23} +\entry {input lines, reading}{48} +\entry {\code {install-data \r {Make target}}}{12} +\entry {\code {install-exec \r {Make target}}}{12} +\entry {installation}{4} +\entry {installation testing}{15} +\entry {installation, architecture-(in)dependent files only}{12} +\entry {installation, changing default directories}{7} +\entry {installation, customized}{5} +\entry {installation, getting executables instead of}{4} +\entry {installation, simple}{4} +\entry {installing files}{11} +\entry {interactive query}{39} \entry {interface, not frozen}{1} \entry {introduction}{1} \initial {K} -\entry {\samp {kdebug:}}{22} -\entry {\code {kdefault.c}}{30} -\entry {Knuth, Donald E.}{1} -\entry {Knuth, Donald E., archive of programs by}{19} -\entry {Knuth, Donald E., original author}{17} -\entry {Korn shell\r {, losing with \code {configure}}}{7} -\entry {Kpathsea config file, source for path}{28} -\entry {Kpathsea version number}{5} -\entry {\code {kpathsea.h}}{44} -\entry {\code {kpathsea/CONFIGURE}}{7} -\entry {\code {kpathsea/HIER}}{6} -\entry {\code {kpathsea_debug}}{21} -\entry {\code {KPATHSEA_DEBUG}}{21, 44} -\entry {\code {kpathsea_debug \r {variable}}}{45} -\entry {\code {KPATHSEA_DPI}}{13} -\entry {\code {KPSE_BITMAP_TOLERANCE}}{41} -\entry {\code {kpse_cnf_get}}{46} -\entry {\code {KPSE_DEBUG_EXPAND \r {(16)}}}{21, 22} -\entry {\code {KPSE_DEBUG_FOPEN \r {(4)}}}{21} -\entry {\code {KPSE_DEBUG_HASH \r {(2)}}}{21} -\entry {\code {KPSE_DEBUG_PATHS \r {(8)}}}{21} -\entry {\code {KPSE_DEBUG_SEARCH \r {(32)}}}{21, 22} -\entry {\code {KPSE_DEBUG_STAT \r {(1)}}}{21} -\entry {\code {kpse_fallback_font}}{42} -\entry {\code {kpse_find_*}}{45} -\entry {\code {kpse_find_file}}{40} -\entry {\code {kpse_find_glyph_format}}{41} -\entry {\code {kpse_format_info}}{45} -\entry {\code {kpse_format_info_type}}{21} -\entry {\code {kpse_init_prog}}{45} -\entry {\code {kpse_init_prog\r {, and \code {MAKETEX_MODE}}}}{6} -\entry {\code {kpse_make_specs}}{13} -\entry {\code {kpse_open_file}}{45} -\entry {\code {kpse_set_progname}}{44} -\entry {\code {kpse_var_expand}}{45} -\entry {\code {kpsewhich}}{34} -\entry {Kpsewhich, and debugging}{21} -\entry {\code {ksh\r {, losing with \code {configure}}}}{7} +\entry {\samp {kdebug:}}{24} +\entry {\code {kdefault.c}}{33} +\entry {Knuth, Donald E.}{2} +\entry {Knuth, Donald E., archive of programs by}{21} +\entry {Knuth, Donald E., original author}{19} +\entry {Korn shell\r {, losing with \code {configure}}}{8} +\entry {Kpathsea config file, source for path}{31} +\entry {Kpathsea version number}{6} +\entry {\code {kpathsea.h}}{47} +\entry {\code {kpathsea/HIER}}{7} +\entry {\code {kpathsea/README.CONFIGURE}}{8} +\entry {\code {kpathsea_debug}}{23} +\entry {\code {KPATHSEA_DEBUG}}{23, 47} +\entry {\code {kpathsea_debug \r {variable}}}{48} +\entry {\code {KPSE_BITMAP_TOLERANCE}}{44} +\entry {\code {kpse_cnf_get}}{49} +\entry {\code {KPSE_DEBUG_EXPAND \r {(16)}}}{24} +\entry {\code {KPSE_DEBUG_FOPEN \r {(4)}}}{23, 24} +\entry {\code {KPSE_DEBUG_HASH \r {(2)}}}{23} +\entry {\code {KPSE_DEBUG_PATHS \r {(8)}}}{24} +\entry {\code {KPSE_DEBUG_SEARCH \r {(32)}}}{24} +\entry {\code {KPSE_DEBUG_STAT \r {(1)}}}{23} +\entry {\code {KPSE_DEBUG_VARS \r {(64)}}}{24} +\entry {\code {KPSE_DOT \r {expansion}}}{34} +\entry {\code {kpse_fallback_font}}{46} +\entry {\code {kpse_find_*}}{48} +\entry {\code {kpse_find_file}}{44, 48} +\entry {\code {kpse_find_glyph_format}}{44} +\entry {\code {kpse_format_info}}{48} +\entry {\code {kpse_format_info_type}}{24} +\entry {\code {kpse_init_prog}}{48} +\entry {\code {kpse_init_prog\r {, and \code {MAKETEX_MODE}}}}{7} +\entry {\code {kpse_make_specs}}{14} +\entry {\code {kpse_open_file}}{48} +\entry {\code {kpse_program_name}}{47} +\entry {\code {kpse_set_progname}}{48} +\entry {\code {kpse_set_program_name}}{47} +\entry {\code {kpse_var_value}}{49} +\entry {\code {kpsewhich}}{37} +\entry {Kpsewhich, and debugging}{23} +\entry {\code {ksh\r {, losing with \code {configure}}}}{8} \initial {L} -\entry {\code {labrea.stanford.edu}}{19} -\entry {LaserJet drive}{5} -\entry {last-resort font}{42} -\entry {La\TeX{} help mailing list}{20} -\entry {\code {lcircle10}}{41} -\entry {\code {LDFLAGS}}{8} -\entry {leading colons}{29} -\entry {leaf directories wrongly guessed}{23} -\entry {leaf directory trick}{31} -\entry {\code {libdl.a}}{25} -\entry {libraries, changing}{10} -\entry {libraries, specifying additional}{8} -\entry {\code {LIBS}}{8} -\entry {\code {libucb\r {, avoiding}}}{10} +\entry {\code {labrea.stanford.edu}}{21} +\entry {LaserJet drive}{6} +\entry {last-resort font}{46} +\entry {La\TeX{} help mailing list}{23} +\entry {\code {lcircle10}}{45} +\entry {\code {LDFLAGS}}{9} +\entry {leading colons}{32} +\entry {leaf directories wrongly guessed}{25} +\entry {leaf directory trick}{35} +\entry {\code {libdl.a}}{28} +\entry {libraries, changing}{11} +\entry {libraries, specifying additional}{9} +\entry {\code {LIBS}}{9} +\entry {\code {libucb\r {, avoiding}}}{11} \entry {license for using the library}{1} -\entry {lines, reading arbitrary-length}{45} -\entry {Linux File System Standard}{12} -\entry {Linux shells and \code {configure}}{7} -\entry {Linux, using Web2c}{18} -\entry {\code {lndir \r {for building symlink trees}}}{8} -\entry {loader options}{8} -\entry {loader options, final}{10} -\entry {loader options, initial}{10} -\entry {local cache of fonts}{14} -\entry {log file}{22} -\entry {logging successful searches}{22} -\entry {\code {lost+found \r {directory}}}{27} -\entry {\code {lostchar}}{42, 43} -\entry {\code {ls-R}}{38} -\entry {\code {ls-R \r {and AFS}}}{11} -\entry {\code {ls-R \r {database file}}}{32} -\entry {\code {ls-R\r {, simplest build}}}{32} +\entry {lines, reading arbitrary-length}{48} +\entry {Linux File System Standard}{14} +\entry {Linux shells and \code {configure}}{8} +\entry {Linux, using Web2c}{20} +\entry {\code {lndir \r {for building symlink trees}}}{10} +\entry {loader options}{9} +\entry {loader options, final}{11} +\entry {loader options, initial}{11} +\entry {local cache of fonts}{16} +\entry {log file}{25} +\entry {logging successful searches}{25} +\entry {\code {lost+found \r {directory}}}{30} +\entry {\code {lostchar}}{46} +\entry {\code {ls-R}}{42} +\entry {\code {ls-R \r {and AFS}}}{12} +\entry {\code {ls-R \r {database file}}}{35} +\entry {\code {ls-R\r {, simplest build}}}{36} \initial {M} -\entry {Macintosh \TeX{} implementations}{18} -\entry {MacKenzie, David}{2, 31} -\entry {\code {mag \r {Metafont variable}}}{13} -\entry {magic characters}{27} -\entry {magstep for \code {MakeTeXPK}}{13} -\entry {mailing lists}{20} -\entry {\code {maintainer-clean \r {Make target}}}{11} -\entry {Make arguments, additional}{10} -\entry {\code {make\r {, running}}}{9} -\entry {\code {Makefile.in}}{7} -\entry {\file {MakeTeX} script configuration}{12} -\entry {\file {MakeTeX} script names}{13} -\entry {\file {MakeTeX} scripts}{11} -\entry {\code {MakeTeX.site}}{12} -\entry {\code {MAKETEX_BASE_DPI}}{13} -\entry {\code {MAKETEX_MAG}}{13} -\entry {\code {MAKETEX_MODE}}{6, 13} -\entry {\code {MakeTeXMF}}{13} -\entry {\code {MakeTeXmkdir}}{12} -\entry {\code {MakeTeXnames.cnf}}{12} -\entry {\code {MakeTeXPK}}{13} -\entry {\code {MakeTeXPK \r {, initial runs}}}{4} -\entry {\code {MAKETEXPK \r {environment variable}}}{14} -\entry {\code {MakeTeXTeX}}{13} -\entry {\code {MakeTeXTFM}}{13} -\entry {memory allocation routines}{45} -\entry {Metafont failures}{24} -\entry {Metafont installation}{24} -\entry {Metafont making too-large fonts}{24} -\entry {Metafont mode name for \code {MakeTeXPK}}{13} -\entry {Metafont using the wrong resolution}{24} -\entry {\code {MFBASES}}{38} -\entry {\code {MFINPUTS}}{39} -\entry {\code {MFPOOL}}{39} -\entry {\code {MFTINPUTS}}{39} -\entry {mirrors, FTP}{17} -\entry {mismatched checksum warnings}{42} -\entry {\code {missfont.log}}{13} -\entry {\code {MISSFONT_LOG}}{13} -\entry {missing character warnings}{43} -\entry {mode directory, omitting}{12} -\entry {\code {mode \r {Metafont variable}}}{13} -\entry {Morgan, Tim}{1} -\entry {\code {mostlyclean \r {Make target}}}{11} -\entry {\code {MPINPUTS}}{39} -\entry {\code {MPMEMS}}{38} -\entry {\code {MPPOOL}}{39} -\entry {\code {MPSUPPORT}}{39} -\entry {\code {MT_FEATURES}}{12} -\entry {\code {mtp_destdir}}{13} -\entry {multiple architectures, compiling on}{8} -\entry {multiple architectures, directories for}{9} -\entry {multiple architectures, installing on}{10} -\entry {multiple \TeX{} hierarchies}{31} -\entry {must exist}{27} +\entry {Mach10 \code {configure} error}{27} +\entry {Macintosh \TeX{} implementations}{21} +\entry {MacKenzie, David}{2, 35} +\entry {magic characters}{30} +\entry {mailing lists}{22} +\entry {\code {maintainer-clean \r {Make target}}}{12} +\entry {Make arguments, additional}{11} +\entry {\code {make\r {, running}}}{11} +\entry {\code {Makefile.in}}{8} +\entry {Makefiles, empty}{27} +\entry {\code {MAKETEX_DEBUG \r {(512)}}}{24} +\entry {\code {MAKETEX_FINE_DEBUG \r {(1024)}}}{24} +\entry {\code {MAKETEX_MODE}}{7} +\entry {memory allocation routines}{48} +\entry {Metafont failures}{27} +\entry {Metafont installation}{26} +\entry {Metafont making too-large fonts}{27} +\entry {Metafont using the wrong resolution}{26} +\entry {\code {MFBASES}}{41} +\entry {\code {MFINPUTS}}{42} +\entry {\code {MFPOOL}}{42} +\entry {\code {MFTINPUTS}}{42} +\entry {mirrors, FTP}{19} +\entry {mismatched checksum warnings}{46} +\entry {\code {missfont.log}}{15} +\entry {\code {MISSFONT_LOG}}{15} +\entry {missing character warnings}{46} +\entry {\file {mktex} script configuration}{13} +\entry {\file {mktex} script names}{14} +\entry {\file {mktex} scripts}{13} +\entry {\code {mktex.cnf}}{13} +\entry {\code {mktex.opt}}{13} +\entry {\code {mktexdir}}{14} +\entry {\code {mktexmf}}{15} +\entry {\code {mktexpk}}{15} +\entry {\code {mktexpk \r {, initial runs}}}{5} +\entry {\code {mktextex}}{15} +\entry {\code {mktextfm}}{15} +\entry {mode directory, omitting}{14} +\entry {Morgan, Tim}{2} +\entry {\code {mostlyclean \r {Make target}}}{12} +\entry {\code {MPINPUTS}}{42} +\entry {\code {MPMEMS}}{42} +\entry {\code {MPPOOL}}{42} +\entry {\code {MPSUPPORT}}{42} +\entry {\code {MT_FEATURES}}{13} +\entry {multiple architectures, compiling on}{10} +\entry {multiple architectures, directories for}{10} +\entry {multiple architectures, installing on}{12} +\entry {multiple \TeX{} hierarchies}{34} +\entry {must exist}{30} \initial {N} -\entry {names for \file {MakeTeX} scripts}{13} -\entry {NetBSD shells and \code {configure}}{7} +\entry {names for \file {mktex} scripts}{14} +\entry {NetBSD \code {configure} error}{27} +\entry {NetBSD shells and \code {configure}}{8} \entry {Neumann, Gustaf}{2} -\entry {newsgroup for \TeX{}}{20} -\entry {NeXT, lacking X11}{5} -\entry {NFS and \file {ls-R}}{33} -\entry {NFS CTAN access}{17} -\entry {\code {nomode}}{12} -\entry {non-English typesetting}{5} -\entry {non-Unix operating systems}{4} -\entry {Northwest Computing Support Center}{18} -\entry {NTG}{18} -\entry {null pointers, dereferencing}{20} -\entry {numeric debugging values}{21} +\entry {newsgroup for \TeX{}}{23} +\entry {NeXT \code {sed} error}{27} +\entry {NeXT, lacking X11}{6} +\entry {NFS and \file {ls-R}}{36} +\entry {NFS CTAN access}{19} +\entry {\code {nomode}}{14} +\entry {non-English typesetting}{6} +\entry {non-Unix operating systems}{5} +\entry {Northwest Computing Support Center}{20} +\entry {NTG}{20} +\entry {null pointers, dereferencing}{22} +\entry {numeric debugging values}{23} \initial {O} -\entry {obtaining \TeX{}}{16} -\entry {obtaining \TeX{} on tape}{18} -\entry {obtaining Web2c by ftp}{17} -\entry {obtaining Web2c on CD-ROM}{18} -\entry {\code {OCPINPUTS}}{39} -\entry {\code {OFMFONTS}}{39} -\entry {online Metafont display, spurious}{24} -\entry {OpenWin libraries, dynamic linking problems}{25} -\entry {optimization caveat}{24} -\entry {optimization, enabling}{9} -\entry {options for debugging}{21} -\entry {options to \code {configure}}{7} -\entry {OS/2 support}{4} -\entry {other \TeX{} distributions}{18} -\entry {\code {OTPINPUTS}}{39} -\entry {overview of path searching}{27} -\entry {overview of programming with Kpathsea}{44} -\entry {\code {OVFFONTS}}{39} -\entry {\code {OVPFONTS}}{39} +\entry {obtaining \TeX{}}{18} +\entry {obtaining \TeX{} on tape}{20} +\entry {obtaining Web2c by ftp}{18} +\entry {obtaining Web2c on CD-ROM}{20} +\entry {\code {OCPINPUTS}}{42} +\entry {\code {OFMFONTS}}{42} +\entry {online Metafont display, spurious}{27} +\entry {OpenWin libraries, dynamic linking problems}{29} +\entry {optimization caveat}{27} +\entry {optimization, enabling}{10} +\entry {options for debugging}{23} +\entry {options to \code {configure}}{8} +\entry {OS/2 support}{5} +\entry {other \TeX{} distributions}{21} +\entry {\code {OTPINPUTS}}{42} +\entry {overview of path searching}{30} +\entry {overview of programming with Kpathsea}{47} +\entry {\code {OVFFONTS}}{42} +\entry {\code {OVPFONTS}}{42} \initial {P} -\entry {patches, Sun OpenWin}{26} -\entry {path expansion}{29} -\entry {path searching}{27} -\entry {path searching options}{34} -\entry {path searching, overview}{27} -\entry {path searching, standalone}{34} -\entry {path sources}{28} -\entry {paths, changing default}{5, 6} -\entry {paths, device name included in}{6} -\entry {\code {paths.h}}{6} -\entry {\code {paths.h\r {, creating}}}{9} -\entry {\code {pathsearch.h}}{44} -\entry {\code {pc \r {Pascal compiler}}}{1} -\entry {PCL driver}{5} -\entry {PDF generation}{5} -\entry {permission denied}{27} -\entry {\code {PKFONTS}}{39} -\entry {\code {plain.base}}{24} -\entry {pointer combination warnings}{26} -\entry {PostScript driver}{5} -\entry {PostScript fonts, additional}{3} -\entry {precompiled executables, instead of installation}{3} -\entry {precompiled Unix binaries}{18} -\entry {preprocessor options}{8} -\entry {preprocessor options, additional}{9} -\entry {Prime Time \TeX{}cetera CD-ROM}{18} -\entry {printer configuration files}{3} -\entry {privacy, semblance of}{22} -\entry {problems, common}{22} -\entry {\code {proginit.c}}{6} -\entry {\code {proginit.h}}{45} -\entry {program-varying paths}{38} -\entry {\code {program_invocation_name}}{44} -\entry {\code {program_invocation_short_name}}{44} -\entry {programming overview}{44} -\entry {programming with config files}{45} -\entry {programming with Kpathsea}{44} +\entry {patches, Sun OpenWin}{29} +\entry {path expansion}{32} +\entry {path searching}{30} +\entry {path searching options}{38} +\entry {path searching, overview}{30} +\entry {path searching, standalone}{37} +\entry {path sources}{31} +\entry {paths, changing default}{6, 7} +\entry {paths, device name included in}{7} +\entry {\code {paths.h}}{8} +\entry {\code {paths.h\r {, creating}}}{11} +\entry {\code {pathsearch.h}}{47} +\entry {\code {pc \r {Pascal compiler}}}{2} +\entry {PCL driver}{6} +\entry {PDF generation}{6} +\entry {permission denied}{30} +\entry {permissions, directory}{16} +\entry {permissions, file}{16} +\entry {\code {PKFONTS}}{42} +\entry {\code {plain.base}}{27} +\entry {pointer combination warnings}{29} +\entry {PostScript driver}{6} +\entry {PostScript fonts, additional}{5} +\entry {precompiled executables, instead of installation}{4} +\entry {precompiled Unix binaries}{21} +\entry {preprocessor options}{9} +\entry {preprocessor options, additional}{11} +\entry {Prime Time \TeX{}cetera CD-ROM}{20} +\entry {printer configuration files}{5} +\entry {privacy, semblance of}{25} +\entry {problems, common}{25} +\entry {\code {proginit.c}}{7} +\entry {\code {proginit.h}}{48} +\entry {program-varying paths}{41} +\entry {\code {program_invocation_name}}{47} +\entry {\code {program_invocation_short_name}}{47} +\entry {programming overview}{47} +\entry {programming with config files}{49} +\entry {programming with Kpathsea}{47} \entry {programs using the library}{1} -\entry {proof mode}{24} -\entry {\code {PSHEADERS}}{39} -\entry {\code {pxp \r {Pascal preprocessor}}}{1} +\entry {proof mode}{27} +\entry {\code {PSHEADERS}}{42} +\entry {\code {pxp \r {Pascal preprocessor}}}{2} \initial {Q} -\entry {quoting variable values}{30} +\entry {quoting variable values}{33} \initial {R} -\entry {\code {readable}}{43} -\entry {reading arbitrary-length lines}{45} -\entry {\code {README.mirrors}}{17} -\entry {recording successful searches}{22} -\entry {relative filenames}{27} -\entry {relative filenames in \file {ls-R}}{11} -\entry {reporting bugs}{19} -\entry {\code {resident.c}}{45} -\entry {resolution, setting}{34} -\entry {resolution, wrong}{24} -\entry {resolutions, last-resort}{42} -\entry {retrieving \TeX{}}{16} -\entry {right-hand side of variable assignments}{29} -\entry {Rokicki, Tom}{1} -\entry {\t {root} user}{31} -\entry {runtime configuration files}{28} -\entry {runtime debugging}{21} +\entry {\code {readable}}{46} +\entry {reading arbitrary-length lines}{48} +\entry {\code {README.CONFIGURE}}{8} +\entry {\code {README.mirrors}}{19} +\entry {recording successful searches}{25} +\entry {relative filenames}{30} +\entry {relative filenames in \file {ls-R}}{12} +\entry {reporting bugs}{21} +\entry {\code {resident.c}}{48} +\entry {resolution, setting}{38} +\entry {resolution, wrong}{26} +\entry {resolutions, last-resort}{46} +\entry {retrieving \TeX{}}{18} +\entry {right-hand side of variable assignments}{32} +\entry {Rokicki, Tom}{2} +\entry {\t {root} user}{34} +\entry {runtime configuration files}{31} +\entry {runtime debugging}{23} \initial {S} -\entry {Sauter fonts, and dynamic source creation}{11} -\entry {scripts for file creation}{11} -\entry {search path, defined}{27} -\entry {search paths, changing default}{5} -\entry {searching for files}{40} -\entry {searching for glyphs}{40} -\entry {searching overview}{27} -\entry {searching the database}{27} -\entry {searching the disk}{27} -\entry {security considerations}{14} -\entry {SELFAUTODIR}{44} -\entry {SELFAUTOLOC}{44} -\entry {SELFAUTOPARENT}{44} -\entry {sending patches}{20} -\entry {setgid scripts}{14} -\entry {\code {sh5\r {, ok with \code {configure}}}}{7} -\entry {shar\r {, recommended}}{20} -\entry {shared library, making}{9} -\entry {shell scripts as configuration files}{29} -\entry {shell variables}{30} -\entry {\code {shell_escape\r {, example for code}}}{45} -\entry {shells and \code {configure}}{7} -\entry {simple installation}{3} -\entry {site overrides for \code {MakeTeX\dots {}}}{12} -\entry {size of distribution archives}{4} -\entry {skeleton \TeX{} directory}{15} -\entry {slow startup time}{23} -\entry {Solaris BSD compatibility, not}{10} -\entry {\code {source files}}{39} -\entry {sources for search paths}{28} -\entry {\code {special}}{43} -\entry {specification for \code {MakeTeXPK}}{14} -\entry {\code {st_nlink}}{31} -\entry {stack trace}{20} -\entry {standalone path searching}{34} -\entry {standard error and debugging output}{21} -\entry {standard options}{37} -\entry {startup time, excessive}{23} -\entry {static linking}{26} -\entry {static linking and \code {dlsym}}{25} -\entry {string routines}{45} -\entry {\code {strip}}{12} -\entry {subdirectory searching}{31} +\entry {Sauter fonts, and dynamic source creation}{13} +\entry {scripts for file creation}{13} +\entry {search path, defined}{30} +\entry {search paths, changing default}{6} +\entry {searching for files}{44} +\entry {searching for glyphs}{44} +\entry {searching overview}{30} +\entry {searching the database}{30} +\entry {searching the disk}{30} +\entry {security considerations}{16} +\entry {\code {sed \r {error from \code {configure}}}}{27} +\entry {SELFAUTODIR}{47} +\entry {SELFAUTOLOC}{47} +\entry {SELFAUTOPARENT}{47} +\entry {sending patches}{22} +\entry {setgid scripts}{16} +\entry {\code {sh5\r {, ok with \code {configure}}}}{8} +\entry {shar\r {, recommended}}{22} +\entry {shared library, making}{10} +\entry {shell scripts as configuration files}{32} +\entry {shell variables}{33} +\entry {\code {shell_escape\r {, example for code}}}{49} +\entry {shells and \code {configure}}{8} +\entry {simple installation}{4} +\entry {site overrides for \code {mktex\dots {}}}{13} +\entry {size of distribution archives}{5} +\entry {skeleton \TeX{} directory}{16} +\entry {slow startup time}{26} +\entry {Solaris BSD compatibility, not}{11} +\entry {\code {source files}}{43} +\entry {sources for search paths}{31} +\entry {\code {special}}{46} +\entry {\code {st_nlink}}{35} +\entry {stack trace}{22} +\entry {standalone path searching}{37} +\entry {standard error and debugging output}{23} +\entry {standard options}{40} +\entry {startup time, excessive}{26} +\entry {static linking}{29} +\entry {static linking and \code {dlsym}}{28} +\entry {string routines}{48} +\entry {\code {strip}}{14} +\entry {\code {stripsupplier}}{14} +\entry {\code {striptypeface}}{14} +\entry {subdirectory searching}{34} \entry {suggestions, making}{1} -\entry {Sun 2}{1} -\entry {Sun OpenWin patches}{26} -\entry {supplier directory, omitting}{12} -\entry {support organization}{18} -\entry {supported file formats}{38} -\entry {suppressing warnings}{42} -\entry {symbolic link trees, for multiple architectures}{8} -\entry {symbolic links not found}{23} -\entry {symbolic links, and \file {ls-R}}{33} -\entry {symlinks, resolving}{44} -\entry {system C compiler bugs}{24} -\entry {system dependencies}{7} -\entry {system V universe}{10} +\entry {Sun 2}{2} +\entry {Sun OpenWin patches}{29} +\entry {supplier directory, omitting}{14} +\entry {support organization}{20} +\entry {supported file formats}{41} +\entry {suppressing warnings}{46} +\entry {symbolic link trees, for multiple architectures}{10} +\entry {symbolic links not found}{25} +\entry {symbolic links, and \file {ls-R}}{36} +\entry {symlinks, resolving}{47} +\entry {system C compiler bugs}{27} +\entry {system dependencies}{8} +\entry {system V universe}{11} \initial {T} -\entry {\code {T1FONTS}}{39} -\entry {\code {T1INPUTS}}{39} -\entry {tape distribution}{18} -\entry {TDS}{15} -\entry {testing, post-installation}{14} -\entry {tests, simple}{4} -\entry {te\TeX{}}{18} -\entry {\code {tex-archive@math.utah.edu}}{20} -\entry {\code {tex-file.c}}{40} -\entry {\code {tex-file.h}}{44} -\entry {\code {tex-glyph.c}}{41} -\entry {\code {tex-glyph.h}}{44} -\entry {\code {tex-k-request@mail.tug.org}}{20} -\entry {\code {tex-k@mail.tug.org \r {(bug address)}}}{19} -\entry {\code {tex-make.c}}{13} -\entry {\code {TEX_HUSH}}{27, 42} -\entry {\TeX{} directory structure}{15} -\entry {\TeX{} distributions besides Web2c}{18} -\entry {\TeX{} environment variables}{38} -\entry {\TeX{} failures}{24} -\entry {\TeX{} file lookup}{40} -\entry {\TeX{} glyph lookup}{40} -\entry {\TeX{} help mailing list}{20} -\entry {\TeX{} hierarchy, one}{8} -\entry {\TeX{} Live CD-ROM}{18} -\entry {\TeX{} support}{38} +\entry {\code {T1FONTS}}{43} +\entry {\code {T1INPUTS}}{43} +\entry {\code {T42FONTS}}{43} +\entry {tape distribution}{20} +\entry {TDS}{16} +\entry {testing, post-installation}{15} +\entry {tests, simple}{5} +\entry {te\TeX{}}{21} +\entry {\code {tex-archive@math.utah.edu}}{23} +\entry {\code {tex-file.c}}{44} +\entry {\code {tex-file.h}}{47} +\entry {\code {tex-glyph.c}}{44} +\entry {\code {tex-glyph.h}}{47} +\entry {\code {tex-k-request@mail.tug.org}}{22} +\entry {\code {tex-k@mail.tug.org \r {(bug address)}}}{21} +\entry {\code {tex-make.c}}{14} +\entry {\code {TEX_HUSH}}{30, 46} +\entry {\TeX{} directory structure}{16} +\entry {\TeX{} distributions besides Web2c}{21} +\entry {\TeX{} environment variables}{41} +\entry {\TeX{} failures}{27} +\entry {\TeX{} file lookup}{44} +\entry {\TeX{} glyph lookup}{44} +\entry {\TeX{} help mailing list}{23} +\entry {\TeX{} hierarchy, one}{10} +\entry {\TeX{} Live CD-ROM}{20} +\entry {\TeX{} support}{41} \entry {\TeX{} Users Group}{1} -\entry {\code {TEXBIB}}{38} -\entry {\code {TEXCONFIG}}{40} -\entry {\code {TEXDOCS}}{39} -\entry {\code {TEXFONTMAPS}}{38} -\entry {\code {TEXFONTS}}{38, 39, 40} -\entry {\code {texfonts.map}}{41} -\entry {\code {TEXFORMATS}}{38} -\entry {\code {TEXINDEXSTYLE}}{38} -\entry {\code {TEXINPUTS}}{39} -\entry {\code {TEXMF}}{15} -\entry {\code {texmf.cnf\r {, and variable expansion}}}{30} -\entry {\code {texmf.cnf\r {, creating}}}{9} -\entry {\code {texmf.cnf\r {, definition for}}}{28} -\entry {\code {texmf.cnf\r {, generated}}}{6} -\entry {\code {texmf.cnf\r {, source for path}}}{28} -\entry {\code {texmf.cnf.in}}{6} -\entry {\code {texmf.cnf.in\r {, editing}}}{5} -\entry {\code {texmf.sed}}{6} -\entry {\code {TEXMFCNF}}{28, 38} -\entry {\code {TEXMFDBS}}{32, 38} -\entry {\code {TEXMFINI}}{38} -\entry {\code {TEXMFLOG}}{22} -\entry {\code {TEXMFOUTPUT}}{13} -\entry {\code {TEXPICTS}}{39} -\entry {\code {TEXPKS}}{39} -\entry {\code {TEXPOOL}}{39} -\entry {\code {TEXPSHEADERS}}{39} -\entry {\code {TEXSIZES}}{42} -\entry {\code {TEXSOURCES}}{39} -\entry {\code {TFMFONTS}}{39} -\entry {tilde expansion}{30} -\entry {\code {tilde.c}}{31} -\entry {\code {time \r {system call}}}{22} -\entry {tolerance for glyph lookup}{41} -\entry {total disk space}{4} -\entry {trailing \samp {/} in home directory}{31} -\entry {trailing colons}{29} -\entry {\code {TRFONTS}}{39} -\entry {trick for detecting leaf directories}{31} -\entry {trojan horse attack}{14} -\entry {TUG}{18} -\entry {\code {tug.cs.umb.edu}}{16} +\entry {\code {TEXBIB}}{41} +\entry {\code {TEXCONFIG}}{41} +\entry {\code {TEXDOCS}}{43} +\entry {\code {TEXFONTMAPS}}{42} +\entry {\code {TEXFONTS}}{41, 42, 43} +\entry {\code {texfonts.map}}{45} +\entry {\code {TEXFORMATS}}{41} +\entry {\code {TEXINDEXSTYLE}}{42} +\entry {\code {TEXINPUTS}}{42} +\entry {\code {TEXMF}}{16} +\entry {\code {texmf.cnf\r {, and variable expansion}}}{33} +\entry {\code {texmf.cnf\r {, creating}}}{11} +\entry {\code {texmf.cnf\r {, definition for}}}{31} +\entry {\code {texmf.cnf\r {, generated}}}{7} +\entry {\code {texmf.cnf\r {, source for path}}}{31} +\entry {\code {texmf.in}}{7} +\entry {\code {texmf.in\r {, editing}}}{6} +\entry {\code {texmf.sed}}{7} +\entry {\code {TEXMFCNF}}{31, 41} +\entry {\code {TEXMFDBS}}{35, 42} +\entry {\code {TEXMFINI}}{41, 42} +\entry {\code {TEXMFLOG}}{25} +\entry {\code {TEXMFOUTPUT}}{15} +\entry {\code {TEXPICTS}}{42} +\entry {\code {TEXPKS}}{42} +\entry {\code {TEXPOOL}}{43} +\entry {\code {TEXPSHEADERS}}{42, 43} +\entry {\code {TEXSIZES}}{46} +\entry {\code {TEXSOURCES}}{43} +\entry {\code {TFMFONTS}}{43} +\entry {tilde expansion}{33} +\entry {\code {tilde.c}}{34} +\entry {\code {time \r {system call}}}{25} +\entry {tolerance for glyph lookup}{44} +\entry {total disk space}{5} +\entry {trailing \samp {/} in home directory}{34} +\entry {trailing colons}{32} +\entry {\code {TRFONTS}}{43} +\entry {trick for detecting leaf directories}{35} +\entry {trojan horse attack}{16} +\entry {\code {TTFONTS}}{43} +\entry {TUG}{20} +\entry {\code {tug.org}}{18} \entry {\code {tug@tug.org}}{1} -\entry {typeface directory, omitting}{12} +\entry {typeface directory, omitting}{14} \initial {U} -\entry {\code {ucbinclude\r {, avoiding}}}{10} -\entry {UKTUG}{18} -\entry {Ultrix shells and \code {configure}}{7} -\entry {unable to find files}{23} -\entry {unable to generate fonts}{24} -\entry {\code {uname}}{19} -\entry {universe, BSD vs.\spacefactor =1000 system V}{10} -\entry {\code {UNIX_ST_LINK}}{31} -\entry {\code {unixtex.ftp}}{16} -\entry {\code {unixtex@u.washington.edu}}{18} -\entry {unknown special warnings}{43} -\entry {unreadable file warnings}{43} -\entry {unreadable files}{27} -\entry {unusable \file {ls-R} warning}{33} -\entry {usage patterns, finding}{22} -\entry {\code {USE_VARTEXFONTS}}{13} -\entry {Usenet \TeX{} newsgroup}{20} +\entry {\code {ucbinclude\r {, avoiding}}}{11} +\entry {UKTUG}{20} +\entry {Ultrix shells and \code {configure}}{8} +\entry {unable to find files}{25} +\entry {unable to generate fonts}{26} +\entry {\code {uname}}{21} +\entry {universe, BSD vs.\spacefactor =1000 system V}{11} +\entry {\code {UNIX_ST_LINK}}{35} +\entry {\code {unixtex.ftp}}{18} +\entry {\code {unixtex@u.washington.edu}}{20} +\entry {unknown special warnings}{46} +\entry {unreadable file warnings}{46} +\entry {unreadable files}{30} +\entry {unusable \file {ls-R} warning}{36} +\entry {usage patterns, finding}{25} +\entry {\code {USE_VARTEXFONTS}}{14} +\entry {Usenet \TeX{} newsgroup}{23} \initial {V} -\entry {\code {varfonts}}{12} -\entry {variable expansion}{30} -\entry {\code {variable.c}}{30} -\entry {\code {variable.h}}{45} -\entry {\code {VARTEXFONTS}}{12} -\entry {VAX 11/750}{1} -\entry {version number, of Kpathsea}{5} -\entry {version numbers, determining}{19} -\entry {VF files, not found}{27} -\entry {\code {VFFONTS}}{40} -\entry {VMS support}{4} -\entry {VMS \TeX{} implementations}{18} +\entry {\code {varfonts}}{14} +\entry {variable expansion}{33} +\entry {\code {variable.c}}{33} +\entry {\code {variable.h}}{49} +\entry {\code {VARTEXFONTS}}{14} +\entry {VAX 11/750}{2} +\entry {version number, of Kpathsea}{6} +\entry {version numbers, determining}{21} +\entry {VF files, not found}{30} +\entry {\code {VFFONTS}}{43} +\entry {VMS support}{5} +\entry {VMS \TeX{} implementations}{21} \entry {Vojta, Paul}{2} \initial {W} -\entry {Walnut Creek \TeX{} CD-ROM}{18} +\entry {Walnut Creek \TeX{} CD-ROM}{20} \entry {Walsh, Norman}{2} -\entry {warning about unusable \file {ls-R}}{33} -\entry {warnings, file access}{27} -\entry {warnings, pointer combinations}{26} -\entry {warnings, suppressing}{42} -\entry {\code {wcstombs}}{25} -\entry {whitespace, in fontmap files}{41} -\entry {whitespace, not ignored on continuation lines}{28} -\entry {Windows \TeX{} implementations}{18} -\entry {World Wide Web CTAN access}{17} -\entry {\code {www.tug.org}}{16} +\entry {warning about unusable \file {ls-R}}{36} +\entry {warnings, file access}{30} +\entry {warnings, pointer combinations}{29} +\entry {warnings, suppressing}{46} +\entry {\code {wcstombs}}{28} +\entry {Weber, Olaf}{3} +\entry {whitespace, in fontmap files}{45} +\entry {whitespace, not ignored on continuation lines}{31} +\entry {Windows \TeX{} implementations}{21} +\entry {World Wide Web CTAN access}{19} +\entry {\code {www.tug.org}}{18} \initial {X} -\entry {X11 previewer}{5} -\entry {X11, lacking on NeXT}{5} -\entry {\code {XCFLAGS}}{9, 10} -\entry {\code {XCPPFLAGS}}{9} -\entry {\code {XDEFS}}{9} -\entry {\code {XDVIFONTS}}{40} -\entry {\code {XDVIMAKEPK}}{13} -\entry {\code {XDVISIZES}}{42} -\entry {\code {XLDFLAGS}}{10} -\entry {\code {XLOADLIBES}}{10} -\entry {\code {XMAKEARGS}}{10} -\entry {\code {Xmu \r {library problems}}}{25} -\entry {\code {XtStrings}}{25} +\entry {X11 previewer}{6} +\entry {X11, lacking on NeXT}{6} +\entry {\code {XCFLAGS}}{11} +\entry {\code {XCPPFLAGS}}{11} +\entry {\code {XDEFS}}{11} +\entry {\code {XDVIFONTS}}{43} +\entry {\code {XDVIMAKEPK}}{15} +\entry {\code {XDVISIZES}}{46} +\entry {\code {XLDFLAGS}}{11} +\entry {\code {XLOADLIBES}}{11} +\entry {\code {XMAKEARGS}}{11} +\entry {\code {Xmu \r {library problems}}}{29} +\entry {\code {XtStrings}}{28} \initial {Z} \entry {zuhn, david}{2}
--- a/kpathsea/kpathsea.h +++ b/kpathsea/kpathsea.h @@ -1,5 +1,5 @@ +#include <kpathsea/config.h> #include <kpathsea/absolute.h> -#include <kpathsea/c-auto.h> #include <kpathsea/c-ctype.h> #include <kpathsea/c-dir.h> #include <kpathsea/c-errno.h> @@ -17,7 +17,6 @@ #include <kpathsea/c-vararg.h> #include <kpathsea/cnf.h> #include <kpathsea/concatn.h> -#include <kpathsea/config.h> #include <kpathsea/db.h> #include <kpathsea/debug.h> #include <kpathsea/default.h>
--- a/kpathsea/kpathsea.info +++ b/kpathsea/kpathsea.info @@ -1,20 +1,20 @@ -This is Info file kpathsea.info, produced by Makeinfo version 1.67 from +This is Info file kpathsea.info, produced by Makeinfo version 1.68 from the input file kpathsea.texi. INFO-DIR-SECTION TeX START-INFO-DIR-ENTRY -* Kpathsea: (kpathsea). File lookup along search paths. -* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching. -* MakeTeXMF: (kpathsea)MakeTeX scripts. MF source generation. -* MakeTeXPK: (kpathsea)MakeTeX scripts. PK bitmap generation. -* MakeTeXTeX: (kpathsea)MakeTeX scripts. TeX source generation. -* MakeTeXTFM: (kpathsea)MakeTeX scripts. TeX font metric generation. -* MakeTeXls-R: (kpathsea)Filename database. Update ls-R. +* Kpathsea: (kpathsea). File lookup along search paths. +* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching. +* 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. +* mktexlsr: (kpathsea)Filename database. Update ls-R. END-INFO-DIR-ENTRY This file documents the Kpathsea library for path searching. - Copyright (C) 1993, 94, 95, 96, 97 K. Berry. + Copyright (C) 1993, 94, 95, 96, 97 K. Berry & O. Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -37,7 +37,7 @@ **************** This manual documents how to install and use the Kpathsea library for -filename lookup. It corresponds to version 3.0, released in February +filename lookup. It corresponds to version 3.2, released in October 1997. * Menu: @@ -58,14 +58,14 @@ Introduction ************ - This manual corresponds to version 3.0 of the Kpathsea library, -released in February 1997. + This manual corresponds to version 3.2 of the Kpathsea library, +released in October 1997. 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 I maintain, uses this library: + The following software, all of which we maintain, uses this library: * Dviljk (see the `dvilj' man page) @@ -77,26 +77,26 @@ * Xdvik (see the `xdvi' man page) -Other software that I do not maintain also uses it. - - I am still actively maintaining the library (and probably always will -be, despite my hopes). If you have comments or suggestions, please send -them to me (*note Reporting bugs::.). - - I distribute the library under the GNU Library General Public License +Other software that we do not maintain also uses it. + + We are still actively maintaining the library (and probably always +will be, despite our hopes). If you have comments or suggestions, +please send them to us (*note Reporting bugs::.). + + We distribute the library under the GNU Library General Public License (LGPL), with one exception (see below). 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, -although I hope you will. +although we hope you will. The exception is the part of the file `expand.c' which implements -brace expansion. I took this from Bash, which is covered by the GNU +brace expansion. We took this from Bash, which is covered by the GNU General Public License (GPL). Therefore, if you wish to redistribute the library under the LGPL, you must remove this code. (If you write a -replacement I can distribute, I hope you'll share it with me.) See the -files `COPYING' and `COPYING.LIB' for the text of the GNU licenses. +replacement we can distribute, we hope you'll share it with us.) See +the files `COPYING' and `COPYING.LIB' for the text of the GNU 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 @@ -106,10 +106,11 @@ world. Anyway, here is the address: TeX Users Group - 870 Market St. #801 - San Francisco, CA 94102 USA - phone: +1 (415) 982-8449 - fax: +1 (415) 982-8559 + P.O. Box 1239 + Three Rivers, CA 93271-1239 + USA + phone: 1 209 561 0112 + fax: 1 209 561 4584 email: <tug@tug.org> * Menu: @@ -124,17 +125,17 @@ (This section is for those people who are curious about how the library came about.) (If you like to read historical accounts of -software, I urge you to seek out the GNU Autoconf manual and the +software, we urge you to seek out the GNU Autoconf manual and the "Errors of TeX" paper by Don Knuth, published in `Software--Practice and Experience' 19(7), July 1989.) - 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. I -was using `pxp' and `pc' on VAX 11/750's and the hot new Sun 2 -machines.) + [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. 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 @@ -190,6 +191,11 @@ 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. + File: kpathsea.info, Node: Installation, Next: Path searching, Prev: Introduction, Up: Top @@ -200,8 +206,8 @@ `kpathsea/INSTALL'.) The procedure for Kpathsea (and Web2c, etc.) configuration and -installation follows. If trouble, *note Common problems::., a copy of -which is in the file `kpathsea/BUGS'. +installation follows. If you encounter trouble, see *Note Common +problems::, a copy of which is in the file `kpathsea/BUGS'. * Menu: @@ -220,13 +226,17 @@ Installing TeX and friends for the first time can be a daunting experience. Thus, you may prefer to skip this whole thing and just get -precompiled executables: *note unixtex.ftp::.. +precompiled executables: see *Note unixtex.ftp::. This section explains what to do if you wish to take the defaults for -everything (installing under `/usr/local'), and generally to install in -the simplest possible way. Most steps here refer to corresponding -subsection in the next section which explains how to override defaults -and generally gives more details. +everything, and generally to install in the simplest possible way. Most +steps here refer to corresponding subsection in the next section which +explains how to override defaults and generally gives more details. + + By default everything will be installed under `/usr/local' and the +following discussion assumes this. However, if you already have TeX +installed, its location is used to derive the directory under which +everything is to be installed. 1. Be sure you have enough disk space: approximately 8 megabytes for the compressed archives, 15MB for sources, 45MB for compilation, @@ -248,10 +258,15 @@ distribution files. *Note Changing search paths::. 4. At the top level of the distribution, run `sh configure'. (If you - have the GNU Bash shell installed, run `bash configure'.) *Note + have the GNU Bash shell installed, run `bash configure'.) *Note Running configure::. - 5. `make'. *Note Running make::. + 5. `make'. *Note Running make::. If you are using a BSD 4.4 system + such as FreeBSD or NetBSD, use GNU make (often installed in + `/usr/local/bin'), not the BSD make. + + If you are using a HP-UX 10 system and the native compiler, + specify the `+u' flag in `XCFLAGS'. 6. `make install'. *Note Installing files::. @@ -259,31 +274,33 @@ 8. Set up a cron job to rebuild the filename database that makes searching faster. This line will rebuild it every midnight: - 0 0 * * * cd /usr/local/share/texmf && /BINDIR/MakeTeXls-R + 0 0 * * * cd /usr/local/share/texmf && /BINDIR/mktexlsr *Note Filename database generation::, and *Note Filename database::. 9. If you're installing Dvips, you also need to set up configuration files for your printers and make any additional PostScript fonts available. *Note Installation: (dvips)Installation. If you have - any color printers, *note Color device configuration: (dvips)Color - device configuration.. + any color printers, see *Note Color device configuration: + (dvips)Color device configuration. 10. The first time you run a DVI driver, a bunch of PK fonts will be - built by Metafont via `MakeTeXPK' (and added to the filename + built by Metafont via `mktexpk' (and added to the filename database). This will take some time. Don't be alarmed; they will created only this first time (unless something is wrong with your path definitions). - By default, `MakeTeXPK' assumes `/usr/local/share/texmf/fonts' is - globally writable. If you need a different arrangement, *note - MakeTeX configuration::.. - - *Note MakeTeX scripts::. - - 11. For some simple tests, try `tex story \\bye' and `latex simple'. - Then run `xdvi story' or `dvips simple' on the resulting DVI files - to preview/print the documents. *Note Installation testing::. + By default, `mktexpk' will create these fonts in a hierarchy under + `/var/tmp/texfonts'; it simply assumes that `/var/tmp' exists and + is globally writable. If you need a different arrangement, see + *Note mktex configuration::. + + *Note mktex scripts::. + + 11. For some simple tests, try `tex story \\bye' and `latex sample2e'. + Then run `xdvi story' or `dvips sample2e' on the resulting DVI + files to preview/print the documents. *Note Installation + testing::. File: kpathsea.info, Node: Custom installation, Next: Security, Prev: Simple installation, Up: Installation @@ -321,7 +338,7 @@ * Installing files:: * Cleaning up:: * Filename database generation:: -* MakeTeX scripts:: +* mktex scripts:: * Installation testing:: @@ -336,6 +353,7 @@ don't enter into it. Sizes are in megabytes. All numbers are approximate. +Distribution .tar.gz Unpacked Compiled Installed dviljk .9 3.8 dvipsk .9 3.2 xdvik .7 2.5 @@ -384,21 +402,20 @@ If the search paths for your installation differ from the standard TeX directory structure (*note Introduction: (tds)Top.), edit the file -`kpathsea/texmf.cnf.in' as desired, before running `configure'. For +`kpathsea/texmf.in' as desired, before running `configure'. For example, if you have all your fonts or macros in one big directory. - You may also wish to edit the file `MakeTeXnames.cnf', either before -or after installation, to control various aspects of `MakeTeXPK' and -friends. *Note MakeTeX configuration::. - - You do not need to edit `texmf.cnf.in' to change the default -top-level or other installation *directories* (only the paths). You -can and should do that when you run `configure' (next step). - - You also do not need to edit `texmf.cnf.in' if you are willing to -rely on `texmf.cnf' at runtime to define the paths, and let the -compile-time default paths be incorrect. Usually there is no harm in -doing this. + You may also wish to edit the file `mktex.cnf', either before or +after installation, to control various aspects of `mktexpk' and +friends. *Note mktex configuration::. + + You do not need to edit `texmf.in' to change the default top-level or +other installation *directories* (only the paths). You can and should +do that when you run `configure' (next step). + + You also do not need to edit `texmf.in' if you are willing to rely on +`texmf.cnf' at runtime to define the paths, and let the compile-time +default paths be incorrect. Usually there is no harm in doing this. The section below explains default generation in more detail. @@ -417,7 +434,7 @@ above is to avoid having the same information in more than one place. If you change the installation directories or top-level prefix at `configure'-time, those changes will propagate through the whole -sequence. And if you change the default paths in `texmf.cnf.in', those +sequence. And if you change the default paths in `texmf.in', those changes are propagated to the compile-time defaults. The Make definitions are all repeated in several Makefile's; but @@ -441,12 +458,11 @@ you arranged things that way because your site has only one printer, for example) or if the program is mode-independent (e.g., `pktype'). - To make the paths independent of the mode, simply edit `texmf.cnf.in' + To make the paths independent of the mode, simply edit `texmf.in' before installation, or the installed `texmf.cnf', and remove the `$MAKETEX_MODE'. - *Note MakeTeX script arguments::, for how this interacts with -`MakeTeXPK'. + *Note mktex script arguments::, for how this interacts with `mktexpk'. *Note TeX directory structure: TeX directory structure, for a description of the default arrangement of the input files that comprise @@ -475,7 +491,7 @@ the installation directories. 3. `texmf.sed' (together with a little extra magic--see - `kpathsea/Makefile') is applied to `texmf.cnf.in' to generate + `kpathsea/Makefile') is applied to `texmf.in' to generate `texmf.cnf'. This is the file that will eventually be installed and used. @@ -499,14 +515,14 @@ `configure' adapts the source distribution to the present system via `#define''s in `*/c-auto.h', which are created from the corresponding -`c-auto.h.in'. It also creates a `Makefile' from the corresponding +`c-auto.in'. It also creates a `Makefile' from the corresponding `Makefile.in', doing `@VAR@' and `ac_include' substitutions). `configure' is the best place to control the configuration, compilation, and installed location of the software, either via command-line options, or by setting environment variables before -invoking it. For example, you can disable `MakeTeXPK' by default with -the option `--disable-maketexpk'. *Note configure options::. +invoking it. For example, you can disable `mktexpk' by default with +the option `--disable-mktexpk'. *Note configure options::. * Menu: @@ -547,23 +563,23 @@ ................... For a complete list of all `configure' options, run `configure ---help' or *note Running `configure' scripts: (autoconf)Invoking -configure. (a copy is in the file `kpathsea/CONFIGURE'). The generic -options are listed first in the `--help' output, and the +--help' or see *Note Running `configure' scripts: (autoconf)Invoking +configure, (a copy is in the file `kpathsea/README.CONFIGURE'). The +generic options are listed first in the `--help' output, and the package-specific options come last. The environment variables `configure' pays attention to are listed below. Options particularly likely to be useful are `--prefix', `--datadir', -and the like; *note configure scenarios::.. +and the like; see *Note configure scenarios::. This section gives pointers to descriptions of the `--with' and `--enable' options to `configure' that Kpathsea-using programs accept. -`--without-maketexmf-default' -`--without-maketexpk-default' -`--without-maketextfm-default' -`--with-maketextex-default' - Enable or disable the dynamic generation programs. *Note MakeTeX +`--without-mktexmf-default' +`--without-mktexpk-default' +`--without-mktextfm-default' +`--with-mktextex-default' + Enable or disable the dynamic generation programs. *Note mktex configuration::. `--enable-shared' @@ -571,7 +587,13 @@ build the usual static library. *Note Shared library::. `--disable-static' - Build only the shared library. + Build only the shared library. Implies `--enable-shared'. + +`--enable-maintainer-mode' + Enables make targets that are useful for the maintainer and likely + to be a pain for anyone else; the makefiles created when this + option is enabled may not work at all for you. You have been + warned. File: kpathsea.info, Node: configure environment, Next: configure scenarios, Prev: configure options, Up: Running configure @@ -632,10 +654,10 @@ configure --with-x-toolkit * Putting the binaries, TeX files, GNU info files, etc. into a single - TeX hierarchy, say TEXMF, requires overriding defaults in both + TeX hierarchy, say `/texmf', requires overriding defaults in both `configure' and `make': - configure --prefix=TEXMF --datadir=TEXMF - make texmf=TEXMF + configure --prefix=`/texmf' --datadir=`/texmf' + make texmf=`/texmf' * You can compile on multiple architectures simultaneously either by building symbolic link trees with the `lndir' script from the X11 @@ -674,15 +696,16 @@ individual users do not need to set their system's environment variable (e.g., `LD_LIBRARY_PATH') to find shared libraries. If you want to do this, you will need to add the necessary options to `LDFLAGS' yourself; -for example, on Solaris, include something like `-R${prefix}/lib'. -(Unfortunately, making this happen by default is very difficult, -because of interactions with an existing installed shared library.) - - Currently, shared library support is implemented only on SunOS 4 -(Solaris 1) and SunOS 5 (Solaris 2). If you're interested and willing -in adding support for other systems, please see the `configure' mode in -the `klibtool' script, especially the host-specific case statement -around line 250. +for example, on Solaris, include something like `-R${prefix}/lib', on +IRIX or Linux, use `-rpath${prefix}/lib'. (Unfortunately, making this +happen by default is very difficult, because of interactions with an +existing installed shared library.) + + Currently, shared library support is implemented only on Linux, SunOS +4 (Solaris 1), SunOS 5 (Solaris 2), IRIX 5, and IRIX 6. If you're +interested and willing in adding support for other systems, please see +the `configure' mode in the `klibtool' script, especially the +host-specific case statement around line 250. File: kpathsea.info, Node: Running make, Next: Installing files, Prev: Running configure, Up: Custom installation @@ -794,7 +817,7 @@ Alternatively, * `make mostlyclean' if you intend to compile on another - architecture. For Web2c, since the generated C files are portable, + architecture. For Web2C, since the generated C files are portable, they are not removed. If the `lex' vs. `flex' situation is going to be different on the next machine, `rm web2c/lex.yy.c'. @@ -811,31 +834,31 @@ targets. -File: kpathsea.info, Node: Filename database generation, Next: MakeTeX scripts, Prev: Cleaning up, Up: Custom installation +File: kpathsea.info, Node: Filename database generation, Next: mktex scripts, Prev: Cleaning up, Up: Custom installation Filename database generation ---------------------------- You will probably want to set up a `cron' entry on the appropriate machine(s) to rebuild the filename database nightly or so, as in: - 0 0 * * * cd TEXMF && /BINDIR/MakeTeXls-R + 0 0 * * * cd TEXMF && /BINDIR/mktexlsr *Note Filename database::. -Although the `MakeTeX...' scripts make every effort to add -newly-created files on the fly, it can't hurt to make sure you get a -fresh version every so often. +Although the `mktex...' scripts make every effort to add newly-created +files on the fly, it can't hurt to make sure you get a fresh version +every so often. -File: kpathsea.info, Node: MakeTeX scripts, Next: Installation testing, Prev: Filename database generation, Up: Custom installation - -`MakeTeX' scripts ------------------ +File: kpathsea.info, Node: mktex scripts, Next: Installation testing, Prev: Filename database generation, Up: Custom installation + +`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 MakeTeX configuration::.). This is most useful for +dynamically (*note mktex configuration::.). This is most useful for fonts (bitmaps, TFM's, and arbitrarily-sizable Metafont sources such as -the Sauter and DC fonts), since any given document can use fonts never +the Sauter and EC fonts), since any given document can use fonts never before referenced. Trying to build all fonts in advance is therefore impractical, if not impossible. @@ -846,112 +869,146 @@ * Menu: -* MakeTeX configuration:: -* MakeTeX script names:: -* MakeTeX script arguments:: +* mktex configuration:: +* mktex script names:: +* mktex script arguments:: -File: kpathsea.info, Node: MakeTeX configuration, Next: MakeTeX script names, Up: MakeTeX scripts - -`MakeTeX' configuration -....................... +File: kpathsea.info, Node: mktex configuration, Next: mktex script names, Up: mktex scripts + +`mktex' configuration +..................... The following file types can run an external program to create missing -files: `pk', `tfm', `mf', `tex'; the scripts are named `MakeTeXPK', -`MakeTeXTFM', `MakeTeXMF', and `MakeTeXTeX'. +files: `pk', `tfm', `mf', `tex'; the scripts are named `mktexpk', +`mktextfm', `mktexmf', and `mktextex'. In the absence of `configure' options specifying otherwise, -everything but `MakeTeXTeX' will be enabled by default. The `configure' +everything but `mktextex' will be enabled by default. The `configure' options to change the defaults are: - --without-maketexmf-default - --without-maketexpk-default - --without-maketextfm-default - --with-maketextex-default + --without-mktexmf-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., `MAKETEXPK' -(*note MakeTeX script arguments::.). - - As distributed, all the scripts source a file -`texmf/web2c/MakeTeX.site' if it exists, so you can override various -defaults. See `MakeTeXcommon', for instance, which defines the default -mode, resolution, directory permissions, some special directory names, -etc. If you prefer not to change the distributed scripts, you can -simply create `MakeTeX.site' with the appropriate definitions (you do -not need to create it if you have nothing to put in it). -`MakeTeX.site' has no special syntax; it's an arbitrary Bourne shell -script. The distribution contains a sample `MakeTeX.site' for you to -copy and modify as you please (it is not installed anywhere). +configuration file value named for the script is set; e.g., `MKTEXPK' +(*note mktex script arguments::.). + + 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 `MakeTeX.site', as just mentioned; - - * by editing the file `MakeTeXnames.cnf', either before `make - install' (in the source hierarchy) or after (in the installed - hierarchy); + * 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. - By default, `MakeTeXPK' installs fonts into the standard TeX -directory structure (*note TeX directory structure: TeX directory -structure.). It uses aliases and directory names from the Fontname -distribution (*note Introduction: (fontname)Top.). Most of the options -here change that. + 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 `MakeTeXmkdir' to create directories append-only, i.e., set - their sticky bit (*note Mode Structure: (fileutils)Mode - Structure.). + Tell `mktexdir' to create directories append-only, i.e., set their + sticky bit (*note Mode Structure: (fileutils)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.). `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. + Omit the font supplier and typeface name directory levels. This + feature is deprecated in favour of `stripsupplier' and + `striptypeface'. `varfonts' - Put `MakeTeXPK'-generated fonts under the directory named by - `VARTEXFONTS'; the default value in `kpathsea/texmf.cnf.in' is - `/var/tex/fonts', as recommended by the `Linux File System - Standard' (but unless `varfonts' is enabled, nothing cares about - that value). + 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. -File: kpathsea.info, Node: MakeTeX script names, Next: MakeTeX script arguments, Prev: MakeTeX configuration, Up: MakeTeX scripts - -`MakeTeX' script names -...................... +File: kpathsea.info, Node: mktex script names, Next: mktex script arguments, Prev: mktex configuration, Up: mktex scripts + +`mktex' script names +.................... The following table shows the default name of the script for each possible file types. (The source is the variable `kpse_make_specs' in `kpathsea/tex-make.c'.) -`MakeTeXPK' +`mktexpk' Glyph fonts. -`MakeTeXTeX' +`mktextex' TeX input files. -`MakeTeXMF' +`mktexmf' Metafont input files. -`MakeTeXTFM' +`mktextfm' TFM files. These names are overridden by an environment variable specific to the program--for example, `DVIPSMAKEPK' for Dvipsk. - If a `MakeTeX...' script fails, the invocation is appended to a file + 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. @@ -962,64 +1019,45 @@ by the `MISSFONT_LOG' environment variable or configuration file value. -File: kpathsea.info, Node: MakeTeX script arguments, Prev: MakeTeX script names, Up: MakeTeX scripts - -`MakeTeX' script arguments -.......................... - - The first argument to a `MakeTeX' script is always the name of the -file to be created. - - In the default `MakeTeXPK' implementation, from three to five -additional arguments may also passed, via environment variables: - - 1. The resolution to make the font at (`KPATHSEA_DPI'). - - 2. The "base dpi" the program is operating at (`MAKETEX_BASE_DPI'), - i.e., the assumed resolution of the output device. - - 3. A "magstep" string suitable for the Metafont `mag' variable - (`MAKETEX_MAG'). - - 4. Optionally, a Metafont mode name to assign to the Metafont `mode' - variable (`MAKETEX_MODE'). Otherwise, (the default) `MakeTeXPK' - guesses the mode from the resolution. *Note TeX directory - structure: TeX directory structure. - - 5. Optionally, 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 (from environment variables `DESTDIR' - or `MTP_DESTDIR' or a compile-time default). If this argument is - not supplied, the mode name is appended to the root destination - directory. - -Kpathsea sets `KPATHSEA_DPI' appropriately for each attempt at building -a font. It's up to the program using Kpathsea to set the others. -(*Note Calling sequence::.) - - You can change the specification for the arguments passed to the -external script by setting the environment variable named as the script -name, but all capitals--`MAKETEXPK', for example. If you've changed -the script name by setting (say) `DVIPSMAKEPK' to `foo', then the spec -is taken from the environment variable `FOO'. - - The spec can contain any variable references, to the above variables -or any others. As an example, the default spec for `MakeTeXPK' is: - $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE - -The convention of passing the name of the file to be created as the -first argument cannot be changed. +File: kpathsea.info, Node: mktex script arguments, Prev: mktex script names, Up: mktex scripts + +`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 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: Installation testing, Prev: MakeTeX scripts, Up: Custom installation +File: kpathsea.info, Node: Installation testing, Prev: mktex scripts, Up: Custom installation Installation testing -------------------- Besides the tests listed in *Note Simple installation::, you can try running `make check'. This includes the torture tests (trip, trap, and -mptrap) that come with Web2c (*note Torture tests: (web2c)Torture -tests.). +mptrap) that come with Web2c (*note Triptrap: (web2c)Triptrap.). File: kpathsea.info, Node: Security, Next: TeX directory structure, Prev: Custom installation, Up: Installation @@ -1044,29 +1082,37 @@ invocation: (web2c)tex invocation, respectively. Another security issue arises because it's very useful--almost -necessary--to make arbitrary fonts on user demand with `MakeTeXPK' and +necessary--to make arbitrary fonts on user demand with `mktexpk' and friends. Where do these files get installed? By default, the -`MakeTeXPK' distributed with Kpathsea assumes a globally writable -`texmf' tree; this is the simplest and most convenient approach, but it -may not suit your situation. +`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 -`MakeTeXnames.cnf'. *Note MakeTeX configuration::. +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 -`MakeTeXPK' et al. setgid to that group (or setuid to that user). Then +`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.) - Finally, using a central writable `texmf' tree may be completely -impossible, because it's on an NFS filesystem that you cannot export -read/write, or AFS is in use, or simply because "it's policy". Then -you must resort to each user's machine having its own local directory of -dynamically-created fonts; again, `MakeTeXnames.cnf' has an option to -do this, and again, *note MakeTeX configuration::.. + 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: unixtex.ftp, Prev: Security, Up: Installation @@ -1086,7 +1132,8 @@ paths::.). One common desire is to put everything (binaries and all) under a single top-level directory such as `/usr/local/texmf' or `/opt/texmf'--in the terms used below, make PREFIX and TEXMF the same. -For specific instructions on doing that, *note configure scenarios::.. +For specific instructions on doing that, see *Note configure +scenarios::. Here is a skeleton of the default directory structure, extracted from the TDS document: @@ -1164,12 +1211,12 @@ `unixtex.ftp': Obtaining TeX ============================ - This is `ftp://ftp.tug.org/tex/unixtex.ftp', last updated 7 February -1997. Also available as `http://www.tug.org/unixtex.ftp'. The IP -address is currently [158.121.106.10], and the canonical host name is -currently `tug.cs.umb.edu'. It is also in Kpathsea source -distributions as `etc/unixtex.ftp' (although the network version is -usually newer). Mail <kb@mail.tug.org> with comments or questions. + This is `ftp://ftp.tug.org/tex/unixtex.ftp', last updated 18 March +1998. Also available as `http://www.tug.org/unixtex.ftp'. The IP +address is currently `[158.121.106.10]', and the canonical host name is +currently `tug.org'. It is also in Kpathsea source distributions as +`etc/unixtex.ftp' (although the network version is usually newer). +Mail <kb@mail.tug.org> with comments or questions. Following are general instructions for Unix or other sites who wish to acquire the Web2c distribution, (plain) TeX, LaTeX (2e), BibTeX, @@ -1185,7 +1232,7 @@ membership form. For actual installation instructions after obtaining the necessary -sources, *note Installation::.. A copy is in the distribution file +sources, see *Note Installation::. A copy is in the distribution file `kpathsea/INSTALL'. * Menu: @@ -1204,7 +1251,7 @@ In many places we refer to CTAN:. This is *both* a host name and a directory name. Here are some primary locations: - `ftp://ftp.cdrom.com/pub/tex/ctan' (California, USA) + `ftp://ctan.tug.org/tex-archive' (California, USA) `ftp://ftp.dante.de/tex-archive' (Germany) `ftp://ftp.tex.ac.uk/tex-archive' (England) @@ -1228,6 +1275,9 @@ change the default search paths (*note Changing search paths::.). It is required unless you already have these files, in which case you should change the default paths as necessary to find them. + There are other packages of library files, `etexlib.tar.gz', + `omegalib.tar.gz', and `pdftexlib.tar.gz', that are required as + well if you install e-TeX, Omega, or pdfTeX respectively. `CTAN:/systems/web2c/web.tar.gz' The original WEB source files, written mostly by Don Knuth. @@ -1238,15 +1288,33 @@ `CTAN:/systems/web2c/web2c.tar.gz' The Web2c system. Required. Also unpacks into `web2c-VERSION'. -`CTAN:/dviware/dvipsk.tar.gz' +`CTAN:/systems/web2c/web2c-etex.tar.gz' + Additions to the Web2c system for building e-TeX. Optional. Also + unpacks into `web2c-VERSION'. + +`CTAN:/systems/web2c/web2c-omega.tar.gz' + Additions to the Web2c system for building Omega. Optional. Also + unpacks into `web2c-VERSION'. + +`CTAN:/systems/web2c/web2c-pdftex.tar.gz' + Additions to the Web2c system for building pdfTeX. Optional. Also + unpacks into `web2c-VERSION'. + +`CTAN:/systems/web2c/texk.tar.gz' + The web and web2c sources, plus the additions for web2c, plus the + dvi drivers mentioned below, plus extra dvi drivers and tools not + packaged separately. Recommended if you want to build a complete + system. Unpacks into `texk-VERSION'. + +`CTAN:/dviware/dvipsk/dvipsk.tar.gz' DVI-to-PostScript translator. Unpacks into `dvipsk-VERSION'. Optional. -`CTAN:/dviware/xdvik.tar.gz' +`CTAN:/dviware/xdvik/xdvik.tar.gz' X window system DVI previewer. Unpacks into `xdvik-VERSION'. Optional. -`CTAN:/dviware/dviljk.tar.gz' +`CTAN:/dviware/dviljk/dviljk.tar.gz' DVI-to-PCL (HP LaserJet) translator. Unpacks into `dviljk-VERSION'. Optional. @@ -1267,21 +1335,29 @@ which in turn is based on Web2c; email <tex-live@mail.tug.org> or see `http://www.tug.org/tex-live.html'. - * NTG (Dutch-speaking TeX user group) produced the 4allTeX CD-ROM; - email <ntg@nic.surfnet.nl>, or see - `http://ei0.ei.ele.tue.nl/ntg/'. This is a runnable system. + * Dante (the German-speaking TeX user group) has produced a CD-ROM. + See `http://www.dante.de/dante/DANTE-CTAN-CD-ROM.html', and + `http://www.dante.de/tex-informationen/CD-ROMs.html' for + information about TeX CD's in general. Both are in German. * The Free Software Foundation's `Source Code CD-ROM' contains the minimal TeX source distribution described in the previous section (i.e., enough to print GNU documentation); email - <gnu@prep.ai.mit.edu> or finger <fsf@prep.ai.mit.edu>. + <gnu@prep.ai.mit.edu>. * The Gateway! CD-ROM set contains a runnable NetBSD/Amiga distribution and sources; see `http://www.netbsd.org/Sites/cdroms.html'. - * The Prime Time TeXcetera CD-ROM is a copy of CTAN (see the previous - section); email <ptf@ctcl.com> or see `http://www.ptf.com/ptf/'. + * The InfoMagic CD-ROM is a copy of CTAN (see previous section); see + `http://www.infomagic.com'. + + * NTG (Dutch-speaking TeX user group) produced the 4allTeX CD-ROM; + email <ntg@nic.surfnet.nl>, or see `http://www.ntg.nl/4allcd/'. + This is a runnable system. + + * The Prime Time TeXcetera CD-ROM is also a copy of CTAN; email + <ptf@ctcl.com> or see `http://www.ptf.com/ptf/'. * Walnut Creek's TeX CD-ROM is also a copy of CTAN; email <info@cdrom.com> or see `http://www.cdrom.com:/titles/tex.html'. @@ -1497,9 +1573,9 @@ program-specific debugging options as well. You can also set the environment variable `KPATHSEA_DEBUG'; in this -case, you should use the numbers below. Also, if you run the program -under a debugger and set the variable `kpathsea_debug', Also use the -numbers below +case, you should use the numbers below. If you run the program under a +debugger and set the variable `kpathsea_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 @@ -1561,6 +1637,28 @@ 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 @@ -1615,9 +1713,10 @@ * 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 MakeTeXPK fails. +* Unable to generate fonts:: If mktexpk fails. * TeX or Metafont failing:: Likely compiler bugs. +* Empty Makefiles:: When configure produces empty makefiles. * XtStrings:: When _XtStrings is undefined. * dlopen:: When dlopen is undefined. * ShellWidgetClass:: For dynamic linking troubles under OpenWindows. @@ -1664,14 +1763,13 @@ directory to be searched for subdirectories if you didn't want it to be. - * If the fonts (or whatever) don't already exist, `MakeTeXPK' (or - `MakeTeXMF' or `MakeTeXTFM') 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 - `MakeTeXPK'; the workaround is to generate the necessary fonts by - hand with Metafont, or to grab them from a CTAN site (*note - unixtex.ftp::.). + * 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::. @@ -1711,16 +1809,16 @@ Unable to generate fonts ........................ - This can happen if either `MakeTeXPK' hasn't been installed properly, + This can happen if either `mktexpk' hasn't been installed properly, or if the local installation of Metafont isn't correct. - If `mf' is a command not found by `MakeTeXPK', then you need to -install Metafont (*note unixtex.ftp::.). + If `mf' is a command not found by `mktexpk', then you need to install +Metafont (*note unixtex.ftp::.). If Metafont runs, but generates fonts at the wrong resolution, you need to be sure the `M' and `D' lines in your Dvips configuration file match (*note Config files: (dvips)Config files.). For example, if -`MakeTeXPK' is generating 300dpi fonts, but you need 600dpi fonts, you +`mktexpk' is generating 300dpi fonts, but you need 600dpi fonts, you should have: M ljfour D 600 @@ -1742,7 +1840,7 @@ invocation. -File: kpathsea.info, Node: TeX or Metafont failing, Next: XtStrings, Prev: Unable to generate fonts, Up: Common problems +File: kpathsea.info, Node: TeX or Metafont failing, Next: Empty Makefiles, Prev: Unable to generate fonts, Up: Common problems TeX or Metafont failing ....................... @@ -1762,8 +1860,8 @@ 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; *note Bugs: -(gcc)Bugs.. +also recommend reporting a bug to the GCC mailing list; see *Note Bugs: +(gcc)Bugs. To report compiler bugs effectively requires perseverance and perspicacity: you must find the miscompiled line, and that usually @@ -1771,8 +1869,48 @@ through TeX's (or whatever program's) data structures. Things are not helped by all-too-common bugs in the debugger itself. Good luck. + One known cause of trouble is the way arrays are handled. Some of the +Pascal arrays have a lower index other than 0, and the C code will take +the pointer to the allocated memory, subtract the lower index, and use +the resulting pointer for the array. While this trick often works, ANSI +C doesn't guarantee that it will. It it known to fail on HP-UX 10 +mchines when the native compiler is used, unless the `+u' compiler +switch was specified. Using GCC will work on this platform as well. + -File: kpathsea.info, Node: XtStrings, Next: dlopen, Prev: TeX or Metafont failing, Up: Common problems +File: kpathsea.info, Node: Empty Makefiles, Next: XtStrings, Prev: TeX or Metafont failing, Up: Common problems + +Empty Makefiles +............... + + On some systems (NetBSD, FreeBSD, AIX 4.1, and Mach10), `configure' +may fail to properly create the Makefiles. Instead, you get an error +which looks something like this: + + prompt$ ./configure + ... + creating Makefile + sed: 1: "\\@^ac_include make/pat ...": \ can not be used as a string delimiter + + So far as I know, the bug here is in `/bin/sh' on these systems. I +don't have access to a machine running any of them, so if someone can +find a workaround that avoids the quoting bug, I'd be most grateful. +(Search for `ac_include' in the `configure' script to get to the +problematic code.) + + It should work to run `bash configure', instead of using `/bin/sh'. +You can get Bash from `ftp://prep.ai.mit.edu/pub/gnu' and mirrors. + + Another possible cause (reported for NeXT) is a bug in the `sed' +command. In that case the error may look like this: + + Unrecognized command: \@^ac_include make/paths.make@r make/paths.make + + In this case, installing GNU `sed' should solve the problem. You can +get GNU `sed' from the same places as Bash. + + +File: kpathsea.info, Node: XtStrings, Next: dlopen, Prev: Empty Makefiles, Up: Common problems `XtStrings' ........... @@ -1838,8 +1976,8 @@ * Statically link the `Xmu' library into the executable. - * Avoid using `Xmu' at all. If you are compiling Metafont, *note - Online Metafont graphics: (web2c)Online Metafont graphics.. If you + * Avoid using `Xmu' at all. If you are compiling Metafont, see *Note + Online Metafont graphics: (web2c)Online Metafont graphics. If you are compiling Xdvi, see the `-DNOTOOL' option in `xdvik/INSTALL'. * Ignore the errors. The binary runs fine regardless. @@ -1937,7 +2075,7 @@ 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 thel +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. @@ -2005,7 +2143,7 @@ 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, with the search path of `.:$TEXMF', values from +later files. Thus, if the search path is `.:$TEXMF', values from `./texmf.cnf' override those from `$TEXMF/texmf.cnf'. While (or instead of) reading this description, you may find it @@ -2087,6 +2225,7 @@ * 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. @@ -2125,9 +2264,8 @@ 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 (where they will eventually be equivalent to `.', i.e., -the current directory). Kpathsea checks first for a leading `:', then -a trailing `:', then a doubled `:'. +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 @@ -2146,8 +2284,9 @@ 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). Otherwise, Kpathsea gives a -warning and ignores the `$' and its following character. +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 @@ -2194,31 +2333,52 @@ Tilde expansion is implemented in the source file `kpathsea/tilde.c'. -File: kpathsea.info, Node: Brace expansion, Next: Subdirectory expansion, Prev: Tilde expansion, Up: Path expansion +File: kpathsea.info, Node: Brace expansion, Next: KPSE_DOT expansion, Prev: Tilde expansion, Up: Path expansion Brace expansion --------------- - `x{A,B}y' expands to `xAy:xBy'. For example: - - foo/{1,2}/baz - -expands to `foo1baz:foo2baz'. `:' is the path separator on the current -system; e.g., on a DOS system, it's `;'. - - Braces can be nested; for example, `x{a,b{1,2}}y' expands to -`xay:xb1y:xb2y'. + `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 DOS 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:xB2:y'. This feature can be used to implement multiple TeX hierarchies, by -assigning a brace list to `$TEXMF', as mentioned in `texmf.cnf.in'. +assigning a brace list to `$TEXMF', as mentioned in `texmf.in'. + + In old versions of the library you had to use a comma. While this +usage is deprecated, it is still supported for backwards compatibility +with old configurations. The last example could have been written +`x{A,B}{1,2}y'. Brace expansion is implemented in the source file -`kpathsea/expand.c'. It is taken from Bash, and is thus covered by the -GNU General Public License, rather than the Library General Public -License that covers the rest of Kpathsea. +`kpathsea/expand.c'. It is a modification of the Bash sources, and is +thus covered by the GNU General Public License, rather than the Library +General Public License that covers the rest of Kpathsea. -File: kpathsea.info, Node: Subdirectory expansion, Prev: Brace expansion, Up: Path expansion +File: kpathsea.info, Node: KPSE_DOT expansion, Next: Subdirectory expansion, Prev: Brace expansion, Up: Path expansion + +`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 Subdirectory expansion ---------------------- @@ -2313,10 +2473,10 @@ should presumably match the list of hierarchies. The recommended way to create and maintain `ls-R' is to run the -`MakeTeXls-R' 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 `MakeTeX...' scripts. +`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 @@ -2326,17 +2486,17 @@ 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, *note Database format::.. +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. - 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.) + 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'. @@ -2442,7 +2602,7 @@ 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 -`MakeTeX...' scripts. +`mktex...' scripts. Synopsis: kpsewhich OPTION... FILENAME... @@ -2478,55 +2638,59 @@ `--format=NAME' Set the format for lookup to NAME. By default, the format is - guessed from the filename. In fact, the recognized filename - extensions and the allowable NAMEs (including any leading `.') are - the same. - - You can also specify an integer for NAME; this is the only way to - specify formats that don't have an associated suffix, such as - MetaPost support files and Dvips configuration files. It's also - somewhat faster, since no unused formats need to be initialized. - The integers appear in the output of `--help', and are of course - subject to change. - - Here's the current list of recognized names and numbers. *Note - Supported file formats::, for more information on each of these. - gf(0) - pk(1) - bitmap font (2) - .afm(3) - .base(4) - .bib(5) - .bst(6) - .cnf(7) - ls-R(8) - .fmt(9) - .map(10) - .mem(11) - .mf(12) - .pool(13) - .mft(14) - .mp(15) - .pool(16) - MetaPost support (17) - .ocp(18) - .ofm(19) - .opl(20) - .otp(21) - .ovf(22) - .ovp(23) - graphic/figure (24) .eps .epsi - .tex(25) .ltx .dtx .texi .texinfo .txi .eps .epsi - TeX documentation (26) - .pool(27) - TeX sources (28) - PostScript header/font (29) .pro - Troff fonts (30) - .tfm(31) - .pfa(32) .pfb - .vf(33) - dvips config (34) - .ist(35) + 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. + gf: gf + pk: pk + bitmap font + afm: .afm + base: .base + bib: .bib + bst: .bst + cnf: .cnf + ls-R: ls-R + fmt: .fmt + map: .map + mem: .mem + mf: .mf + mfpool: .pool + mft: .mft + mp: .mp + mppool: .pool + MetaPost support + ocp: .ocp + ofm: .ofm .tfm + opl: .opl + otp: .otp + ovf: .ovf + ovp: .ovp + graphic/figure: .eps .epsi + tex: .tex + TeX system documentation + texpool: .pool + TeX system sources + PostScript header/font: .pro + Troff fonts + tfm: .tfm + type1 fonts: .pfa .pfb + vf: .vf + dvips config + ist: .ist + truetype fonts: .ttf .ttc + type42 fonts + web2c files + other text files + other binary files This option and `--path' are mutually exclusive. @@ -2534,17 +2698,17 @@ After processing the command line, read additional filenames to look up from standard input. -`-maketex=FILETYPE' -`-no-maketex=FILETYPE' - Turn on or off the `MakeTeX' script associated with FILETYPE. The +`-mktex=FILETYPE' +`-no-mktex=FILETYPE' + Turn on or off the `mktex' script associated with FILETYPE. The only values that make sense for FILETYPE are `pk', `mf', `tex', - and `tfm'. By default, all are off in Kpsewhich. *Note MakeTeX + and `tfm'. By default, all are off in Kpsewhich. *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 MakeTeX - script arguments::. + lookups. No default: any mode will be found. *Note mktex script + arguments::. `--must-exist' Do everything possible to find the files, notably including @@ -2557,7 +2721,7 @@ 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 `--path-expand' in the following section. + one-shot lookup, see `--expand-path' in the following section. `--progname=NAME' Set the program name to NAME; default is `kpsewhich'. This can @@ -2576,16 +2740,18 @@ * `--debug=NUM' sets the debugging options to NUM. *Note Debugging::. + * `--expand-braces=STRING' outputs the variable and brace expansion + of STRING. *Note Path expansion::. + * `--expand-var=STRING' outputs the variable expansion of STRING. - For example, the `MakeTeX...' scripts run `kpsewhich + For example, the `mktex...' scripts run `kpsewhich --expand-var='$TEXMF'' to find the root of the TeX system hierarchy. *Note Path expansion::. * `--expand-path=STRING' outputs the complete expansion of STRING as a colon-separated path. This is useful to construct a search path for a program that doesn't accept recursive subdirectory - specifications. The option `--separator=STRING' changes the - separator in the output from `:' to STRING. + specifications. For one-shot uses of an arbitrary (not built in to Kpathsea) path, see `--path' in the previous section. @@ -2656,139 +2822,163 @@ The following table lists the above information. -`.afm' +`afm' (Adobe font metrics, *note Metric files: (dvips)Metric files.) - `AFMFONTS'. - -`.base' + `AFMFONTS'; suffix `.afm'. + +`base' (Metafont memory dump, *note Memory dumps: (web2c)Memory dumps.) - `MFBASES', `TEXMFINI'. - -`.bib' + `MFBASES', `TEXMFINI'; suffix `.base'. + +`bib' (BibTeX bibliography source, *note bibtex invocation: - (web2c)bibtex invocation.) `BIBINPUTS', `TEXBIB'. - -`.bst' + (web2c)bibtex invocation.) `BIBINPUTS', `TEXBIB'; suffix `.bib'. + +`bst' (BibTeX style file, *note Basic BibTeX style files: (web2c)Basic - BibTeX style files.) `BSTINPUTS'. - -`.cnf' - (Runtime configuration files, *note Config files::.) `TEXMFCNF'. - -`ls-R' - (Filename databases, *note Filename database::.) `TEXMFDBS'. - -`.fmt' + BibTeX style files.) `BSTINPUTS'; suffix `.bst'. + +`cnf' + (Runtime configuration files, *note Config files::.) `TEXMFCNF'; + suffix `.cnf'. + +`dvips config' + (Dvips `config.*' files, such as `config.ps', *note Config files: + (dvips)Config files.) `TEXCONFIG'. + +`fmt' (TeX memory dump, *note Memory dumps: (web2c)Memory dumps.) - `TEXFORMATS', `TEXMFINI'. + `TEXFORMATS', `TEXMFINI'; suffix `.fmt'. `gf' (generic font bitmap, *note Glyph files: (dvips)Glyph files.) - `PROGRAMFONTS', `GFFONTS', `GLYPHFONTS', `TEXFONTS'. - -`.map' - (Fontmaps, *note Fontmap::.) `TEXFONTMAPS'. - -`.ist' - (makeindex style files) `TEXINDEXSTYLE', `INDEXSTYLE'. - -`.mem' + `PROGRAMFONTS', `GFFONTS', `GLYPHFONTS', `TEXFONTS'; suffix `gf'. + +`graphic/figure' + (Encapsulated PostScript figures, *note PostScript figures: + (dvips)PostScript figures.) `TEXPICTS', `TEXINPUTS'; additional + suffixes: `.eps', `.epsi'. + +`ist' + (makeindex style files) `TEXINDEXSTYLE', `INDEXSTYLE'; suffix + `.ist'. + +`ls-R' + (Filename databases, *note Filename database::.) `TEXMFDBS'. + +`map' + (Fontmaps, *note Fontmap::.) `TEXFONTMAPS'; suffix `.map'. + +`mem' (MetaPost memory dump, *note Memory dumps: (web2c)Memory dumps.) - `MPMEMS', `TEXMFINI'. - -`.mf' + `MPMEMS', `TEXMFINI'; suffix `.mem'. + +`MetaPost support' + (MetaPost support files, used by DMP; *note dmp invocation: + (web2c)dmp invocation.) `MPSUPPORT'. + +`mf' (Metafont source, *note mf invocation: (web2c)mf invocation.) - `MFINPUTS'; dynamic creation program: `MakeTeXMF'. - -`.mft' - (`MFT' style file, *note mft invocation: (web2c)mft invocation.) - `MFTINPUTS'. - -`mf.pool' + `MFINPUTS'; suffix `.mf'; dynamic creation program: `mktexmf'. + +`mfpool' (Metafont program strings, *note pooltype invocation: - (web2c)pooltype invocation.) `MFPOOL', `TEXMFINI'. - -`.mp' + (web2c)pooltype invocation.) `MFPOOL', `TEXMFINI'; suffix `.pool'. + +`mft' + (`MFT' style file, *note mft invocation: (web2c)mft invocation.) + `MFTINPUTS'; suffix `.mft'. + +`mp' (MetaPost source, *note mpost invocation: (web2c)mpost invocation.) - `MPINPUTS'. - -`mp.pool' + `MPINPUTS'; suffix `.mp'. + +`mppool' (MetaPost program strings, *note pooltype invocation: - (web2c)pooltype invocation.) `MPPOOL', `TEXMFINI'. - -`(none)' - (MetaPost support files, used by DMP; *note dmp invocation: - (web2c)dmp invocation.) `MPSUPPORT'. - -`.ocp' + (web2c)pooltype invocation.) `MPPOOL', `TEXMFINI'; suffix `.pool'. + +`ocp' (Omega compiled process files) `OCPINPUTS'; - dynamic creation program: `MakeOmegaOCP'. - -`.ofm' + suffix `.ocp'; dynamic creation program: `MakeOmegaOCP'. + +`ofm' (Omega font metrics) `OFMFONTS', `TEXFONTS'; - dynamic creation program: `MakeOmegaOFM'. - -`.opl' - (Omega property lists) `OPLFONTS', `TEXFONTS'. - -`.otp' - (Omega translation process files) `OTPINPUTS'. - -`.ovf' - (Omega virtual fonts) `OVFFONTS', `TEXFONTS'. - -`.ovp' - (Omega virtual property lists) `OVPFONTS', `TEXFONTS'. - -`.eps' - (Encapsulated PostScript figures, *note PostScript figures: - (dvips)PostScript figures.) `TEXPICTS', `TEXINPUTS'; additional - suffixes: `.epsi'. + suffixes `.ofm', `.tfm'; dynamic creation program: `MakeOmegaOFM'. + +`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'. `pk' (packed bitmap fonts, *note Glyph files: (dvips)Glyph files.) `PROGRAMFONTS' (PROGRAM being `XDVI', etc.), `PKFONTS', `TEXPKS', - `GLYPHFONTS', `TEXFONTS'; dynamic creation program: `MakeTeXPK'. - -`.pro' + `GLYPHFONTS', `TEXFONTS'; suffix `pk'; dynamic creation program: + `mktexpk'. + +`PostScript header' (downloadable PostScript, *note Header files: (dvips)Header files.) - `TEXPSHEADERS', `PSHEADERS'. - -`.tex' + `TEXPSHEADERS', `PSHEADERS'; additional suffix `.pro'. + +`tex' (TeX source, *note tex invocation: (web2c)tex invocation.) - `TEXINPUTS'; additional suffixes: `.ltx' `.dtx' `.texi' `.texinfo' - `.txi' `.eps' `.epsi'; dynamic creation program: `MakeTeXTeX'. - -`(none)' + `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.pool' - (TeX program strings, *note pooltype invocation: (web2c)pooltype - invocation.) `TEXPOOL', `TEXMFINI'. - -`(none)' +`TeX system sources' (Source files for the TeX system) `TEXSOURCES'. -`.tfm' +`texpool' + (TeX program strings, *note pooltype invocation: (web2c)pooltype + invocation.) `TEXPOOL', `TEXMFINI'; suffix `.pool'. + +`tfm' (TeX font metrics, *note Metric files: (dvips)Metric files.) - `TFMFONTS', `TEXFONTS'; dynamic creation program: `MakeTeXTFM'. - -`(none)' + `TFMFONTS', `TEXFONTS'; suffix `.tfm'; dynamic creation program: + `mktextfm'. + +`Troff fonts' (Troff fonts, used by DMP; *note DMP invocation: (web2c)DMP - invocation.) `TRFONTS'. - -`.pfa' + invocation.) `TRFONTS'. + +`truetype fonts' + (TrueType outline fonts) `TTFONTS'; suffixes `.ttf', `.ttc'. + +`type1 fonts' (Type 1 PostScript outline fonts, *note Glyph files: (dvips)Glyph - files.) `T1FONTS', `T1INPUTS', `TEXPSHEADERS', `DVIPSHEADERS'; - additional suffix: `.pfb'. - -`.vf' + files.) `T1FONTS', `T1INPUTS', `TEXPSHEADERS', `DVIPSHEADERS'; + suffixes `.pfa', `.pfb'. + +`type42 fonts' + (Type 42 PostScript outline fonts) `T42FONTS'. + +`vf' (virtual fonts, *note Virtual fonts: (dvips)Virtual fonts.) - `VFFONTS', `TEXFONTS'. - -`(none)' - (Dvips `config.*' files, such as `config.ps', *note Config files: - (dvips)Config files.) `TEXCONFIG'. + `VFFONTS', `TEXFONTS'; suffix `.vf'. + + 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 @@ -2816,24 +3006,21 @@ font searches are the exception, as described in the next section). Here is the search strategy for a file NAME: - 1. If NAME has a suffix, search for exactly NAME along the - appropriate path. Example: given `foo.sty', look for `foo.sty' - before `foo.sty.tex', even though it's a TeX input file. - - 2. If the file format defines a default suffix, and the suffix of - NAME is not already that default, try appending the default. - Example: given `foo.bar', search for `foo.bar.tex'. But if given - `foo.tex', don't bother to search for `foo.tex.tex'. - - 3. If we're searching for a TFM, PK, or GF file, look for aliases of - NAME in `texfonts.map' files (*note Fontmap::.). Example: given - `Times-Roman', find `ptmr'. - - 4. If the file format defines a program to invoke to create missing - files, run it (*note MakeTeX scripts::.). - - 5. Search for NAME itself, if we haven't done so already. Example: - given `foo', search for `foo'. + 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. We postpone searching the disk as + long as possible. Example: given `foo.sty', look for `foo.sty.tex' + before `foo.sty'. This is unfortunate, but allows us to find + `foo.bar.tex' before `foo.bar' if both exist and we were given + `foo.bar'. + + 2. Search for NAME, and if necssary for alternative names found in + the fontmaps. Again we avoid searching the disk if possible. + Example: given `foo', we look for `foo'. + + 3. If the file format defines a program to invoke to create missing + files, run it (*note mktex scripts::.). This is implemented in the routine `kpse_find_file' in `kpathsea/tex-file.c'. You can watch it in action with the debugging @@ -2859,8 +3046,8 @@ 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 `MakeTeXPK') to generate - the font (*note MakeTeX scripts::.) + 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'). @@ -3034,6 +3221,7 @@ * 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. @@ -3075,7 +3263,7 @@ above, of course. -File: kpathsea.info, Node: Calling sequence, Next: Programming with config files, Prev: Programming overview, Up: Programming +File: kpathsea.info, Node: Calling sequence, Next: Program-specific files, Prev: Programming overview, Up: Programming Calling sequence ================ @@ -3083,25 +3271,35 @@ The typical way to use Kpathsea in your program goes something like this: - 1. Call `kpse_set_progname' with `argv[0]'; This is the only - initialization that is mandatory to take full advantage of - Kpathsea--specifically, for the `.PROGRAM' feature of config files - (*note Config files::.). - - If necessary, `kpse_set_progname' sets the global variables + 1. Call `kpse_set_program_name' with `argv[0]' as the first argument; + the second argument is a string or `NULL'. The second argument is + used by Kpathsea as the program name for the `.PROGRAM' feature of + config files (*note Config files::.). If the second argument is + `NULL', the value of the first argument is used. This function + must be called before any other use of the Kpathsea library. + + If necessary, `kpse_set_program_name' sets the global variables `program_invocation_name' and `program_invocation_short_name'. These variables are used in the error message macros defined in - `kpathsea/lib.h'. It also initializes debugging options based on - the environment variable `KPATHSEA_DEBUG' (if that is set). - Finally, it sets the 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, - specifically from a mounted CD-ROM. (You can use + `kpathsea/lib.h'. It sets the global 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 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, specifically from a mounted CD-ROM. (You can use `--expand-var=\$SELFAUTOLOC', etc., to see the values finds.) - 2. Set debugging options. *Note Debugging::. If your program doesn't + 2. The `kpse_set_progname' is deprecated. A call to + `kpse_set_progname' with `argv[0]' is equivalent to a call of + `kpse_set_program_name' with first argument `argv[0]' and second + argument `NULL'. The function is deprecated because it cannot + ensure that the `.PROGRAM' feature of config files will always + work (*note Config files::.). + + 3. Set debugging options. *Note Debugging::. If your program doesn't have a debugging option already, you can define one and set `kpathsea_debug' to the number that the user supplies (as in Dviljk and Web2c), or you can just omit this altogether (people can @@ -3109,13 +3307,13 @@ already, you need to merge Kpathsea's options with yours (as in Dvipsk and Xdvik). - 3. If your program has its own configuration files that can define + 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. - 4. Call `kpse_init_prog' (see `proginit.c'). It's useful for the DVI + 5. Call `kpse_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 @@ -3124,7 +3322,7 @@ that type; this eliminates much useless work, e.g., initializing the BibTeX search paths in a DVI driver.) - 5. The routine to actually find a file of type FORMAT is + 6. The routine to actually find a file of type FORMAT is `kpse_find_FORMAT', defined in `tex-file.h'. These are macros that expand to a call to `kpse_find_file'. You can call, say, `kpse_find_tfm' after doing only the first of the initialization @@ -3132,13 +3330,13 @@ config files, looks for environment variables, and does expansions at the first lookup. - 6. To find PK and/or GF bitmap fonts, the routines are `kpse_find_pk', + 7. To find PK and/or GF bitmap fonts, the routines are `kpse_find_pk', `kpse_find_gf' and `kpse_find_glyph', defined in `tex-glyph.h'. These return a structure in addition to the resultant filename, because fonts can be found in so many ways. See the documentation in the source. - 7. To actually open a file, not just return a filename, call + 8. To actually open a file, not just return a filename, call `kpse_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 @@ -3161,7 +3359,29 @@ `ftp://prep.ai.mit.edu/pub/gnu/'. -File: kpathsea.info, Node: Programming with config files, Prev: Calling sequence, Up: Programming +File: kpathsea.info, Node: Program-specific files, Next: Programming with config files, Prev: Calling sequence, Up: Programming + +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 special formats, `kpse_program_text_format' and +`kpse_program_binary_format' exist, which 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 +`kpse_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 Programming with config files ============================= @@ -3200,41 +3420,44 @@ * !! in path specifications: ls-R. * $ expansion: Variable expansion. +* --color=tty: ls-R. +* --debug=NUM: Auxiliary tasks. +* --disable-static: configure options. +* --dpi=NUM: Path searching options. +* --enable options: configure options. +* --enable-maintainer-mode: configure options. +* --enable-shared <1>: Shared library. +* --enable-shared: configure options. +* --expand-braces=STRING: Auxiliary tasks. +* --expand-path=STRING: Auxiliary tasks. +* --expand-var=STRING: Auxiliary tasks. +* --format=NAME: Path searching options. +* --help: Standard options. +* --interactive: Path searching options. +* --mode=STRING: Path searching options. +* --must-exist: Path searching options. +* --path=STRING: Path searching options. +* --progname=NAME: Path searching options. +* --show-path=NAME: Auxiliary tasks. +* --srcdir, for building multiple architectures: configure scenarios. +* --version: Standard options. +* --with options: configure options. +* --with-mktextex-default: mktex configuration. +* --without-mktexmf-default: mktex configuration. +* --without-mktexpk-default: mktex configuration. +* --without-mktextfm-default: mktex configuration. * -1 debugging value: Debugging. * -A option to ls: ls-R. * -Bdynamic: ShellWidgetClass. * -Bstatic: ShellWidgetClass. -* -color=tty: ls-R. * -D NUM: Path searching options. -* -debug=NUM: Auxiliary tasks. -* -dpi=NUM: Path searching options. * -dynamic: ShellWidgetClass. -* -enable options: configure options. -* -enable-shared: Shared library. -* -expand-path=STRING: Auxiliary tasks. -* -expand-var=STRING: Auxiliary tasks. -* -format=NAME: Path searching options. * -g, compiling without: configure scenarios. -* -help: Standard options. -* -interactive: Path searching options. * -L option to ls: ls-R. -* -maketex=FILETYPE: Path searching options. -* -mode=STRING: Path searching options. -* -must-exist: Path searching options. -* -no-maketex=FILETYPE: Path searching options. +* -mktex=FILETYPE: Path searching options. +* -no-mktex=FILETYPE: Path searching options. * -O, compiling with: configure scenarios. -* -path=STRING: Path searching options. -* -progname=NAME: Path searching options. -* -separator=STRING: Auxiliary tasks. -* -show-path=NAME: Auxiliary tasks. -* -srcdir, for building multiple architectures: configure scenarios. * -static: ShellWidgetClass. -* -version: Standard options. -* -with options: configure options. -* -with-maketextex-default: MakeTeX configuration. -* -without-maketexmf-default: MakeTeX configuration. -* -without-maketexpk-default: MakeTeX configuration. -* -without-maketextfm-default: MakeTeX configuration. * . directories, ignored: ls-R. * . files: ls-R. * .2602gf: Unable to generate fonts. @@ -3243,13 +3466,10 @@ * .bib: Supported file formats. * .bst: Supported file formats. * .cnf: Supported file formats. -* .dtx: Supported file formats. * .eps: Supported file formats. * .epsi: Supported file formats. * .fmt: Supported file formats. -* .gf: Supported file formats. * .ist: Supported file formats. -* .ltx: Supported file formats. * .map: Supported file formats. * .mem: Supported file formats. * .mf: Supported file formats. @@ -3269,10 +3489,9 @@ * .rhosts, writable by TeX: Security. * .tex: Supported file formats. * .tex file, included in ls-R: ls-R. -* .texi: Supported file formats. -* .texinfo: Supported file formats. * .tfm: Supported file formats. -* .txi: Supported file formats. +* .ttc: Supported file formats. +* .ttf: Supported file formats. * .vf: Supported file formats. * / may not be /: Searching overview. * /, trailing in home directory: Tilde expansion. @@ -3280,10 +3499,10 @@ * /afs/... , installing into: Installing files. * /etc/profile: Unable to find files. * /etc/profile and aliases: ls-R. -* /var/tex/fonts: MakeTeX configuration. +* /var/tmp/texfonts: mktex configuration. * 2602gf: Unable to generate fonts. * 4allTeX Live CD-ROM: CD-ROM distribution. -* 8.3 filenames, using: MakeTeX configuration. +* 8.3 filenames, using: mktex configuration. * : may not be :: Searching overview. * :: expansion: Default expansion. * @VAR@ substitutions: Running configure. @@ -3296,6 +3515,7 @@ * Acorn TeX implementations: Other TeX packages. * AFMFONTS: Supported file formats. * AFS: Installing files. +* AIX 4.1 configure error: Empty Makefiles. * AIX shells and configure: configure shells. * aliases for fonts: Fontmap. * aliases, for filenames: Filename aliases. @@ -3305,11 +3525,12 @@ * Amiga TeX implementations: Other TeX packages. * Andrew File System, installing with: Installing files. * announcement mailing list: Mailing lists. -* append-only directories and MakeTeXPK: Security. -* appendonlydir: MakeTeX configuration. +* ANSI C: TeX or Metafont failing. +* append-only directories and mktexpk: Security. +* appendonlydir: mktex configuration. * architecture-(in)dependent files, installing only: Installing files. * architectures, compiling multiple: configure scenarios. -* arguments to MakeTeX: MakeTeX script arguments. +* arguments to mktex: mktex script arguments. * argv[0]: Calling sequence. * ash, losing with configure: configure shells. * autoconf, recommended: Calling sequence. @@ -3321,9 +3542,9 @@ * Bach, Johann Sebastian: Default expansion. * backbone of CTAN: Electronic distribution. * backslash-newline: Config files. -* base dpi: MakeTeX script arguments. * bash, recommended for running configure: configure shells. * basic glyph lookup: Basic glyph lookup. +* Berry, Karl: History. * BIBINPUTS: Supported file formats. * binary mode, for file transfers: Electronic distribution. * blank lines, in texmf.cnf: Config files. @@ -3336,8 +3557,8 @@ * bug mailing list: Mailing lists. * bugs, reporting: Reporting bugs. * c-*.h: Calling sequence. -* c-auto.h.in: Running configure. -* cache of fonts, loca: Security. +* c-auto.in: Running configure. +* cache of fonts, local: Security. * calling sequence: Calling sequence. * CC: configure environment. * cc warnings: Pointer combination warnings. @@ -3370,6 +3591,7 @@ * compiler options, additional: Running make. * compiler options, specifying: configure environment. * compiler, changing: Running make. +* compiling on HP-UX: TeX or Metafont failing. * conditions for use: Introduction. * config files: Config files. * config files, for Kpathsea-using programs: Calling sequence. @@ -3382,11 +3604,11 @@ * configuration compiler options: configure environment. * configuration file, source for path: Path sources. * configuration files as shell scripts.: Config files. -* configuration of MakeTeX scripts: MakeTeX configuration. +* configuration of mktex scripts: mktex configuration. * configuration of optional features: configure options. -* CONFIGURE: Running configure. +* configure error from sed: Empty Makefiles. * configure options: configure options. -* configure options for MakeTeX scripts: MakeTeX configuration. +* configure options for mktex scripts: mktex configuration. * configure, running: Running configure. * context diff: Bug checklist. * continuation character: Config files. @@ -3396,10 +3618,10 @@ * CTAN, defined: Electronic distribution. * CTAN.sites: Electronic distribution. * custom installation: Custom installation. +* Dante TeX CD-ROM: CD-ROM distribution. * database search: Searching overview. * database, for filenames: Filename database. * database, format of: Database format. -* DC fonts, and dynamic source creation: MakeTeX scripts. * debug.h: Debugging. * debugger: Bug checklist. * debugging: Debugging. @@ -3414,11 +3636,11 @@ * default_texsizes: Fallback font. * DEFS: configure environment. * depot: configure scenarios. -* destination directory for MakeTeXPK: MakeTeX script arguments. * directories, changing default installation: Default path generation. -* directories, making append-only: MakeTeX configuration. +* directories, making append-only: mktex configuration. +* directory permissions: Security. * directory structure, for TeX files: TeX directory structure. -* disabling MakeTeX scripts: MakeTeX configuration. +* disabling mktex scripts: mktex configuration. * disk search: Searching overview. * disk searching, avoiding: ls-R. * disk space, needed: Disk space. @@ -3434,25 +3656,26 @@ * dlsym: dlopen. * dlsym.c: dlopen. * doc files: Supported file formats. -* DOS compatible names: MakeTeX configuration. +* DOS compatible names: mktex configuration. * DOS support: Custom installation. * DOS TeX implementations: Other TeX packages. -* dosnames: MakeTeX configuration. +* dosnames: mktex configuration. * dot files: ls-R. * doubled colons: Default expansion. -* dpiNNN directories: MakeTeX configuration. +* dpiNNN directories: mktex configuration. * DVI drivers: Kpathsea application distributions. -* DVILJMAKEPK: MakeTeX script names. +* DVILJMAKEPK: mktex script names. * DVILJSIZES: Fallback font. * DVIPSFONTS: Supported file formats. * DVIPSHEADERS: Supported file formats. -* DVIPSMAKEPK: MakeTeX script names. +* DVIPSMAKEPK: mktex script names. * DVIPSSIZES: Fallback font. -* dynamic creation of files: MakeTeX scripts. +* dynamic creation of files: mktex scripts. * dynamic linking problems with OpenWin libraries: ShellWidgetClass. +* EC fonts, and dynamic source creation: mktex scripts. * elt-dirs.c: Subdirectory expansion. * email CTAN access: Electronic distribution. -* enabling MakeTeX scripts: MakeTeX configuration. +* enabling mktex scripts: mktex configuration. * environment variable, source for path: Path sources. * environment variables for TeX: Supported file formats. * environment variables in paths: Variable expansion. @@ -3472,7 +3695,7 @@ * externally-built filename database: Filename database. * extra colons: Default expansion. * extraclean Make target: Cleaning up. -* failed MakeTeX... script invocation: MakeTeX script names. +* failed mktex... script invocation: mktex script names. * fallback font: Fallback font. * fallback resolutions: Fallback font. * fallback resolutions, overriding: Running make. @@ -3482,6 +3705,7 @@ * features, of default paths: Default path features. * file formats, supported: Supported file formats. * file lookup: File lookup. +* file permissions: Security. * file types, registering new: Programming overview. * filename aliases: Filename aliases. * filename database: Filename database. @@ -3493,13 +3717,17 @@ * font alias files: Fontmap. * font generation failures: Unable to generate fonts. * font of last resort: Fallback font. -* font set, infinite: MakeTeX scripts. +* font set, infinite: mktex scripts. * fontmap files: Fontmap. +* fontmaps: mktex configuration. +* fontname: mktex configuration. * fontnames, arbitrary length: Fontmap. * fonts, being created: Simple installation. +* FOOINPUTS: Supported file formats. * fopen, redefined: Debugging. * format of external database: Database format. * Free Software Foundation: CD-ROM distribution. +* FreeBSD configure error: Empty Makefiles. * FreeBSD shells and configure: configure shells. * FSF Source Code CD-ROM: CD-ROM distribution. * ftp retrieval: Electronic distribution. @@ -3508,8 +3736,10 @@ * gcc, compiling with: configure environment. * gdb, recommended: Bug checklist. * generation of filename database: Filename database generation. +* German TeX CD info: CD-ROM distribution. * get_applicationShellWidgetClass: ShellWidgetClass. * get_wmShellWidgetClass: ShellWidgetClass. +* gf: Supported file formats. * GFFONTS: Supported file formats. * globally writable directories: Security. * glyph lookup: Glyph lookup. @@ -3519,6 +3749,7 @@ * GNU General Public License: Introduction. * Gopher CTAN access: Electronic distribution. * group-writable directories: Security. +* GSFTOPK_DEBUG (128): Debugging. * GUTenberg: CD-ROM distribution. * hash table buckets, printing: Debugging. * hash table routines: Calling sequence. @@ -3528,6 +3759,7 @@ * history of Kpathsea: History. * home directories in paths: Tilde expansion. * HOME, as ~ expansion: Tilde expansion. +* HP-UX, compiling on: TeX or Metafont failing. * identifiers, characters valid in: Config files. * illegal pointer combination warnings: Pointer combination warnings. * include fontmap directive: Fontmap. @@ -3556,13 +3788,13 @@ * Kpathsea config file, source for path: Path sources. * Kpathsea version number: Kpathsea application distributions. * kpathsea.h: Programming overview. -* kpathsea/CONFIGURE: Running configure. * kpathsea/HIER: Default path features. +* kpathsea/README.CONFIGURE: Running configure. +* KPATHSEA_DEBUG: Calling sequence. +* kpathsea_debug: Debugging. * KPATHSEA_DEBUG: Debugging. * kpathsea_debug: Debugging. -* KPATHSEA_DEBUG: Calling sequence. * kpathsea_debug variable: Calling sequence. -* KPATHSEA_DPI: MakeTeX script arguments. * KPSE_BITMAP_TOLERANCE: Basic glyph lookup. * kpse_cnf_get: Programming with config files. * KPSE_DEBUG_EXPAND (16): Debugging. @@ -3571,18 +3803,23 @@ * KPSE_DEBUG_PATHS (8): Debugging. * KPSE_DEBUG_SEARCH (32): Debugging. * KPSE_DEBUG_STAT (1): Debugging. +* KPSE_DEBUG_VARS (64): Debugging. +* KPSE_DOT expansion: KPSE_DOT expansion. * kpse_fallback_font: Fallback font. * kpse_find_*: Calling sequence. +* kpse_find_file <1>: Calling sequence. * kpse_find_file: File lookup. * kpse_find_glyph_format: Glyph lookup. * kpse_format_info: Calling sequence. * kpse_format_info_type: Debugging. * kpse_init_prog: Calling sequence. * kpse_init_prog, and MAKETEX_MODE: Default path features. -* kpse_make_specs: MakeTeX script names. +* kpse_make_specs: mktex script names. * kpse_open_file: Calling sequence. +* kpse_program_name: Calling sequence. * kpse_set_progname: Calling sequence. -* kpse_var_expand: Programming with config files. +* kpse_set_program_name: Calling sequence. +* kpse_var_value: Programming with config files. * kpsewhich: Invoking kpsewhich. * Kpsewhich, and debugging: Debugging. * ksh, losing with configure: configure shells. @@ -3602,7 +3839,7 @@ * libucb, avoiding: Running make. * license for using the library: Introduction. * lines, reading arbitrary-length: Calling sequence. -* Linux File System Standard: MakeTeX configuration. +* Linux File System Standard: mktex configuration. * Linux shells and configure: configure shells. * Linux, using Web2c: CD-ROM distribution. * lndir for building symlink trees: configure scenarios. @@ -3618,38 +3855,24 @@ * ls-R and AFS: Installing files. * ls-R database file: ls-R. * ls-R, simplest build: ls-R. +* Mach10 configure error: Empty Makefiles. * Macintosh TeX implementations: Other TeX packages. * MacKenzie, David <1>: Subdirectory expansion. * MacKenzie, David: History. -* mag Metafont variable: MakeTeX script arguments. * magic characters: Searching overview. -* magstep for MakeTeXPK: MakeTeX script arguments. * mailing lists: Mailing lists. * maintainer-clean Make target: Cleaning up. * Make arguments, additional: Running make. * make, running: Running make. * Makefile.in: Running configure. -* MakeTeX script configuration: MakeTeX configuration. -* MakeTeX script names: MakeTeX script names. -* MakeTeX scripts: MakeTeX scripts. -* MakeTeX.site: MakeTeX configuration. -* MAKETEX_BASE_DPI: MakeTeX script arguments. -* MAKETEX_MAG: MakeTeX script arguments. -* MAKETEX_MODE <1>: Default path features. -* MAKETEX_MODE: MakeTeX script arguments. -* MakeTeXMF: MakeTeX script names. -* MakeTeXmkdir: MakeTeX configuration. -* MakeTeXnames.cnf: MakeTeX configuration. -* MakeTeXPK: MakeTeX script names. -* MakeTeXPK , initial runs: Simple installation. -* MAKETEXPK environment variable: MakeTeX script arguments. -* MakeTeXTeX: MakeTeX script names. -* MakeTeXTFM: MakeTeX script names. +* Makefiles, empty: Empty Makefiles. +* MAKETEX_DEBUG (512): Debugging. +* MAKETEX_FINE_DEBUG (1024): Debugging. +* MAKETEX_MODE: Default path features. * memory allocation routines: Calling sequence. * Metafont failures: TeX or Metafont failing. * Metafont installation: Unable to generate fonts. * Metafont making too-large fonts: Unable to generate fonts. -* Metafont mode name for MakeTeXPK: MakeTeX script arguments. * Metafont using the wrong resolution: Unable to generate fonts. * MFBASES: Supported file formats. * MFINPUTS: Supported file formats. @@ -3657,32 +3880,43 @@ * MFTINPUTS: Supported file formats. * mirrors, FTP: Electronic distribution. * mismatched checksum warnings: Suppressing warnings. -* missfont.log: MakeTeX script names. -* MISSFONT_LOG: MakeTeX script names. +* missfont.log: mktex script names. +* MISSFONT_LOG: mktex script names. * missing character warnings: Suppressing warnings. -* mode directory, omitting: MakeTeX configuration. -* mode Metafont variable: MakeTeX script arguments. +* mktex script configuration: mktex configuration. +* mktex script names: mktex script names. +* mktex scripts: mktex scripts. +* mktex.cnf: mktex configuration. +* mktex.opt: mktex configuration. +* mktexdir: mktex configuration. +* mktexmf: mktex script names. +* mktexpk: mktex script names. +* mktexpk , initial runs: Simple installation. +* mktextex: mktex script names. +* mktextfm: mktex script names. +* mode directory, omitting: mktex configuration. * Morgan, Tim: History. * mostlyclean Make target: Cleaning up. * MPINPUTS: Supported file formats. * MPMEMS: Supported file formats. * MPPOOL: Supported file formats. * MPSUPPORT: Supported file formats. -* MT_FEATURES: MakeTeX configuration. -* mtp_destdir: MakeTeX script arguments. +* MT_FEATURES: mktex configuration. * multiple architectures, compiling on: configure scenarios. * multiple architectures, directories for: configure scenarios. * multiple architectures, installing on: Installing files. * multiple TeX hierarchies: Brace expansion. * must exist: Searching overview. -* names for MakeTeX scripts: MakeTeX script names. +* names for mktex scripts: mktex script names. +* NetBSD configure error: Empty Makefiles. * NetBSD shells and configure: configure shells. * Neumann, Gustaf: History. * newsgroup for TeX: Mailing lists. +* NeXT sed error: Empty Makefiles. * NeXT, lacking X11: Kpathsea application distributions. * NFS and ls-R: ls-R. * NFS CTAN access: Electronic distribution. -* nomode: MakeTeX configuration. +* nomode: mktex configuration. * non-English typesetting: Kpathsea application distributions. * non-Unix operating systems: Custom installation. * Northwest Computing Support Center: Tape distribution. @@ -3725,6 +3959,8 @@ * PCL driver: Kpathsea application distributions. * PDF generation: Kpathsea application distributions. * permission denied: Searching overview. +* permissions, directory: Security. +* permissions, file: Security. * PKFONTS: Supported file formats. * plain.base: Unable to generate fonts. * pointer combination warnings: Pointer combination warnings. @@ -3753,6 +3989,7 @@ * quoting variable values: Variable expansion. * readable: Suppressing warnings. * reading arbitrary-length lines: Calling sequence. +* README.CONFIGURE: Running configure. * README.mirrors: Electronic distribution. * recording successful searches: Logging. * relative filenames: Searching overview. @@ -3768,8 +4005,8 @@ * root user: Tilde expansion. * runtime configuration files: Config files. * runtime debugging: Debugging. -* Sauter fonts, and dynamic source creation: MakeTeX scripts. -* scripts for file creation: MakeTeX scripts. +* Sauter fonts, and dynamic source creation: mktex scripts. +* scripts for file creation: mktex scripts. * search path, defined: Searching overview. * search paths, changing default: Changing search paths. * searching for files: File lookup. @@ -3778,6 +4015,7 @@ * searching the database: Searching overview. * searching the disk: Searching overview. * security considerations: Security. +* sed error from configure: Empty Makefiles. * SELFAUTODIR: Calling sequence. * SELFAUTOLOC: Calling sequence. * SELFAUTOPARENT: Calling sequence. @@ -3791,7 +4029,7 @@ * shell_escape, example for code: Programming with config files. * shells and configure: configure shells. * simple installation: Simple installation. -* site overrides for MakeTeX...: MakeTeX configuration. +* site overrides for mktex...: mktex configuration. * size of distribution archives: Disk space. * skeleton TeX directory: TeX directory structure. * slow startup time: Slow path searching. @@ -3799,7 +4037,6 @@ * source files: Supported file formats. * sources for search paths: Path sources. * special: Suppressing warnings. -* specification for MakeTeXPK: MakeTeX script arguments. * st_nlink: Subdirectory expansion. * stack trace: Bug checklist. * standalone path searching: Invoking kpsewhich. @@ -3809,12 +4046,14 @@ * static linking: ShellWidgetClass. * static linking and dlsym: dlopen. * string routines: Calling sequence. -* strip: MakeTeX configuration. +* strip: mktex configuration. +* stripsupplier: mktex configuration. +* striptypeface: mktex configuration. * subdirectory searching: Subdirectory expansion. * suggestions, making: Introduction. * Sun 2: History. * Sun OpenWin patches: ShellWidgetClass. -* supplier directory, omitting: MakeTeX configuration. +* supplier directory, omitting: mktex configuration. * support organization: Tape distribution. * supported file formats: Supported file formats. * suppressing warnings: Suppressing warnings. @@ -3827,6 +4066,7 @@ * system V universe: Running make. * T1FONTS: Supported file formats. * T1INPUTS: Supported file formats. +* T42FONTS: Supported file formats. * tape distribution: Tape distribution. * TDS: TeX directory structure. * testing, post-installation: Installation testing. @@ -3850,7 +4090,7 @@ * tex-glyph.h: Programming overview. * tex-k-request@mail.tug.org: Mailing lists. * tex-k@mail.tug.org (bug address): Reporting bugs. -* tex-make.c: MakeTeX script names. +* tex-make.c: mktex script names. * TEX_HUSH <1>: Suppressing warnings. * TEX_HUSH: Searching overview. * TEXBIB: Supported file formats. @@ -3868,16 +4108,16 @@ * texmf.cnf, definition for: Config files. * texmf.cnf, generated: Default path generation. * texmf.cnf, source for path: Path sources. -* texmf.cnf.in: Default path generation. -* texmf.cnf.in, editing: Changing search paths. +* texmf.in: Default path generation. +* texmf.in, editing: Changing search paths. * texmf.sed: Default path generation. * TEXMFCNF <1>: Supported file formats. * TEXMFCNF: Config files. -* TEXMFDBS <1>: ls-R. -* TEXMFDBS: Supported file formats. +* TEXMFDBS <1>: Supported file formats. +* TEXMFDBS: ls-R. * TEXMFINI: Supported file formats. * TEXMFLOG: Logging. -* TEXMFOUTPUT: MakeTeX script names. +* TEXMFOUTPUT: mktex script names. * TEXPICTS: Supported file formats. * TEXPKS: Supported file formats. * TEXPOOL: Supported file formats. @@ -3895,10 +4135,11 @@ * TRFONTS: Supported file formats. * trick for detecting leaf directories: Subdirectory expansion. * trojan horse attack: Security. +* TTFONTS: Supported file formats. * TUG: CD-ROM distribution. -* tug.cs.umb.edu: unixtex.ftp. +* tug.org: unixtex.ftp. * tug@tug.org: Introduction. -* typeface directory, omitting: MakeTeX configuration. +* typeface directory, omitting: mktex configuration. * ucbinclude, avoiding: Running make. * UKTUG: CD-ROM distribution. * Ultrix shells and configure: configure shells. @@ -3914,13 +4155,13 @@ * unreadable files: Searching overview. * unusable ls-R warning: ls-R. * usage patterns, finding: Logging. -* USE_VARTEXFONTS: MakeTeX configuration. +* USE_VARTEXFONTS: mktex configuration. * Usenet TeX newsgroup: Mailing lists. -* varfonts: MakeTeX configuration. +* varfonts: mktex configuration. * variable expansion: Variable expansion. * variable.c: Variable expansion. * variable.h: Programming with config files. -* VARTEXFONTS: MakeTeX configuration. +* VARTEXFONTS: mktex configuration. * VAX 11/750: History. * version number, of Kpathsea: Kpathsea application distributions. * version numbers, determining: Bug checklist. @@ -3936,6 +4177,7 @@ * warnings, pointer combinations: Pointer combination warnings. * warnings, suppressing: Suppressing warnings. * wcstombs: dlopen. +* Weber, Olaf: History. * whitespace, in fontmap files: Fontmap. * whitespace, not ignored on continuation lines: Config files. * Windows TeX implementations: Other TeX packages. @@ -3947,7 +4189,7 @@ * XCPPFLAGS: Running make. * XDEFS: Running make. * XDVIFONTS: Supported file formats. -* XDVIMAKEPK: MakeTeX script names. +* XDVIMAKEPK: mktex script names. * XDVISIZES: Fallback font. * XLDFLAGS: Running make. * XLOADLIBES: Running make. @@ -3961,83 +4203,86 @@ Tag Table: -Node: Top1433 -Node: Introduction2080 -Node: History4437 -Node: Installation8250 -Node: Simple installation9023 -Node: Custom installation12062 -Node: Disk space13230 -Node: Kpathsea application distributions14090 -Node: Changing search paths15194 -Node: Default path features16385 -Node: Default path generation18513 -Node: Running configure19944 -Node: configure shells20990 -Node: configure options21759 -Node: configure environment22970 -Node: configure scenarios24758 -Node: Shared library26369 -Node: Running make27616 -Node: Installing files29648 -Node: Cleaning up31583 -Node: Filename database generation32618 -Node: MakeTeX scripts33179 -Node: MakeTeX configuration34140 -Node: MakeTeX script names37184 -Node: MakeTeX script arguments38287 -Node: Installation testing40355 -Node: Security40719 -Node: TeX directory structure42950 -Node: unixtex.ftp47362 -Node: Electronic distribution48931 -Node: CD-ROM distribution51252 -Node: Tape distribution52926 -Node: Other TeX packages53786 -Node: Reporting bugs55075 -Node: Bug checklist55810 -Node: Mailing lists59900 -Node: Debugging61245 -Node: Logging65404 -Node: Common problems66902 -Node: Unable to find files67652 -Node: Slow path searching70064 -Node: Unable to generate fonts71427 -Node: TeX or Metafont failing72978 -Node: XtStrings74335 -Node: dlopen75163 -Node: ShellWidgetClass75965 -Node: Pointer combination warnings77579 -Node: Path searching77954 -Node: Searching overview78599 -Node: Path sources81959 -Node: Config files83024 -Node: Path expansion86519 -Node: Default expansion87383 -Node: Variable expansion89106 -Node: Tilde expansion90474 -Node: Brace expansion91358 -Node: Subdirectory expansion92150 -Node: Filename database94478 -Node: ls-R95784 -Node: Filename aliases98662 -Node: Database format99827 -Node: Invoking kpsewhich100839 -Node: Path searching options101708 -Node: Auxiliary tasks105363 -Node: Standard options106604 -Node: TeX support106914 -Node: Supported file formats108201 -Node: File lookup113362 -Node: Glyph lookup114701 -Node: Basic glyph lookup115825 -Node: Fontmap116692 -Node: Fallback font119290 -Node: Suppressing warnings120246 -Node: Programming121303 -Node: Programming overview121751 -Node: Calling sequence123667 -Node: Programming with config files128053 -Node: Index129337 +Node: Top1441 +Node: Introduction2087 +Node: History4447 +Node: Installation8523 +Node: Simple installation9313 +Node: Custom installation12892 +Node: Disk space14058 +Node: Kpathsea application distributions14973 +Node: Changing search paths16077 +Node: Default path features17245 +Node: Default path generation19361 +Node: Running configure20788 +Node: configure shells21828 +Node: configure options22597 +Node: configure environment24088 +Node: configure scenarios25876 +Node: Shared library27499 +Node: Running make28816 +Node: Installing files30848 +Node: Cleaning up32783 +Node: Filename database generation33818 +Node: mktex scripts34372 +Node: mktex configuration35319 +Node: mktex script names40211 +Node: mktex script arguments41292 +Node: Installation testing42167 +Node: Security42519 +Node: TeX directory structure45072 +Node: unixtex.ftp49487 +Node: Electronic distribution51051 +Node: CD-ROM distribution54329 +Node: Tape distribution56314 +Node: Other TeX packages57174 +Node: Reporting bugs58463 +Node: Bug checklist59198 +Node: Mailing lists63288 +Node: Debugging64633 +Node: Logging69695 +Node: Common problems71193 +Node: Unable to find files72014 +Node: Slow path searching74413 +Node: Unable to generate fonts75776 +Node: TeX or Metafont failing77321 +Node: Empty Makefiles79180 +Node: XtStrings80392 +Node: dlopen81212 +Node: ShellWidgetClass82014 +Node: Pointer combination warnings83631 +Node: Path searching84006 +Node: Searching overview84651 +Node: Path sources88010 +Node: Config files89075 +Node: Path expansion92568 +Node: Default expansion93511 +Node: Variable expansion95189 +Node: Tilde expansion96578 +Node: Brace expansion97462 +Node: KPSE_DOT expansion98657 +Node: Subdirectory expansion99160 +Node: Filename database101491 +Node: ls-R102797 +Node: Filename aliases105674 +Node: Database format106839 +Node: Invoking kpsewhich107851 +Node: Path searching options108718 +Node: Auxiliary tasks112411 +Node: Standard options113669 +Node: TeX support113979 +Node: Supported file formats115266 +Node: File lookup121524 +Node: Glyph lookup122808 +Node: Basic glyph lookup123928 +Node: Fontmap124795 +Node: Fallback font127393 +Node: Suppressing warnings128349 +Node: Programming129406 +Node: Programming overview129917 +Node: Calling sequence131833 +Node: Program-specific files136856 +Node: Programming with config files137886 +Node: Index139176 End Tag Table
--- a/kpathsea/kpathsea.texi +++ b/kpathsea/kpathsea.texi @@ -2,8 +2,8 @@ @setfilename kpathsea.info @settitle Kpathsea: A library for path searching -@set version 3.0 -@set month-year February 1997 +@set version 3.2 +@set month-year October 1997 @c Define new indices for commands, filenames, and options. @defcodeindex cm @@ -22,19 +22,19 @@ @dircategory TeX @direntry -* Kpathsea: (kpathsea). File lookup along search paths. -* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching. -* MakeTeXMF: (kpathsea)MakeTeX scripts. MF source generation. -* MakeTeXPK: (kpathsea)MakeTeX scripts. PK bitmap generation. -* MakeTeXTeX: (kpathsea)MakeTeX scripts. TeX source generation. -* MakeTeXTFM: (kpathsea)MakeTeX scripts. TeX font metric generation. -* MakeTeXls-R: (kpathsea)Filename database. Update ls-R. +* Kpathsea: (kpathsea). File lookup along search paths. +* kpsewhich: (kpathsea)Invoking kpsewhich. TeX file searching. +* 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. +* mktexlsr: (kpathsea)Filename database. Update ls-R. @end direntry @ifinfo This file documents the Kpathsea library for path searching. -Copyright (C) 1993, 94, 95, 96, 97 K. Berry. +Copyright (C) 1993, 94, 95, 96, 97 K. Berry & O. Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -65,11 +65,12 @@ @subtitle for version @value{version} @subtitle @value{month-year} @author K. Berry (@email{kb@@mail.tug.org}) +@author O. Weber (@email{infovore@@xs4all.nl}) @page @vskip 0pt plus 1filll -Copyright @copyright{} 1993, 94, 95, 96, 97 K. Berry. +Copyright @copyright{} 1993, 94, 95, 96, 97 K. Berry & O. Weber. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are @@ -123,7 +124,7 @@ looking up program names to execute. @cindex programs using the library -The following software, all of which I maintain, uses this library: +The following software, all of which we maintain, uses this library: @itemize @bullet @item Dviljk (see the @samp{dvilj} man page) @@ -135,31 +136,31 @@ @item Xdvik (see the @samp{xdvi} man page) @end itemize -@noindent Other software that I do not maintain also uses it. +@noindent Other software that we do not maintain also uses it. @cindex interface, not frozen @cindex comments, making @cindex suggestions, making -I am still actively maintaining the library (and probably always will -be, despite my hopes). If you have comments or suggestions, please send -them to me (@pxref{Reporting bugs}). +We are still actively maintaining the library (and probably always will +be, despite our hopes). If you have comments or suggestions, please send +them to us (@pxref{Reporting bugs}). @cindex conditions for use @cindex license for using the library @cindex GNU General Public License -I distribute the library under the GNU Library General Public License +We distribute the library under the GNU Library General Public License (LGPL), with one exception (see below). 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, -although I hope you will. +although we hope you will. The exception is the part of the file @file{expand.c} which implements -brace expansion. I took this from Bash, which is covered by the GNU +brace expansion. We took this from Bash, which is covered by the GNU General Public License (GPL). Therefore, if you wish to redistribute the library under the LGPL, you must remove this code. (If you write a -replacement I can distribute, I hope you'll share it with me.) See the +replacement we can distribute, we hope you'll share it with us.) See the files @file{COPYING} and @file{COPYING.LIB} for the text of the GNU licenses. @cindex @TeX{} Users Group @@ -173,10 +174,11 @@ @flindex tug@@tug.org @display @TeX{} Users Group -870 Market St. #801 -San Francisco, CA 94102 USA -phone: +1 (415) 982-8449 -fax: +1 (415) 982-8559 +P.O. Box 1239 +Three Rivers, CA 93271-1239 +USA +phone: 1 209 561 0112 +fax: 1 209 561 4584 email: @email{tug@@tug.org} @end display @@ -192,24 +194,25 @@ @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, I +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 @cite{Software---Practice and Experience} 19(7), July 1989.) @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} -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. I -was using @code{pxp} and @code{pc} on VAX 11/750's and the hot new Sun 2 -machines.) +[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. 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 @@ -269,6 +272,13 @@ 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. + + @include install.texi @include hier.texi @include unixtex.texi @@ -356,7 +366,7 @@ 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 thel +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. @@ -450,7 +460,7 @@ 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, with the search path of @samp{.:$TEXMF}, values from +later files. Thus, if the search path is @samp{.:$TEXMF}, values from @file{./texmf.cnf} override those from @file{$TEXMF/texmf.cnf}. While (or instead of) reading this description, you may find it helpful @@ -557,6 +567,7 @@ * 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 @@ -609,9 +620,9 @@ 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 (where they will eventually be equivalent to -@samp{.}, i.e., the current directory). Kpathsea checks first for a -leading @samp{:}, then a trailing @samp{:}, then a doubled @samp{:}. +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}). @@ -635,9 +646,9 @@ 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). -Otherwise, Kpathsea gives a warning and ignores the @samp{$} and its -following character. +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 @@ -708,29 +719,50 @@ @kindex @{ @r{expansion} @cindex brace expansion -@samp{x@{@var{a},@var{b}@}y} expands to @samp{x@var{a}y:x@var{b}y}. +@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 +foo/@{1:2@}/baz @end example -@noindent expands to @samp{foo1baz:foo2baz}. @samp{:} is the path +@noindent expands to @samp{foo/1/baz:foo/2/baz}. @samp{:} is the path separator on the current system; e.g., on a DOS system, it's @samp{;}. -Braces can be nested; for example, @samp{x@{a,b@{1,2@}@}y} expands to -@samp{xay:xb1y:xb2y}. +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:xB2:y}. @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.cnf.in}. +@file{texmf.in}. + +In old versions of the library you had to use a comma. While this usage +is deprecated, it is still supported for backwards compatibility with +old configurations. The last example could have been written +@samp{x@{A,B@}@{1,2@}y}. @flindex expand.c Brace expansion is implemented in the source file -@file{kpathsea/expand.c}. It is taken from Bash, and is thus covered -by the GNU General Public License, rather than the Library General -Public License that covers the rest of Kpathsea. +@file{kpathsea/expand.c}. It is a modification of the Bash sources, and +is thus covered by the GNU General Public License, rather than the +Library General Public License that covers the rest of Kpathsea. + + +@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 @@ -844,10 +876,10 @@ hierarchies. The recommended way to create and maintain @samp{ls-R} is to run the -@code{MakeTeXls-R} script, which is installed in @samp{$(bindir)} +@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{MakeTeX@dots{}} scripts. +distributed @samp{mktex@dots{}} scripts. @flindex ls-R@r{, simplest build} At its simplest, though, you can build @file{ls-R} with the command @@ -864,7 +896,7 @@ (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, -@pxref{Database 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 @@ -1011,7 +1043,7 @@ 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{MakeTeX@dots{}} scripts. +distributed @samp{mktex@dots{}} scripts. Synopsis: @example @@ -1054,55 +1086,59 @@ @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. In fact, the recognized filename extensions -and the allowable @var{name}s (including any leading @samp{.}) are the -same. +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. -You can also specify an integer for @var{name}; this is the only way to -specify formats that don't have an associated suffix, such as MetaPost -support files and Dvips configuration files. It's also somewhat faster, -since no unused formats need to be initialized. The integers appear in -the output of @samp{--help}, and are of course subject to change. +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 numbers. +Here's the current list of recognized names and the associated suffixes. @xref{Supported file formats}, for more information on each of these. @example -gf(0) -pk(1) -bitmap font (2) -.afm(3) -.base(4) -.bib(5) -.bst(6) -.cnf(7) -ls-R(8) -.fmt(9) -.map(10) -.mem(11) -.mf(12) -.pool(13) -.mft(14) -.mp(15) -.pool(16) -MetaPost support (17) -.ocp(18) -.ofm(19) -.opl(20) -.otp(21) -.ovf(22) -.ovp(23) -graphic/figure (24) .eps .epsi -.tex(25) .ltx .dtx .texi .texinfo .txi .eps .epsi -TeX documentation (26) -.pool(27) -TeX sources (28) -PostScript header/font (29) .pro -Troff fonts (30) -.tfm(31) -.pfa(32) .pfb -.vf(33) -dvips config (34) -.ist(35) +gf: gf +pk: pk +bitmap font +afm: .afm +base: .base +bib: .bib +bst: .bst +cnf: .cnf +ls-R: ls-R +fmt: .fmt +map: .map +mem: .mem +mf: .mf +mfpool: .pool +mft: .mft +mp: .mp +mppool: .pool +MetaPost support +ocp: .ocp +ofm: .ofm .tfm +opl: .opl +otp: .otp +ovf: .ovf +ovp: .ovp +graphic/figure: .eps .epsi +tex: .tex +TeX system documentation +texpool: .pool +TeX system sources +PostScript header/font: .pro +Troff fonts +tfm: .tfm +type1 fonts: .pfa .pfb +vf: .vf +dvips config +ist: .ist +truetype fonts: .ttf .ttc +type42 fonts +web2c files +other text files +other binary files @end example This option and @samp{--path} are mutually exclusive. @@ -1113,19 +1149,19 @@ After processing the command line, read additional filenames to look up from standard input. -@item -maketex=@var{filetype} -@itemx -no-maketex=@var{filetype} -@opindex -maketex=@var{filetype} -@opindex -no-maketex=@var{filetype} -Turn on or off the @samp{MakeTeX} script associated with @var{filetype}. +@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}. The only values that make sense for @var{filetype} are @samp{pk}, @samp{mf}, @samp{tex}, and @samp{tfm}. By default, all are off in -Kpsewhich. @xref{MakeTeX scripts}. +Kpsewhich. @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{MakeTeX +@samp{pk} lookups. No default: any mode will be found. @xref{mktex script arguments}. @item --must-exist @@ -1141,7 +1177,7 @@ 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{--path-expand} in the following section. +@samp{--expand-path} in the following section. @item --progname=@var{name} @opindex --progname=@var{name} @@ -1166,20 +1202,23 @@ @xref{Debugging}. @item +@opindex --expand-braces=@var{string} +@samp{--expand-braces=@var{string}} outputs the variable and brace +expansion of @var{string}. @xref{Path expansion}. + +@item @opindex --expand-var=@var{string} @samp{--expand-var=@var{string}} outputs the variable expansion of -@var{string}. For example, the @samp{MakeTeX@dots{}} scripts run +@var{string}. For example, the @samp{mktex@dots{}} scripts run @samp{kpsewhich --expand-var='$TEXMF'} to find the root of the @TeX{} system hierarchy. @xref{Path expansion}. @item @opindex --expand-path=@var{string} -@opindex --separator=@var{string} @samp{--expand-path=@var{string}} outputs the complete expansion of @var{string} as a colon-separated path. This is useful to construct a search path for a program that doesn't accept recursive subdirectory -specifications. The option @samp{--separator=@var{string}} changes the -separator in the output from @samp{:} to @var{string}. +specifications. For one-shot uses of an arbitrary (not built in to Kpathsea) path, see @samp{--path} in the previous section. @@ -1265,38 +1304,84 @@ The following table lists the above information. @table @samp -@item .afm +@item afm @flindex .afm @vindex AFMFONTS (Adobe font metrics, @pxref{Metric files,,, dvips, Dvips}) -@code{AFMFONTS}. +@code{AFMFONTS}; +suffix @samp{.afm}. -@item .base +@item base @flindex .base @vindex MFBASES @vindex TEXMFINI (Metafont memory dump, @pxref{Memory dumps,,, web2c, Web2c}) -@code{MFBASES}, @code{TEXMFINI}. +@code{MFBASES}, @code{TEXMFINI}; +suffix @samp{.base}. -@item .bib +@item bib @flindex .bib @vindex BIBINPUTS @vindex TEXBIB (Bib@TeX{} bibliography source, @pxref{bibtex invocation,,, web2c, Web2c}) -@code{BIBINPUTS}, @code{TEXBIB}. +@code{BIBINPUTS}, @code{TEXBIB}; +suffix @samp{.bib}. -@item .bst +@item bst @flindex .bst @vindex BSTINPUTS (Bib@TeX{} style file, @pxref{Basic BibTeX style files,, Basic Bib@TeX{} style files, web2c, Web2c}) -@code{BSTINPUTS}. +@code{BSTINPUTS}; +suffix @samp{.bst}. -@item .cnf +@item cnf @flindex .cnf @vindex TEXMFCNF (Runtime configuration files, @pxref{Config files}) -@code{TEXMFCNF}. +@code{TEXMFCNF}; +suffix @samp{.cnf}. + +@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 fmt +@flindex .fmt +@vindex TEXFORMATS +@vindex TEXMFINI +(@TeX{} memory dump, @pxref{Memory dumps,,, web2c, Web2c}) +@code{TEXFORMATS}, @code{TEXMFINI}; +suffix @samp{.fmt}. + +@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 ls-R @flindex ls-R @@ -1304,122 +1389,104 @@ (Filename databases, @pxref{Filename database}) @code{TEXMFDBS}. -@item .fmt -@flindex .fmt -@vindex TEXFORMATS -@vindex TEXMFINI -(@TeX{} memory dump, @pxref{Memory dumps,,, web2c, Web2c}) -@code{TEXFORMATS}, @code{TEXMFINI}. - -@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}. - -@item .map +@item map @flindex .map @vindex TEXFONTMAPS (Fontmaps, @pxref{Fontmap}) -@code{TEXFONTMAPS}. +@code{TEXFONTMAPS}; +suffix @samp{.map}. -@item .ist -@flindex .ist -@vindex TEXINDEXSTYLE -@vindex INDEXSTYLE -(makeindex style files) -@code{TEXINDEXSTYLE}, @code{INDEXSTYLE}. - -@item .mem +@item mem @flindex .mem @vindex MPMEMS @vindex TEXMFINI (MetaPost memory dump, @pxref{Memory dumps,,, web2c, Web2c}) -@code{MPMEMS}, @code{TEXMFINI}. +@code{MPMEMS}, @code{TEXMFINI}; +suffix @samp{.mem}. -@item .mf +@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}; -dynamic creation program: @code{MakeTeXMF}. +suffix @samp{.mf}; +dynamic creation program: @code{mktexmf}. -@item .mft -@flindex .mft -@vindex MFTINPUTS -(@code{MFT} style file, @pxref{mft invocation,,, web2c, Web2c}) -@code{MFTINPUTS}. - -@item mf.pool +@item mfpool @flindex .pool @vindex MFPOOL (Metafont program strings, @pxref{pooltype invocation,,, web2c, Web2c}) -@code{MFPOOL}, @code{TEXMFINI}. +@code{MFPOOL}, @code{TEXMFINI}; +suffix @samp{.pool}. -@item .mp +@item mft +@flindex .mft +@vindex MFTINPUTS +(@code{MFT} style file, @pxref{mft invocation,,, web2c, Web2c}) +@code{MFTINPUTS}; +suffix @samp{.mft}. + +@item mp @flindex .mp @vindex MPINPUTS (MetaPost source, @pxref{mpost invocation,,, web2c, Web2c}) -@code{MPINPUTS}. +@code{MPINPUTS}; +suffix @samp{.mp}. -@item mp.pool +@item mppool @flindex .pool @vindex MPPOOL (MetaPost program strings, @pxref{pooltype invocation,,, web2c, Web2c}) -@code{MPPOOL}, @code{TEXMFINI}. +@code{MPPOOL}, @code{TEXMFINI}; +suffix @samp{.pool}. -@item @r{(none)} -@vindex MPSUPPORT -(MetaPost support files, used by DMP; @pxref{dmp invocation,,, web2c, Web2c}) -@code{MPSUPPORT}. - -@item .ocp +@item ocp @flindex .ocp @vindex OCPINPUTS (Omega compiled process files) @code{OCPINPUTS}; @* +suffix @samp{.ocp}; dynamic creation program: @code{MakeOmegaOCP}. -@item .ofm +@item ofm @flindex .ofm @vindex OFMFONTS (Omega font metrics) @code{OFMFONTS}, @code{TEXFONTS}; @* +suffixes @samp{.ofm}, @samp{.tfm}; dynamic creation program: @code{MakeOmegaOFM}. -@item .opl +@item opl @flindex .opl (Omega property lists) -@code{OPLFONTS}, @code{TEXFONTS}. +@code{OPLFONTS}, @code{TEXFONTS}; +suffix @samp{.opl}. -@item .otp +@item otp @flindex .otp @vindex OTPINPUTS (Omega translation process files) -@code{OTPINPUTS}. +@code{OTPINPUTS}; +suffix @samp{.otp}. -@item .ovf +@item ovf @flindex .ovf @vindex OVFFONTS (Omega virtual fonts) -@code{OVFFONTS}, @code{TEXFONTS}. +@code{OVFFONTS}, @code{TEXFONTS}; +suffix @samp{.ovf}. -@item .ovp +@item ovp @flindex .ovp @vindex OVPFONTS (Omega virtual property lists) -@code{OVPFONTS}, @code{TEXFONTS}. - -@item .eps -@flindex .eps -@flindex .epsi -@vindex TEXPICTS -@vindex TEXINPUTS -(Encapsulated PostScript figures, @pxref{PostScript figures,,, dvips, Dvips}) -@code{TEXPICTS}, @code{TEXINPUTS}; -additional suffixes: @samp{.epsi}. +@code{OVPFONTS}, @code{TEXFONTS}; +suffix @samp{.ovp}. @item pk @flindex .pk @@ -1430,63 +1497,67 @@ (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}; -dynamic creation program: @code{MakeTeXPK}. +suffix @samp{pk}; +dynamic creation program: @code{mktexpk}. -@item .pro +@item PostScript header @flindex .pro @vindex TEXPSHEADERS @vindex PSHEADERS (downloadable PostScript, @pxref{Header files,,, dvips, Dvips}) -@code{TEXPSHEADERS}, @code{PSHEADERS}. +@code{TEXPSHEADERS}, @code{PSHEADERS}; +additional suffix @samp{.pro}. -@item .tex +@item tex @flindex .tex -@flindex .ltx -@flindex .dtx -@flindex .texi -@flindex .texinfo -@flindex .txi -@flindex .eps -@flindex .epsi @vindex TEXINPUTS (@TeX{} source, @pxref{tex invocation,,, web2c, Web2c}) @code{TEXINPUTS}; -additional suffixes: @samp{.ltx} @samp{.dtx} @samp{.texi} @samp{.texinfo} -@samp{.txi} @samp{.eps} @samp{.epsi}; -dynamic creation program: @code{MakeTeXTeX}. +suffix @samp{.tex}; +additional suffixes: none, because such a list cannot be complete; +dynamic creation program: @code{mktextex}. -@item @r{(none)} +@item TeX system documentation @flindex doc files @vindex TEXDOCS (Documentation files for the @TeX{} system) @code{TEXDOCS}. -@item tex.pool -@flindex .pool -@vindex TEXPOOL -(@TeX{} program strings, @pxref{pooltype invocation,,, web2c, Web2c}) -@code{TEXPOOL}, @code{TEXMFINI}. - -@item @r{(none)} +@item TeX system sources @flindex source files @vindex TEXSOURCES (Source files for the @TeX{} system) @code{TEXSOURCES}. -@item .tfm +@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}; -dynamic creation program: @code{MakeTeXTFM}. +suffix @samp{.tfm}; +dynamic creation program: @code{mktextfm}. -@item @r{(none)} +@item Troff fonts @vindex TRFONTS (Troff fonts, used by DMP; @pxref{DMP invocation,,, web2c, Web2c}) @code{TRFONTS}. -@item .pfa +@item truetype fonts +@flindex .ttf +@flindex .ttc +@vindex TTFONTS +(TrueType outline fonts) @code{TTFONTS}; suffixes @samp{.ttf}, +@samp{.ttc}. + +@item type1 fonts @flindex .pfa @flindex .pfb @vindex T1FONTS @@ -1494,22 +1565,38 @@ @vindex TEXPSHEADERS @vindex DVIPSHEADERS (Type 1 PostScript outline fonts, @pxref{Glyph files,,, dvips, Dvips}) -@code{T1FONTS}, @code{T1INPUTS}, @code{TEXPSHEADERS}, @code{DVIPSHEADERS}; additional suffix: -@samp{.pfb}. +@code{T1FONTS}, @code{T1INPUTS}, @code{TEXPSHEADERS}, @code{DVIPSHEADERS}; +suffixes @samp{.pfa}, @samp{.pfb}. -@item .vf +@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}. +@code{VFFONTS}, @code{TEXFONTS}; +suffix @samp{.vf}. +@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. -@item @r{(none)} -@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}. +@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 @@ -1551,29 +1638,23 @@ Here is the search strategy for a file @var{name}: @enumerate @item -If @var{name} has a suffix, search for exactly @var{name} along the -appropriate path. Example: given @samp{foo.sty}, look for -@samp{foo.sty} before @samp{foo.sty.tex}, even though it's a @TeX{} -input file. +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. We postpone searching the disk as long as +possible. Example: given @samp{foo.sty}, look for @samp{foo.sty.tex} +before @samp{foo.sty}. This is unfortunate, but allows us to find +@samp{foo.bar.tex} before @samp{foo.bar} if both exist and we were given +@samp{foo.bar}. @item -If the file format defines a default suffix, and the suffix of -@var{name} is not already that default, try appending the default. -Example: given @samp{foo.bar}, search for @samp{foo.bar.tex}. But if -given @samp{foo.tex}, don't bother to search for @samp{foo.tex.tex}. - -@item -If we're searching for a TFM, PK, or GF file, look for aliases of -@var{name} in @file{texfonts.map} files (@pxref{Fontmap}). Example: -given @samp{Times-Roman}, find @samp{ptmr}. +Search for @var{name}, and if necssary for alternative names found in +the fontmaps. Again we avoid searching the disk if possible. Example: +given @samp{foo}, we look for @samp{foo}. @item If the file format defines a program to invoke to create missing files, -run it (@pxref{MakeTeX scripts}). - -@item -Search for @var{name} itself, if we haven't done so already. Example: -given @samp{foo}, search for @samp{foo}. +run it (@pxref{mktex scripts}). @end enumerate @flindex tex-file.c @@ -1606,8 +1687,8 @@ @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{MakeTeXPK}) to -generate the font (@pxref{MakeTeX scripts}) +@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}). @@ -1819,6 +1900,7 @@ @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 @@ -1878,15 +1960,19 @@ @enumerate @item -@findex kpse_set_progname +@findex kpse_set_program_name @vindex argv[0] -Call @code{kpse_set_progname} with @code{argv[0]}; This is the only -initialization that is mandatory to take full advantage of -Kpathsea---specifically, for the @code{.@var{program}} feature of config -files (@pxref{Config files}). +Call @code{kpse_set_program_name} with @code{argv[0]} as the first +argument; the second argument is a string or @code{NULL}. The second +argument is used by Kpathsea as the program name for the +@code{.@var{program}} feature of config files (@pxref{Config files}). +If the second argument is @code{NULL}, the value of the first argument +is used. This function must be called before any other use of the +Kpathsea library. @vindex program_invocation_name @vindex program_invocation_short_name +@vindex kpse_program_name @vindex KPATHSEA_DEBUG @cindex SELFAUTOLOC @cindex SELFAUTODIR @@ -1894,18 +1980,29 @@ @cindex error message macros @cindex symlinks, resolving @cindex expanding symlinks -If necessary, @code{kpse_set_progname} sets the global variables +If necessary, @code{kpse_set_program_name} sets the global variables @code{program_invocation_name} and @code{program_invocation_short_name}. These variables are used in the error message macros defined in -@file{kpathsea/lib.h}. It also initializes debugging options based on -the environment variable @code{KPATHSEA_DEBUG} (if that is set). -Finally, it sets the 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, -specifically from a mounted CD-ROM. (You can use -@samp{--expand-var=\$SELFAUTOLOC}, etc., to see the values finds.) +@file{kpathsea/lib.h}. It sets the global variable +@code{kpse_program_name} to the program name it uses. It also +initializes debugging options based on the environment variable +@code{KPATHSEA_DEBUG} (if that is set). Finally, it sets the 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, specifically from a mounted CD-ROM. (You can +use @samp{--expand-var=\$SELFAUTOLOC}, etc., to see the values finds.) + +@item +@findex kpse_set_progname +@vindex argv[0] +The @code{kpse_set_progname} is deprecated. A call to +@code{kpse_set_progname} with @code{argv[0]} is equivalent to a call of +@code{kpse_set_program_name} with first argument @code{argv[0]} and +second argument @code{NULL}. The function is deprecated because it +cannot ensure that the @code{.@var{program}} feature of config files +will always work (@pxref{Config files}). @item @vindex kpathsea_debug @r{variable} @@ -1941,6 +2038,7 @@ @item @findex kpse_find_* +@findex kpse_find_file The routine to actually find a file of type @var{format} is @code{kpse_find_@var{format}}, defined in @file{tex-file.h}. These are macros that expand to a call to @file{kpse_find_file}. You can call, @@ -1990,6 +2088,29 @@ @url{ftp://prep.ai.mit.edu/pub/gnu/}. +@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 special formats, @samp{kpse_program_text_format} and +@samp{kpse_program_binary_format} exist, which 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{kpse_open_file} will open the files it finds in text or binary +mode. + + @node Programming with config files @section Programming with config files @@ -2000,7 +2121,7 @@ configuration file that Kpathsea uses for your program. This helps installers by keeping all configuration in one place. -@findex kpse_var_expand +@findex kpse_var_value @flindex variable.h @vindex shell_escape@r{, example for code} To retrieve a value @var{var} from config files, the best way is to call
new file mode 100644 --- /dev/null +++ b/kpathsea/kpathsea.version @@ -0,0 +1,3 @@ +# Version information for Klibtool. +# MAJOR MINOR DELTA +kpathsea 3 2 0
new file mode 100644 --- /dev/null +++ b/kpathsea/kpsestat.c @@ -0,0 +1,129 @@ +/* kpsestat -- show file permissions of a file in octal form. + Copyright (C) 1997 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include <kpathsea/config.h> +#include <kpathsea/c-stat.h> +#include <stdio.h> +#include <stdlib.h> + +#ifdef WIN32 +#include <string.h> +#endif + +/* + * kpsestat mode x + * Print stat bits of file x on stdout, as modified by mode. + */ + +int main (argc, argv) + 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@mail.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 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); + } + + 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) { + perror(argv[0]); + return 1; + } + + result = f.st_mode & ~S_IFMT; + result |= to_set; + result |= to_keep & result; + result &= ~to_clear; + + printf("%o\n", result); + + return 0; +}
new file mode 100644 --- /dev/null +++ b/kpathsea/kpsestat.man @@ -0,0 +1,56 @@ +.TH KPSESTAT 1 "4 January 1998" "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 +.I = +as the mode to obtain the unchanged permissions. +.\"===================================================================== +.SH OPTIONS +.B kpsestat +accepts the following additional options: +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH BUGS +The error message when the file doesn't exist is rather cryptic. +.\"===================================================================== +.SH "SEE ALSO" +.BR chmod (1).
--- a/kpathsea/kpsewhich.c +++ b/kpathsea/kpsewhich.c @@ -28,6 +28,7 @@ #include <kpathsea/tex-file.h> #include <kpathsea/tex-glyph.h> #include <kpathsea/variable.h> +#include <kpathsea/progname.h> /* Base resolution. (-D, -dpi) */ @@ -36,9 +37,9 @@ /* For variable and path expansion. (-expand-var, -expand-path, -show-path, -separator) */ string var_to_expand = NULL; +string braces_to_expand = NULL; string path_to_expand = NULL; string path_to_show = NULL; -const_string path_sep = ENV_SEP_STRING; /* The file type and path for lookups. (-format, -path) */ kpse_file_format_type user_format = kpse_last_format; @@ -74,14 +75,16 @@ } /* Use the file type from -format if that was specified, else guess - dynamically from NAME. Return kpse_last_format if undeterminable. */ + dynamically from NAME. Return kpse_last_format if undeterminable. + This function is also used to parse the -format string, a case which + we distinguish by setting is_filename to false. */ static kpse_file_format_type -find_format P1C(string, name) +find_format P2C(string, name, boolean, is_filename) { kpse_file_format_type ret; - if (user_format != kpse_last_format) { + if (is_filename && user_format != kpse_last_format) { ret = user_format; } else if (FILESTRCASEEQ (name, "psfonts.map")) { ret = kpse_dvips_config_format; @@ -99,19 +102,26 @@ for (f = 0; !found && f < kpse_last_format; f++) { unsigned try_len; - const_string *alt; + const_string *ext; const_string try; if (!kpse_format_info[f].type) kpse_init_format (f); - try = kpse_format_info[f].suffix; - found = TRY_SUFFIX (try); - for (alt = kpse_format_info[f].alt_suffix; !found && alt && *alt; alt++){ - found = TRY_SUFFIX (*alt); + if (!is_filename) { + /* Allow the long name, but only in the -format option. We don't + want a filename confused with a format name. */ + try = kpse_format_info[f].type; + found = TRY_SUFFIX (try); + } + 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 there was a match, f will be one past the correct value. */ ret = f < kpse_last_format ? f - 1 : kpse_last_format; } @@ -132,7 +142,7 @@ } else { /* No user-specified search path, check user format or guess from NAME. */ - kpse_file_format_type fmt = find_format (name); + kpse_file_format_type fmt = find_format (name, true); switch (fmt) { case kpse_pk_format: @@ -146,7 +156,7 @@ break; case kpse_last_format: - WARNING1 ("kpsewhich: Can't guess file type of %s, using tex", name); + /* If the suffix isn't recognized, assume it's a tex file. */ fmt = kpse_tex_format; /* fall through */ @@ -161,80 +171,27 @@ return ret == NULL; } -/* Perform variable and path expansion on PATHVAR. This is useful for - building paths for other programs. Path components sent to standard - output. Returns `./' for the empty string. This does disk searching - and may result in lots and lots of output. */ - -static void -path_expand P1C(const_string, pathvar) -{ - string path; - string pathelt; - boolean first = true; - - /* Do variable expansion, too. */ - path = kpse_path_expand (pathvar); - - /* Now expand each of the path elements, printing the results */ - for (pathelt = kpse_path_element (path); pathelt; - pathelt = kpse_path_element (NULL)) { - str_llist_type *dirs; - - /* Skip and ignore magic leading chars. */ - if (*pathelt == '!' && *(pathelt + 1) == '!') - pathelt += 2; - - /* Search the disk for all dirs in the component specified. - Be faster to check the database, but this is more reliable. */ - dirs = kpse_element_dirs (pathelt); - if (dirs && *dirs) { - str_llist_elt_type *dir; - - if (!first) { - fputs (path_sep, stdout); - } - first = false; - - for (dir = *dirs; dir; ) { - string thedir = STR_LLIST (*dir); - unsigned len = strlen (thedir); - if (len > 1) { - /* Discard trailing slash if that's not the entire element. */ - thedir[len - 1] = 0; - } - fputs (thedir, stdout); - dir = STR_LLIST_NEXT (*dir); - if (dir) - fputs (path_sep, stdout); - } - } - } - - if (!first) - putchar ('\n'); -} - /* Reading the options. */ #define USAGE "\ Standalone path lookup and expansion for Kpathsea.\n\ \n\ --debug=NUM set debugging flags.\n\ --D, -dpi=NUM use a base resolution of NUM; default 600.\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 (see list below).\n\ --help print this message and exit.\n\ --interactive ask for additional filenames to look up.\n\ -[-no]-maketex=FMT disable/enable MakeTeXFMT 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\ --separator=STRING STRING separates components in -path output; default :.\n\ --show-path=NAME output search path for file type NAME (see list below).\n\ --version print version number and exit.\n\ +-debug=NUM set debugging flags.\n\ +-D, -dpi=NUM use a base resolution of NUM; default 600.\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 (see list below).\n\ +-help print this message and exit.\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;\n\ + 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\ +-show-path=NAME output search path for file type NAME (see list below).\n\ +-version print version number and exit.\n\ " /* Test whether getopt found an option ``A''. @@ -247,16 +204,17 @@ = { { "D", 1, 0, 0 }, { "debug", 1, 0, 0 }, { "dpi", 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 }, { "interactive", 0, (int *) &interactive, 1 }, - { "maketex", 1, 0, 0 }, + { "mktex", 1, 0, 0 }, { "mode", 1, 0, 0 }, { "must-exist", 0, (int *) &must_exist, 1 }, { "path", 1, 0, 0 }, - { "no-maketex", 1, 0, 0 }, + { "no-mktex", 1, 0, 0 }, { "progname", 1, 0, 0 }, { "separator", 1, 0, 0 }, { "show-path", 1, 0, 0 }, @@ -286,6 +244,9 @@ } else if (ARGUMENT_IS ("dpi") || ARGUMENT_IS ("D")) { dpi = atoi (optarg); + } else if (ARGUMENT_IS ("expand-braces")) { + braces_to_expand = optarg; + } else if (ARGUMENT_IS ("expand-path")) { path_to_expand = optarg; @@ -303,38 +264,35 @@ fputs (USAGE, stdout); putchar ('\n'); fputs (kpse_bug_address, stdout); - + /* Have to set this for init_format to work. */ - if (!program_invocation_short_name) { - kpse_set_progname (progname ? progname : argv[0]); - } + kpse_set_program_name (argv[0], progname); - fputs ("\nRecognized file suffixes/format names, and their", stdout); - puts (" integer equivalents:"); + puts ("\nRecognized format names and their suffixes:"); for (f = 0; f < kpse_last_format; f++) { - const_string *alt; + const_string *ext; kpse_init_format (f); - if (kpse_format_info[f].suffix) { - printf ("%s(%d)", kpse_format_info[f].suffix, f); - } else { - printf ("%s (%d)", kpse_format_info[f].type, f); + printf ("%s:", kpse_format_info[f].type); + for (ext = kpse_format_info[f].suffix; ext && *ext; ext++) { + putchar (' '); + fputs (*ext, stdout); } - for (alt = kpse_format_info[f].alt_suffix; alt && *alt; alt++) { + for (ext = kpse_format_info[f].alt_suffix; ext && *ext; ext++) { putchar (' '); - fputs (*alt, stdout); + fputs (*ext, stdout); } putchar ('\n'); } exit (0); - } else if (ARGUMENT_IS ("maketex")) { + } else if (ARGUMENT_IS ("mktex")) { kpse_maketex_option (optarg, true); } else if (ARGUMENT_IS ("mode")) { mode = optarg; - } else if (ARGUMENT_IS ("no-maketex")) { + } else if (ARGUMENT_IS ("no-mktex")) { kpse_maketex_option (optarg, false); } else if (ARGUMENT_IS ("path")) { @@ -343,9 +301,6 @@ } else if (ARGUMENT_IS ("progname")) { progname = optarg; - } else if (ARGUMENT_IS ("separator")) { - path_sep = optarg; - } else if (ARGUMENT_IS ("show-path")) { path_to_show = optarg; user_format_string = optarg; @@ -370,7 +325,8 @@ exit (1); } - if (optind == argc && !var_to_expand && !path_to_expand && !path_to_show) { + if (optind == argc && !var_to_expand && !braces_to_expand + && !path_to_expand && !path_to_show) { fputs ("Missing argument. Try `kpsewhich --help' for more information.\n", stderr); exit (1); @@ -384,27 +340,25 @@ read_command_line (argc, argv); - if (!progname) - progname = argv[0]; - kpse_set_progname (progname); + kpse_set_program_name (argv[0], progname); /* NULL for no fallback font. */ - kpse_init_prog (uppercasify (progname), dpi, mode, NULL); + kpse_init_prog (uppercasify (kpse_program_name), dpi, mode, NULL); /* Have to do this after setting the program name. */ - if (user_format_string) { - /* Support both a number and a name. */ - user_format = ISDIGIT (*user_format_string) ? atoi (user_format_string) - : find_format (user_format_string); - } + if (user_format_string) + user_format = find_format (user_format_string, false); /* Variable expansion. */ if (var_to_expand) puts (kpse_var_expand (var_to_expand)); + if (braces_to_expand) + puts (kpse_brace_expand (braces_to_expand)); + /* Path expansion. */ if (path_to_expand) - path_expand (path_to_expand); + puts (kpse_path_expand (path_to_expand)); /* Show a search path. */ if (path_to_show) { @@ -430,5 +384,5 @@ } } - exit (unfound > 255 ? 1 : unfound); + return unfound > 255 ? 1 : unfound; }
new file mode 100644 --- /dev/null +++ b/kpathsea/kpsewhich.man @@ -0,0 +1,145 @@ +.TH KPSEWHICH 1 "4 January 1998" "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. +.\"===================================================================== +.SH OPTIONS +.B kpsewhich +accepts the following options: +.TP +.BI --debug \ num +.rb +Set debugging flags. +.TP +.BI -D \ num +.rb +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 --expand-braces \ string +.rb +Print variable and brace expansion of +.IR string . +.TP +.BI --expand-path \ string +.rb +Print complete path expansion of +.IR string . +.TP +.BI --expand-var \ string +.rb +Print variable expansion of +.BR string . +.TP +.BI --format \ name +.rb +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 +.rb +Print help message and exit. +.TP +.B --interactive +.rb +Ask for additional filenames to look up. +.TP +.BI --mktex \ fmt +.rb +enable +.RI mktex fmt +generation. +.RI ( fmt =pk/mf/tex/tfm) +.TP +.BI --mode \ string +.rb +Set device name for +.I $MAKETEX_MODE +to +.IR string ; +no default. +.TP +.B --must-exist +.rb +Search the disk as well as ls-R if necessary. +.TP +.BI --no-mktex \ fmt +.rb +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 +.rb +Set program name to +.IR string . +.TP +.B --separator \ string +.rb +.I string +separates components in +.B --path +output; default is +.I : +on UNIX systems. +.TP +.BI --show-path \ name +.rb +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 +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH "SEE ALSO" +.BR mktexlsr (1), +.BR mktexmf (1), +.BR mktexpk (1), +.BR mktextfm (1).
--- a/kpathsea/lib.h +++ b/kpathsea/lib.h @@ -67,14 +67,17 @@ /* I find this easier to read. */ #define STREQ(s1, s2) (strcmp (s1, s2) == 0) - +#define STRNEQ(s1, s2, n) (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) (strcasecmp (s1, s2) == 0) +#define FILESTRNCASEEQ(s1, s2, l) (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
--- a/kpathsea/line.c +++ b/kpathsea/line.c @@ -16,19 +16,8 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Don't include config.h or all our other usual includes, since - it's useful to just throw this file into other programs. */ - -#include <stdio.h> -#ifdef WIN32 -#include <malloc.h> -#else -extern void free (); -#endif - -/* From xmalloc.c and xrealloc.c. This saves having to include config.h. */ -extern void *xmalloc (), *xrealloc (); - +#include <kpathsea/config.h> +#include <kpathsea/line.h> /* Allocate in increments of this size. */ #define BLOCK_SIZE 75 @@ -42,7 +31,7 @@ unsigned loc = 0; char *line = xmalloc (limit); - while ((c = getc (f)) != EOF && c != '\n') + while ((c = getc (f)) != EOF && c != '\n' && c != '\r') { line[loc] = c; loc++; @@ -64,6 +53,12 @@ /* Terminate the string. We can't represent nulls in the file, either. Again, it doesn't matter. */ line[loc] = 0; + /* Absorb LF of a CRLF pair. */ + if (c == '\r') { + c = getc (f); + if (c != '\n') + ungetc (c, f); + } } else /* At end of file. */ {
new file mode 100644 --- /dev/null +++ b/kpathsea/mktex.cnf @@ -0,0 +1,15 @@ +# The mktex.cnf file, if it exists, can be used to tailor a setup to +# local conditions. If you use the mktex scripts, this file can contain +# generic bourne shell code. However, the C emulations of the scripts +# do not handle anything beyond simple assignment of variables, and doing +# more is not exactly recommended. +# +# To assign variables, use constructs like the examples below, which only +# set unassigned variables. The scripts may malfunction if you do +# otherwise. +# +# Some examples of what you can the mktex.cnf file for: +# : ${MT_FEATURES=appendonlydir:varfonts} +# : ${MODE=ljfour} +# : ${BDPI=600} +# : ${ps_to_pk=gsftopk}
new file mode 100755 --- /dev/null +++ b/kpathsea/mktex.opt @@ -0,0 +1,109 @@ +#!/bin/sh +# mktex.opt -- common mktex* options, etc. +# Meant to be sourced after $usage and $version and $TEXMF have been set. +# +# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. +# $Id: mktex.opt,v 1.23 1998/03/17 18:35:26 olaf Exp $ + +if test "x$1" = x--help || test "x$1" = x-help; then + echo "$usage" + exit 0 +elif test "x$1" = x--version || test "x$1" = x-version; then + echo "`basename $0` $version" + kpsewhich --version + exit 0 +elif test $# -lt ${mt_min_args-1}; then + echo "$0: Missing argument(s)." >&2 + echo "Try \``basename $0` --help' for more information." >&2 + exit 1 +elif test $# -gt ${mt_max_args-1}; then + num=$# + while test $# -gt `expr $num - ${mt_max_args-1}`; do shift; done + echo "$0: Extra arguments $*." >&2 + echo "Try \``basename $0` --help' for more information." >&2 + exit 1 +fi + +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. +# Create a variable that holds the right character to be used by the scripts. +if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi + +# TEMPDIR needs to be unique to each process because of the possibility of two +# people running dvips (or whatever) simultaneously. +TEMPDIR="${TMPDIR-/tmp}/mt$$.tmp" + +# We want to output only filenames to standard output, but it's too +# error-prone to write the scripts that way, so we direct stdout here. +STDOUT="$TEMPDIR/mt$$.out" + +# We will change search paths to include $KPSE_DOT. This is necessary +# since we cd to $TEMPDIR. +: ${KPSE_DOT=`pwd`}; export KPSE_DOT + +# Clean up on normal or abnormal exit. +# The "cd /" is for MS-DOS and MS-Windows, where there is a separate +# current directory on each drive, and therefore "cd $KPSE_DOT" might +# still leave $TMPDIR current directory on its drive, in which case it +# cannot be removed. +trap 'cd /; cd "$KPSE_DOT"; test -f "$STDOUT" && cat "$STDOUT"; rm -rf "$TEMPDIR"; exit 0' \ + 0 1 2 15 + +mkdir "$TEMPDIR" || exit 1 +cd "$TEMPDIR" || exit 1 + +# The alternative location for fonts. The directory need not exist, +# so we use --expand-var here. We also perform a sanity check. +: ${MT_VARTEXFONTS=`kpsewhich --expand-var='$VARTEXFONTS' | sed 's%^!!%%'`} +if test -z "$MT_VARTEXFONTS"; then + echo "$0: VARTEXFONTS is not defined. Defaulting to \`$KPSE_DOT'." >&2 + MT_VARTEXFONTS='$KPSE_DOT' +fi + +# The supporting scripts: +: ${MT_MKTEXNAM=`kpsewhich --format='web2c files' mktexnam`} +test -n "$MT_MKTEXNAM" || MT_MKTEXNAM="$MT_TEXMFMAIN/web2c/mktexnam" +: ${MT_MKTEXNAM_OPT=`kpsewhich --format='web2c files' mktexnam.opt`} +test -n "$MT_MKTEXNAM_OPT" || MT_MKTEXNAM_OPT="$MT_TEXMFMAIN/web2c/mktexnam.opt" +: ${MT_MKTEXDIR=`kpsewhich --format='web2c files' mktexdir`} +test -n "$MT_MKTEXDIR" || MT_MKTEXDIR="$MT_TEXMFMAIN/web2c/mktexdir" +: ${MT_MKTEXDIR_OPT=`kpsewhich --format='web2c files' mktexdir.opt`} +test -n "$MT_MKTEXDIR_OPT" || MT_MKTEXDIR_OPT="$MT_TEXMFMAIN/web2c/mktexdir.opt" +: ${MT_MKTEXUPD=`kpsewhich --format='web2c files' mktexupd`} +test -n "$MT_MKTEXUPD" || MT_MKTEXUPD="$MT_TEXMFMAIN/web2c/mktexupd" + +# mktexupd and mktexlsr make sure they're coordinated via this. A copy of +# the first string is found in mktexlsr. +ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' +# Old ls-R files should continue to work. +old_ls_R_magic='% ls-R -- maintained by MakeTeXls-R; do not change this line.' + +# Read defaults from mktex.cnf if that file exists. Can be used to +# overwrite anything defined below. Please use the same syntax as +# given here (e.g. ``: ${MODE=ljfour}'', not just ``MODE=ljfour'', as +# this can cause trouble (e.g. when the mode for mktexnam is +# already specified on the command line). +: ${MT_MKTEX_CNF=`kpsewhich --format='web2c files' mktex.cnf`} +test -n "$MT_MKTEX_CNF" && test -r "$MT_MKTEX_CNF" && . "$MT_MKTEX_CNF" + +# Possible features: appendonlydir dosnames fontmaps nomode stripsupplier +# striptypeface varfonts. +if test -n "$COMSPEC"; then + : ${MT_FEATURES=appendonlydir:dosnames} +else + : ${MT_FEATURES=appendonlydir} +fi +: ${MODE=ljfour} +: ${BDPI=600} +: ${ps_to_pk=gsftopk} # some prefer ps2pk + +# Allow fonts to be read and written (especially in case we make +# directories) by everyone. +umask 0 + +# Cache values that may be useful for recursive calls. +export MT_MKTEX_OPT MT_MKTEX_CNF +export MT_MKTEXNAM MT_MKTEXNAM_OPT +export MT_MKTEXDIR MT_MKTEXDIR_OPT +export MT_MKTEXUPD +export MT_TEXMFMAIN MT_VARTEXFONTS
new file mode 100755 --- /dev/null +++ b/kpathsea/mktexdir @@ -0,0 +1,49 @@ +#!/bin/sh +# mkinstalldirs --- make directory hierarchy (now mktexdir). +# Author: Noah Friedman <friedman@prep.ai.mit.edu>, created: 1993-05-16. +# Public domain. +# +# Modified for sticky directory creation, --help, --version. +# te@informatik.uni-hannover.de and kb@mail.tug.org. + +version='$Id: mktexdir,v 1.10 1998/03/16 23:15:36 olaf Exp $' +usage="Usage: $0 DIRS... + Create each DIR, including any missing leading directories." + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$0: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +test -n "$MT_MKTEXDIR_OPT" && . "$MT_MKTEXDIR_OPT" + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp="./$pathcomp" ;; + esac + + if test ! -d "$pathcomp"; then + mkdir "$pathcomp" || errstatus=$? + chmod `kpsestat ${MT_APPEND_MASK:-=} "$pathcomp"/..` "$pathcomp" + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus
new file mode 100644 --- /dev/null +++ b/kpathsea/mktexdir.opt @@ -0,0 +1,11 @@ +#!/bin/sh +# mktexdir.opt to determine various manipulations of the filenames. +# Sourced from mktexdir. +# +# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. +# $Id: mktexdir.opt,v 1.2 1997/11/30 12:29:46 olaf Exp $ + +# Set append-only bit on created directories. +case "$MT_FEATURES" in + *appendonlydir*) MT_APPEND_MASK=+t;; +esac
new file mode 100755 --- /dev/null +++ b/kpathsea/mktexlsr @@ -0,0 +1,113 @@ +#!/bin/sh +# original mktexlsr -- create or rebuild ls-R. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# Suitable for calling from cron, as in: +# 0 * * * * cd /your/texmf/root && /usr/local/bin/mktexlsr +# unless the scripts live in a different directory than the 'access', +# 'kpsestat', 'readlink', and 'kpsewhich' binaries. +# +# Originally written as `texhash' by Thomas Esser +# <te@informatik.uni-hannover.de>, Okt., 1994. +# Public domain. + +version='$Id: mktexlsr,v 1.21 1998/03/17 22:26:01 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname [DIRS ...] + +Rebuild all necessary ls-R filename databases completely. If one or +more arguments DIRS are given, these are used as texmf directories to +build ls-R for. Else all directories in the search path for ls-R files +(\$TEXMFDBS) are used." + +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. +# Create a variable that holds the right character to be used by the scripts. +if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi + +# Add the location of the script to the PATH if necessary. This must +# be done before kpsewhich can be called, and thus cannot be put into +# mktex.opt. +dirname=`echo $0 | sed 's%/*[^/][^/]*$%%'` +case $dirname in + "") # Do nothing + ;; + /* | [A-z]:/*) # Absolute name + PATH="$dirname$SEP$PATH" ;; + *) # Relative name + PATH="`pwd`/$dirname$SEP$PATH" ;; +esac + +# A copy of some stuff from mktex.opt, so we can run in the presence of +# terminally damaged ls-R files. +if test "x$1" = x--help || test "x$1" = x-help; then + echo "$usage" + exit 0 +elif test "x$1" = x--version || test "x$1" = x-version; then + echo "`basename $0` $version" + kpsewhich --version + exit 0 +fi + +# mktexupd and mktexlsr make sure they're coordinated via this. A copy +# is found mktex.opt. +ls_R_magic='% ls-R -- filename database for kpathsea; do not change this line.' + + +trap 'cd / ; rm -f "$db_file_tmp"; exit' 1 2 15 + +test $# = 0 && { + OIFS=$IFS; IFS=$SEP; set x `kpsewhich --show-path=ls-R`; shift; IFS=$OIFS +} +for TEXMFLS_R in "$@"; do + # Prepend cwd if the directory was relative. + case "$TEXMFLS_R" in + "") continue ;; + /* | [A-z]:/*) ;; + *) TEXMFLS_R="`pwd`/$TEXMFLS_R" + esac + # Follow a possible symlink to get the right filesystem, + db_file=`readlink "$TEXMFLS_R/ls-R" 2>/dev/null` + case "$db_file" in + "") db_file="$TEXMFLS_R/ls-R" ;; + /* | [A-z]:/*) ;; + *) db_file="$TEXMFLS_R/$db_file" + esac + db_dir=`echo "$db_file" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname + db_file_tmp="$db_dir/lsR$$.tmp" + + test -d "$db_dir" || continue + test -w "$db_dir" || { echo "$progname: $db_dir: directory not writable. Skipping..." >&2; continue; } + + if test ! -f "$db_file"; then + cp /dev/null "$db_file" + # Use same permissions as parent directory, minus x,s, or t bits. + chmod `kpsestat -xst "$db_dir"` "$db_file" + fi + + # Skip if we cannot write the file: + access -w "$db_file" || { echo "$progname: $db_file: no write permission. Skipping..." >&2; continue; } + + rm -f "$db_file_tmp" + + tty -s && echo "$progname: Updating $db_file... " + echo "$ls_R_magic" >"$db_file_tmp" + + # The main task. We ls two things so the top-level directory name ends + # up in the output, so top-level files can be found via ls-R. Probably + # irrelevant in practice. + # The sed command is because on new FreeBSD/NetBSD systems, ls -LAR ./ + # produces .//. Sigh. + (cd "$TEXMFLS_R" && \ls -LRa /dev/null ./ 2>/dev/null) | + sed 's%\.//%./%; /^\.$/d; /^\.\.$/d' >>"$db_file_tmp" + + # To be really safe, a loop. + until PERMS=`kpsestat = "$db_file"`; do sleep 1; done + chmod $PERMS "$db_file_tmp" + rm -f "$db_file" + mv "$db_file_tmp" "$db_file" +done +tty -s && echo "$progname: Done." +exit 0
new file mode 100644 --- /dev/null +++ b/kpathsea/mktexlsr.man @@ -0,0 +1,46 @@ +.TH MKTEXLSR 1 "4 January 1998" "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 +mktexlsr \- create ls-R databases +.SH SYNOPSIS +.B mktexlsr +.RI [ directories ] +.\"===================================================================== +.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 mktexlsr +is used to generate the ls-R databases used by the kpathsea library. +It will create them for the specified directories, or for a default +list if no directories are specified. +.\"===================================================================== +.SH OPTIONS +.B mktexlsr +accepts the following options: +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit.
new file mode 100755 --- /dev/null +++ b/kpathsea/mktexmf @@ -0,0 +1,119 @@ +#!/bin/sh +# original mktexmf -- make a new MF file, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# te@informatik.uni-hannover.de, kb@mail.tug.org, and infovore@xs4all.nl. +# Public domain. + +version='$Id: mktexmf,v 1.13 1998/02/20 16:26:17 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname FONT. + +Makes the Metafont source file for FONT, if possible. For example, +\`ecr12' or \`cmr11'." + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +( +# See comments in mktexpk. +name="`echo $1 | sed 's%.*/%%; s%\.mf$%%'`" +rootname=`echo "$name" | sed 's/[0-9]*$//'` +pointsize=`echo "$name" | sed "s/^$rootname//"` + +sauterroot=`kpsewhich b-$rootname.mf 2>/dev/null` +if test -n "$sauterroot"; then + rootfile=$sauterroot +else + case $rootname in + wn*) + lhname=`echo $name | sed 's/^wn/lh/'` + rootfile=`kpsewhich $lhname.mf 2>/dev/null`;; + *) + rootfile=`kpsewhich $rootname.mf 2>/dev/null`;; + esac +fi +{ test -z "$rootfile" || test ! -f "$rootfile"; } && exit 1 + +#if test -z "$MT_MFNAME"; then +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $name`; shift +IFS=$OIFS +MT_MFNAME="$3" +#fi + +destdir=`echo "$MT_MFNAME" | sed 's%/[^/][^/]*$%%'` +test -d "$destdir" || "$MT_MKTEXDIR" "$destdir" || exit 1 +cd "$destdir" >/dev/null 2>&1 || exit 1 + +case "$pointsize" in + "") echo "$progname: no pointsize."; exit 1;; + 11) realsize=10.95444;; # \magstephalf + 14) realsize=14.4;; # \magstep2 + 17) realsize=17.28;; # \magstep3 + 20) realsize=20.74;; # \magstep4 + 25) realsize=24.88;; # \magstep5 + # 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 ignoring the + # last two digits. + ????|?????) realsize=`echo "$pointsize" | sed 's/\(..\)$/.\1/'`;; + *) realsize="$pointsize";; +esac + +mfname="$name.mf" +if test -r "$mfname"; then + echo "$progname: $destdir/$mfname already exists." + echo "$destdir/$mfname" >$STDOUT + "$MT_MKTEXUPD" "$destdir" "$mfname" + exit 0 +fi + +case "$name" in + ec*|tc*) + cat > "mf$$.tmp" <<END +if unknown exbase: input exbase fi; +gensize:=$realsize; +generate $rootname; +END + ;; + dc*) + cat > "mf$$.tmp" <<END +if unknown dxbase: input dxbase fi; +gensize:=$realsize; +generate $rootname; +END + ;; + wn*) + cat > "mf$$.tmp" <<END +wncoding:=1; +input $lhname; +END + ;; + *) + cat > "mf$$.tmp" <<END +design_size := $realsize; +input b-$rootname; +END + ;; +esac + +chmod `kpsestat -xst,go-w .` "mf$$.tmp" +rm -f "$mfname" +mv "mf$$.tmp" "$mfname" + +echo "$destdir/$mfname" >$STDOUT +echo "$progname: $destdir/$mfname: successfully generated." >&2 +"$MT_MKTEXUPD" "$destdir" "$mfname" +exit 0 +) 1>&2 </dev/null
new file mode 100644 --- /dev/null +++ b/kpathsea/mktexmf.man @@ -0,0 +1,59 @@ +.TH MKTEXMF 1 "4 January 1998" "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 +mktexmf \- create a Metafont source file +.SH SYNOPSIS +.B mktexmf +.I font +.\"===================================================================== +.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 mktexmf +is used to generate the \*(MF source file for +.IR font , +if possible. For example, +.I ecrm1200 +or +.IR cmr11 . +.PP +The name of the generated file is printed on standard output. +.PP +.B mktexmf +is typically called by other programs, rather than from the command +line. +.\"===================================================================== +.SH OPTIONS +.B mktexmf +accepts the following options: +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH "SEE ALSO" +.BR mktexpk (1), +.BR mktextfm (1).
new file mode 100755 --- /dev/null +++ b/kpathsea/mktexnam @@ -0,0 +1,169 @@ +#!/bin/sh +# maketexnam -- find PK and TFM names. +# te@informatik.uni-hannover.de, kb@mail.tug.org, and infovore@xs4all.nl. +# Public domain. + +version='$Id: mktexnam,v 1.20 1998/03/16 18:25:12 olaf Exp $' +usage="Usage: $0 NAME [DPI MODE] [DESTDIR]. + Output the PK, TFM, and MF names for a font NAME." +mt_max_args=4 + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$0: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +NAME=$1 +case $# in +1|2) DPI=$BDPI; DEST=$2;; +3|4) DPI=$2; MODE=$3; DEST=$4;; +*) help;; +esac + +MT_PKDESTDIR='$MT_DESTROOT/$MT_PKDESTREL' +MT_TFMDESTDIR='$MT_DESTROOT/$MT_TFMDESTREL' +MT_MFDESTDIR='$MT_DESTROOT/$MT_MFDESTREL' +MT_PKMODEPART='$MT_PKPART/$MT_MODE' +MT_PKBASE='$NAME.${DPI}pk' +MT_TFMBASE='$NAME.tfm' +MT_MFBASE='$NAME.mf' +MT_DEFAULT_SUPPLIER=unknown +MT_DEFAULT_TYPEFACE=unknown +MT_DEFAULT_NAMEPART=tmp +MT_DEFAULT_PKDESTREL='' +MT_DEFAULT_TFMDESTREL='' +MT_DEFAULT_MFDESTREL='' +MT_DEFAULT_DESTROOT='$KPSE_DOT' + +# Find the font: test tfm first, then mf, then possible sauterized mf. +fullname=`kpsewhich "$NAME.tfm" 2>/dev/null` +test -z "$fullname" && fullname=`kpsewhich "$NAME.mf" 2>/dev/null` +if test -z "$fullname"; then + rootname=`echo $NAME | sed 's/[0-9]*$//'` + fullname=`kpsewhich "b-$rootname.mf" 2>/dev/null` + # Fonts starting with wn* get special treatment: + if test -z "$fullname"; then + case $rootname in + wn*) lhname=`echo $NAME | sed 's/^wn/lh/'` + fullname=`kpsewhich "$lhname.mf" 2>/dev/null`;; + *) fullname=`kpsewhich "$rootname.mf" 2>/dev/null` + esac + fi +fi + +# After all this, do we _have_ a font? +if test -z "$fullname"; then + # We have found nothing, so force using the fontmaps as a last resort. + # This also means mktexnam can be queried for advice on where to + # place fonts. + MT_FEATURES="$MT_FEATURES:fontmaps" + MT_DESTROOT="$MT_VARTEXFONTS" +else + # Normalize $fullname. + fullname=`echo "$fullname" | sed 's%//*%/%g'` + # See if $fullname comes from a standard location. + OIFS=$IFS;IFS=$SEP + for i in `kpsewhich --expand-path='$TEXMF/fonts'"$SEP$MT_VARTEXFONTS"` + do + case "$fullname" in + $i/*) + # We now have a preliminary value for the destination root. + MT_DESTROOT="$i" + # When we're done, relfmt contains one of these: + # "/source/$MT_NAMEPART/" + # "/$MT_NAMEPART/source/" + # while namepart contains the actual namepart. + relfmt=`echo "$fullname" | \ + sed -e 's%^'"$i"'\(/.*/\)[^/]*$%\1%' \ + -e 's%^/tfm/%/source/%' \ + -e 's%/tfm/$%/source/%'` + namepart=`echo "$relfmt" | sed -e 's%/source/%/%'` + # See if namepart is empty. + if test "$namepart" != "/"; then + relfmt=`echo "$relfmt" | \ + sed -e 's%'"$namepart"'%/$MT_NAMEPART/%'` + else + # Assume TDS. + relfmt='/source/$MT_NAMEPART/' + namepart='' + fi + # Determine supplier and typeface from namepart. If there is + # only one part in the namepart, we take it to be the typeface. + MT_SUPPLIER=`echo $namepart | sed 's%^/\([^/]*\)/\(.*\)$%\1%'` + MT_TYPEFACE=`echo $namepart | sed 's%^/\([^/]*\)/\(.*\)$%\2%'` + if test -z "$MT_TYPEFACE"; then + MT_TYPEFACE="$MT_SUPPLIER"; + MT_SUPPLIER='' + fi + # Phew. Now we create the relative paths for pk, tfm and source. + MT_NAMEPART='$MT_SUPPLIER/$MT_TYPEFACE' + MT_PKDESTREL=`echo "$relfmt" | sed 's%/source/%/pk/$MT_MODE/%'` + MT_TFMDESTREL=`echo "$relfmt" | sed 's%/source/%/tfm/%'` + MT_MFDESTREL=`echo "$relfmt"` + # And we're done with the loop now. + break + esac + done + IFS=$OIFS +fi + +# In case some variables remain unset. +: ${MT_DESTROOT=$MT_DEFAULT_DESTROOT} +: ${MT_SUPPLIER=$MT_DEFAULT_SUPPLIER} +: ${MT_TYPEFACE=$MT_DEFAULT_TYPEFACE} +: ${MT_NAMEPART=$MT_DEFAULT_NAMEPART} +: ${MT_PKDESTREL=$MT_DEFAULT_PKDESTREL} +: ${MT_TFMDESTREL=$MT_DEFAULT_TFMDESTREL} +: ${MT_MFDESTREL=$MT_DEFAULT_MFDESTREL} + +# Handle the options. +test -n "$MT_MKTEXNAM_OPT" && . "$MT_MKTEXNAM_OPT" + +# Adjust MT_DESTROOT, if necessary. +if test "x$MT_DESTROOT" != "x$MT_DEFAULT_DESTROOT"; then + # Do we have write access and permission? + access -w "$MT_DESTROOT" || USE_ALTERNATE=1 + test -w "$MT_DESTROOT" || USE_ALTERNATE=1 + # We distinguish system trees from the rest. + systexmf="`kpsewhich --expand-path='{$SYSTEXMF}/fonts'`$SEP$MT_VARTEXFONTS" + case "$SEP$systexmf$SEP" in + *$SEP$MT_DESTROOT$SEP*) # A system tree, check for varfonts. + if test "x$USE_VARTEXFONTS" = x1 || test "x$USE_ALTERNATE" = x1; then + MT_DESTROOT=$MT_VARTEXFONTS + fi ;; + *) # A non-system tree. + test "x$USE_ALTERNATE" = x1 && MT_DESTROOT=$MT_DEFAULT_DESTROOT ;; + esac +fi + +case "$DEST" in + "") ;; + /* | [A-z]:/*) # Absolute, explicit destdir => use it. + MT_PKDESTDIR=$DEST + MT_TFMDESTDIR=$DEST + MT_MFDESTDIR=$DEST + MT_NAMEPART=;; + *) # Relative destdir => append to the default. + MT_NAMEPART=$DEST;; +esac + +eval MT_MODE=\"$MODE\" +eval MT_NAMEPART=\"$MT_NAMEPART\" +eval MT_DESTROOT=\"$MT_DESTROOT\" +eval MT_PKDESTREL=\"$MT_PKDESTREL\" +eval MT_TFMDESTREL=\"$MT_TFMDESTREL\" +eval MT_MFDESTREL=\"$MT_MFDESTREL\" +eval MT_PKDESTDIR=\"$MT_PKDESTDIR\" +eval MT_TFMDESTDIR=\"$MT_TFMDESTDIR\" +eval MT_MFDESTDIR=\"$MT_MFDESTDIR\" +eval MT_PKNAME=\"$MT_PKDESTDIR/$MT_PKBASE\" +eval MT_TFMNAME=\"$MT_TFMDESTDIR/$MT_TFMBASE\" +eval MT_MFNAME=\"$MT_MFDESTDIR/$MT_MFBASE\" + +echo "$MT_PKNAME$SEP$MT_TFMNAME$SEP$MT_MFNAME" | sed 's%//*%/%g'
new file mode 100644 --- /dev/null +++ b/kpathsea/mktexnam.opt @@ -0,0 +1,98 @@ +#!/bin/sh +# mktexnam.opt to determine various manipulations of the filenames. +# Sourced from mktexnam. +# +# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. +# $Id: mktexnam.opt,v 1.9 1998/02/24 12:16:55 olaf Exp $ + +# Get 8.3 filenames like dpiNNN/NAME.pk. +case "$MT_FEATURES" in + *dosnames*) MT_PKBASE='dpi$DPI/$NAME.pk';; +esac + +# Omit the mode directory (e.g., ljfour): +case "$MT_FEATURES" in + *nomode*) MODE="";; +esac + +########################################################################### +# Use this feature if you wish to use the alias files from the +# ftp://ftp.tug.org/tex/fontname.tar.gz distribution. +########################################################################### +case "$MT_FEATURES" in +*fontmaps*) + MT_NAMEPART='$MT_SUPPLIER/$MT_TYPEFACE' + MT_PKDESTREL='pk/$MT_MODE/$MT_NAMEPART' + MT_TFMDESTREL='tfm/$MT_NAMEPART' + MT_MFDESTREL='source/$MT_NAMEPART' + SPECIALMAP=`kpsewhich special.map` + TYPEFACEMAP=`kpsewhich typeface.map` + SUPPLIERMAP=`kpsewhich supplier.map` + if test -r "$SPECIALMAP"; then + set x `awk \ + '{if ($1 == NAME || (substr (NAME, 1, length ($1)) == $1 \ + && substr (NAME, length (NAME), 1) ~ /[0-9]/ \ + && substr ($1, length ($1), 1) ~ /[^0-9]/)) \ + { print $2 " " $3; exit; }}' NAME=$NAME "$SPECIALMAP"` + shift; SUPPLIER=$1; TYPEFACE=$2 + + if test -z "$SUPPLIER"; then + # Try the normal case. Source first. + s_abbrev=`echo $NAME | sed 's/^\(.\).*$/\1/'` + SUPPLIER=`awk '{ if ($1 == s_abbrev) { print $2; exit; }}' \ + s_abbrev=$s_abbrev "$SUPPLIERMAP"` + if test -n "$SUPPLIER"; then + # We found the source. Try for the typeface. + t_abbrev=`echo $NAME | sed 's/^.//;s/\(..\).*$/\1/'` + TYPEFACE=`awk '{ if ($1 == t_abbrev) { print $2; exit; }}' \ + t_abbrev=$t_abbrev "$TYPEFACEMAP"` + fi + fi + fi + + if test -z "$SUPPLIER"; then + echo "$0: Could not map source abbreviation $s_abbrev for $NAME." >&2 + echo "$0: Need to update $SPECIALMAP?" >&2 + MT_SUPPLIER="$MT_DEFAULT_SUPPLIER" + MT_TYPEFACE="$MT_DEFAULT_TYPEFACE" + else + MT_SUPPLIER="$SUPPLIER" + if test -z "$TYPEFACE"; then + echo "$0: Could not map typeface abbreviation $t_abbrev for $NAME." >&2 + echo "$0: Need to update $SPECIALMAP?" >&2 + MT_TYPEFACE="$MT_DEFAULT_TYPEFACE" + else + MT_TYPEFACE="$TYPEFACE" + fi + fi +esac + +########################################################################### +# Use this feature to strip the "supplier" part (e.g. ams) +# of the target name: +########################################################################### + +case "$MT_FEATURES" in +*stripsupplier*) + MT_SUPPLIER="" +esac + +########################################################################### +# Use this feature to strip the "typeface" part (e.g. euler) +# of the target name: +########################################################################### + +case "$MT_FEATURES" in +*striptypeface*) + MT_TYPEFACE="" +esac + +# Put new fonts into the directory named by the VARTEXFONTS environment +# variable or config file value. (A default value for VARTEXFONTS is +# already set in the default texmf.cnf, q.v.) +# +# A user can override this setting in either direction by setting +# USE_VARTEXFONTS to 1 or 0. +case "$MT_FEATURES" in + *varfonts*) test "$USE_VARTEXFONTS" != 0 && USE_VARTEXFONTS=1;; +esac
new file mode 100755 --- /dev/null +++ b/kpathsea/mktexpk @@ -0,0 +1,215 @@ +#!/bin/sh +# original mktexpk -- make a new PK font, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# te@informatik.uni-hannover.de, kb@mail.tug.org, and infovore@xs4all.nl. +# Public domain. + +version='$Id: mktexpk,v 1.21 1998/02/20 16:23:22 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname [OPTION] NAME [REDIRECT], + 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. + +Try to create a PK file for NAME at resolution DPI, with an assumed +device base resolution of BDPI, and a Metafont \`mag' of MAG. Use MODE +for the METAFONT mode. Use DESTDIR for the root of where to install +into, either the absolute directory name to use (if it starts with a +/) or relative to the default DESTDIR (if not). REDIRECT, if supplied, +is a string of the form '>&n', where n is the number of the file +descriptor which is to receive, instead of stdout, the name of the +newly created pk file." + +# Handle non-positional options, except for --version/--help +while test $# -gt 0; do + case "$1" in + --destdir) shift; DEST="$1"; shift ;; + --dpi) shift; DPI="$1"; shift ;; + --bdpi) shift; BDPI="$1"; shift ;; + --mfmode) shift; test "x$1" != "x/" && MODE="$1"; shift ;; + --mag) shift; MAG="$1"; shift;; + --version|-version) break ;; + --help|-help) break ;; + *) break ;; + esac +done + +if test "x$2" != x; then + tail="`echo \"x$2\" | sed 's/^x>&//' | grep '^[0-9]*$'`" + if test -z "$tail"; then + echo "$progname: argument '$2' ignored - bad file number" >&2 + elif test "$tail" != 1; then + eval 'exec 1>&$tail' + fi +fi + +mt_max_args=2 + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +# Since we want to pass the generated filename and only that filename +# back to the caller on standard output, we do some redirections so +# regular echo's will end up on stderr, and do an echo >$STDOUT at the end. +# Then the contents of $STDOUT will be echoed to stdout by a trap. + +# start of redirection stdout -> stderr, stdin <- /dev/null +( + +NAME=$1 + +# grep for the font in $PSMAPFILE. These are base font names, such as +# rpplr (the original) or pplr0 (an interim step) or pplr8r (current). +: ${PSMAPFILE=`kpsewhich psfonts.map`} +pattern="^$NAME"'([ ]|$)' +psline=`egrep "$pattern" $PSMAPFILE` +if test -n "$psline"; then + MODE=modeless + # ps_to_pk is set in mktex.opt + case $ps_to_pk in + ps2pk) + set x `echo "$psline" | sed 's%[<["]%%g'` + shift; shift; shift; + encoding=; psname=; slant=; extend= + while test ! -z "$1"; do + case "$1" in + *.enc) encoding="-e $1";; + *.pf[ab]) psname="$1";; + *SlantFont) slant="-S $lastopt";; + *ExtendFont) extend="-E $lastopt";; + esac + lastopt="$1" + shift + done + test -n "$psname" || + { pfa=`(kpsewhich $NAME.pfa 2>/dev/null)`; psname=$pfa; } + test -n "$psname" || + { pfb=`(kpsewhich $NAME.pfb 2>/dev/null)`; psname=$pfb; } + ANAME=`echo $NAME | sed 's/8r$/8a/'` + test -n "$psname" || + { pfa=`(kpsewhich $ANAME.pfa 2>/dev/null)`; psname=$pfa; } + test -n "$psname" || + { pfb=`(kpsewhich $ANAME.pfb 2>/dev/null)`; psname=$pfb; } + if [ -z "$psname" ]; then + echo "$progname: cannot find $NAME.pfa or $NAME.pfb. Trying gsftopk." >&2 + cmd="gsftopk $NAME $DPI" + else + cmd="ps2pk -v -X$DPI -R$BDPI $slant $extend $encoding $psname $NAME.${DPI}pk" + fi + ;; + *) + cmd="$ps_to_pk $NAME $DPI" + ;; + esac +else + # Check that $BDPI and $MODE are consistent; if not, ignore the mode and + # hope we can correctly guess it from bdpi. (People like to specify the + # resolution on the command line, not the mode so much.) + if test -n "$MODE"; then + mf_bdpi=`mf \ +'\mode:='$MODE';mode_setup;message"BDPI= "&decimal round pixels_per_inch;end.'\ + </dev/null \ + | awk '/DPI=/ {print $2}'` + if test "x$mf_bdpi" != x$BDPI; then + echo "$progname: Mismatched mode $MODE and resolution $BDPI; ignoring mode." >&2 + MODE= + fi + fi + + # If an explicit mode is not supplied, try to guess. You can get a + # list of extant modes from ftp://ftp.tug.org/tex/modes.mf. + if test -z "$MODE" || test "x$MODE" = xdefault; then + case "$BDPI" in + 85) MODE=sun;; + 100) MODE=nextscrn;; + 180) MODE=toshiba;; + 300) MODE=cx;; + 400) MODE=nexthi;; + 600) MODE=ljfour;; + 1270) MODE=linoone;; + *) echo "$progname: Can't guess mode for $BDPI dpi devices." >&2 + echo "$progname: Use a config file, or update me." >&2 + exit 1 + esac + fi + + # Run Metafont. Always use plain Metafont, since reading cmbase.mf + # does not noticeably slow things down. + cmd="mf \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" +fi + +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift +IFS=$OIFS + +PKDEST="$1" +PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname +PKNAME=`basename "$PKDEST"` +GFNAME=$NAME.${DPI}gf + +if test -r "$PKDESTDIR/$PKNAME"; then + echo "$progname: $PKDESTDIR/$PKNAME already exists." >&2 + echo "$PKDESTDIR/$PKNAME" >$STDOUT + "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + exit 0 +fi + +"$MT_MKTEXDIR" "$PKDESTDIR" +if test ! -d "$PKDESTDIR"; then + echo "$progname: mktexdir $PKDESTDIR failed." >&2 + exit 1 +fi + +echo "$progname: Running $cmd" +$cmd </dev/null || { + # Don't abort if only "Strange path" errors occurr. + grep '^!' $NAME.log >$$.errs 2>/dev/null + grep '^! Strange path' $$.errs >$$.strange 2>/dev/null + if cmp $$.errs $$.strange >/dev/null 2>&1 \ + && test -s $$.strange >/dev/null 2>&1; then + echo "$progname: warning: \`$cmd' caused strange path errors." >&2 + else + echo "$progname: \`$cmd' failed." >&2 + test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" + exit 1; + fi +} + +test -r $GFNAME && { gftopk ./$GFNAME $PKNAME || exit 1; } +test ! -f $PKNAME && test -f $NAME.${DPI}pk && mv $NAME.${DPI}pk $PKNAME +if test ! -s $PKNAME; then + echo "$progname: \`$cmd' failed to make $PKNAME." >&2 + exit 1 +fi + +# Install the PK file carefully, since others may be working simultaneously. +# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. +mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ + || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 +cd $PKDESTDIR || exit 1 +chmod `kpsestat -xst,go-w .` pk$$.tmp +test -r $PKNAME || mv pk$$.tmp $PKNAME || exit 1 + +# Update ls-R if necessary. +"$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + +# If this line (or an equivalent) is not present, dvipsk/xdvik/dviljk +# will think mktexpk failed. Any other output to stdout will also lose. +echo "$PKDESTDIR/$PKNAME" >$STDOUT +echo "$progname: $PKDESTDIR/$PKNAME: successfully generated." >&2 +) 1>&2 </dev/null
new file mode 100644 --- /dev/null +++ b/kpathsea/mktexpk.man @@ -0,0 +1,122 @@ +.TH MKTEXPK 1 "4 January 1998" "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 +mktexpk \- create a PK file for a font +.SH SYNOPSIS +.B mktexpk +.RI [ options ] +.I font +.RI [ redirect ] +.\"===================================================================== +.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 mktexpk +is used to generate a +.I pk +file from the \*(MF source files or type1 sources for +.IR font , +if possible. +.PP +If +.I redirect +is given, it must be string of the form +.I >&n +where +.I n +is the number of the file descriptor which is to receive, instead of +standard output, the name of the generated file. +.PP +.B mktexpk +is typically called by other programs, rather than from the command +line. +.\"===================================================================== +.SH OPTIONS +.B mktexpk +accepts the following options: +.TP +.BI --bdpi \ num +Set the base device resolution. +.rb +.TP +.BI --dpi \ num +Generate the font at resolution +.IR num . +.rb +.TP +.B --help +.rb +Print help message and exit. +.TP +.BI --mag \ mag +The \*(MF magnification that corresponds to the combination of +.I bdpi +and +.I dpi +that has been specified. +.rb +.TP +.BI --mfmode \ mode +The \*(MF mode to use. +.rb +.TP +.BI --destdir \ dir +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. +.rb +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH BUGS +If the +.I mode +is not specified, +.B mktexpk +tries to determine it from +.IR bdpi . +The manner in which this is done is primitive. Since +.I bpdi +doesn't provide sufficient information to uniquely determine a +.I mode +it is strongly recommended that it be specified explicitly. +.PP +If the +.I mode +and +.I bpdi +don't match, the +.I mode +is discarded. +.PP +The +.I dpi +parameter is redundant, but is not checked for consistency. Worse, +the program will fail if the wrong +.I dpi +is specified. +.\"===================================================================== +.SH "SEE ALSO" +.BR mktexmf (1), +.BR mktextfm (1).
new file mode 100755 --- /dev/null +++ b/kpathsea/mktextfm @@ -0,0 +1,121 @@ +#!/bin/sh +# original mktextfm -- make a new TFM file, because one wasn't found. +# +# (If you change or delete the word `original' on the previous line, +# installation won't write this script over yours.) +# +# te@informatik.uni-hannover.de, kb@mail.tug.org, and infovore@xs4all.nl. +# Public domain. + +version='$Id: mktextfm,v 1.17 1998/02/16 08:56:13 olaf Exp $' +progname=`echo $0 | sed 's%.*/%%'` +usage="Usage: $progname [--destdir DESTDIR] FONT. + +Makes a TFM file for FONT, if possible. Use DESTDIR for the root of where +to install into, either the absolute directory name to use (if it starts +with a /) or relative to the default DESTDIR (if not)." + +# Handle non-positional options, except for --version/--help +while test $# -gt 0; do + case "$1" in + --destdir) shift; DEST="$1"; shift ;; + --version|-version) break ;; + --help|-help) break ;; + *) break ;; + esac +done + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$progname: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +# start of redirection stdout -> stderr, stdin <- /dev/null +( + +NAME=`basename "$1" .tfm` +MAG=1 +#DEST="$2" +DPI=$BDPI + +OIFS=$IFS; IFS=$SEP +set x `"$MT_MKTEXNAM" $NAME $DPI $MODE $DEST`; shift +IFS=$OIFS + +PKDEST="$1" +TFMDEST="$2" +PKDESTDIR=`echo "$PKDEST" | sed 's%/[^/][^/]*$%%'` # can't rely on dirname +TFMDESTDIR=`echo "$TFMDEST" | sed 's%/[^/][^/]*$%%'` +PKNAME=`basename "$PKDEST"` +TFMNAME=$NAME.tfm +GFNAME=$NAME.$DPI'gf' + +if test -r "$TFMDESTDIR/$TFMNAME"; then + echo "$progname: $TFMDESTDIR/$TFMNAME already exists." >&2 + echo "$TFMDESTDIR/$TFMNAME" >$STDOUT + "$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME + exit +fi + +# Try to create the destdir first. Do not create fonts, if this fails. +"$MT_MKTEXDIR" "$TFMDESTDIR" +if test ! -d "$TFMDESTDIR"; then + echo "$progname: mktexdir $TFMDESTDIR failed." + exit 1 +fi + +cmd="mf \mode:=$MODE; mag:=$MAG; nonstopmode; input $NAME" +echo "$progname: Running $cmd" + +$cmd </dev/null || { + grep '^!' $NAME.log >$$.errs 2>/dev/null + grep '^! Strange path' $$.errs >$$.strange 2>/dev/null + if cmp $$.errs $$.strange >/dev/null 2>&1 \ + && test -s $$.strange >/dev/null 2>&1; then + echo "$progname: warning: \`$cmd' caused strange path errors." >&2 + else + echo "$progname: \`$cmd' failed." >&2 + test -s $NAME.log && mv -f $NAME.log "$KPSE_DOT" + exit 1; + fi +} + +test -r $TFMNAME || { echo "$progname: \`$cmd' failed to make $TFMNAME."; exit 1; } + +# Install the TFM file carefully, since others may be working simultaneously. +# Use cp when mv fails, since DOS will fail mv for deeply-nested directories. +mv $TFMNAME "$TFMDESTDIR/tfm$$.tmp" 2>/dev/null \ + || cp $TFMNAME "$TFMDESTDIR/tfm$$.tmp" || exit 1 +cd "$TFMDESTDIR" || exit 1 +chmod `kpsestat -xst,go-w .` tfm$$.tmp +test -r $TFMNAME || mv tfm$$.tmp $TFMNAME || exit 1 + +# OK, success with the TFM. +"$MT_MKTEXUPD" "$TFMDESTDIR" $TFMNAME +echo "$TFMDESTDIR/$TFMNAME" >$STDOUT +echo "$progname: $TFMDESTDIR/$TFMNAME: successfully generated." >&2 + +# Since we probably made a GF(->PK) file, too, may as well install it if +# it's needed. +cd $TEMPDIR +if test -r $GFNAME && test ! -f "$PKDESTDIR/$PKNAME"; then + gftopk ./$GFNAME $PKNAME || exit 1 + "$MT_MKTEXDIR" "$PKDESTDIR" + mv $PKNAME "$PKDESTDIR/pk$$.tmp" 2>/dev/null \ + || cp $PKNAME "$PKDESTDIR/pk$$.tmp" || exit 1 + cd "$PKDESTDIR" || exit 1 + if test -f $PKNAME; then + rm -f pk$$.tmp + else + chmod `kpsestat -xst,go-w .` pk$$.tmp + mv pk$$.tmp $PKNAME + "$MT_MKTEXUPD" "$PKDESTDIR" $PKNAME + fi +fi +) 1>&2 </dev/null
new file mode 100644 --- /dev/null +++ b/kpathsea/mktextfm.man @@ -0,0 +1,68 @@ +.TH MKTEXTFM 1 "4 January 1998" "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 +mktextfm \- create a TFM file for a font +.SH SYNOPSIS +.B mktextfm +.RI [--destdir destdir ] +.I font +.\"===================================================================== +.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 mktextfm +is used to generate a +.I tfm +file from the \*(MF source files for +.IR font , +if possible. If +.I destdir +is given, the generated file will be installed there, otherwise a +(rather complicated) heuristic is used. +.PP +The name of the generated file is printed on standard output. +.PP +.B mktextfm +is typically called by other programs, rather than from the command +line. +.\"===================================================================== +.SH OPTIONS +.B mktextfm +accepts the following options: +.TP +.BI --destdir \ dir +.rb +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. +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH "SEE ALSO" +.BR mktexmf (1), +.BR mktexpk (1).
new file mode 100755 --- /dev/null +++ b/kpathsea/mktexupd @@ -0,0 +1,53 @@ +#!/bin/sh +# mktexupd -- update ls-R with a new entry. +# +# te@informatik.uni-hannover.de and kb@mail.tug.org. Public domain. + +version='$Id: mktexupd,v 1.13 1998/02/20 16:22:58 olaf Exp $' +usage="Usage: $0 DIR FILE. + Update the ls-R file with an entry for FILE in DIR." +mt_min_args=2 +mt_max_args=2 + +# Common code for all scripts. +: ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`} +: ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`} +test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt" +if test ! -f "$MT_MKTEX_OPT"; then + echo "$0: Cannot find mktex.opt; check your installation." >&2 + exit 1 +fi + +. "$MT_MKTEX_OPT" + +dir=$1 +file=$2 +test -d "$dir" || { echo "$0: $dir not a directory." >&2; exit 1; } +test -f "$dir/$file" || { echo "$0: $dir/$file not a file." >&2; exit 1; } + +OIFS=$IFS; IFS=$SEP; set x `kpsewhich -show-path=ls-R`; shift; IFS=$OIFS +TEXMFLS_R= +for d in "$@"; do + case $dir in + ${d}*) TEXMFLS_R="$d"; break;; + esac +done +test -n "$TEXMFLS_R" || exit 0 +db_file="$TEXMFLS_R/ls-R" + +test -f "$db_file" || mktexlsr "$TEXMFLS_R" +test -w "$db_file" || { echo "$0: $db_file unwritable." >&2; exit 1; } + +test "x`sed 1q \"$db_file\"`" = "x$ls_R_magic" \ + || test "x`sed 1q \"$db_file\"`" = "x$old_ls_R_magic" \ + || { echo "$0: $db_file lacks magic string \`$ls_R_magic'." >&2; exit 1; } + +# Change `$TEXMFLS_R/' to `./'. +dir=`echo $dir | sed "s%^$TEXMFLS_R/%./%g"` + +# May as well always put in a new directory entry; presumably cron will +# come along soon enough and clean things up. +echo "$dir:" >>"$db_file" +echo "$file" >>"$db_file" + +exit 0
--- a/kpathsea/path-elt.c +++ b/kpathsea/path-elt.c @@ -44,10 +44,11 @@ { const_string p; string ret; + int brace_level; + unsigned len; if (passed_path) path = passed_path; - /* Check if called with NULL, and no previous path (perhaps we reached the end). */ else if (!path) @@ -57,36 +58,34 @@ assert (path); p = path; - /* Find the next colon (or the end of the path). */ - while (*p != 0 && (env_p ? !IS_ENV_SEP (*p) : !IS_DIR_SEP (*p))) - p++; - - /* If there were no separators, return the whole thing this time, and - return NULL next time. */ - if (*p == 0) - { - ret = (string) path; - path = NULL; - } - - /* Otherwise, return the substring starting at `path'. */ - else + /* Find the next colon not enclosed by braces (or the end of the path). */ + brace_level = 0; + while (*p != 0 && !(brace_level == 0 + && (env_p ? IS_ENV_SEP (*p) : IS_DIR_SEP (*p)))) { + if (*p == '{') ++brace_level; + else if (*p == '}') --brace_level; + ++p; + } + + /* Return the substring starting at `path'. */ + len = p - path; + + /* Make sure we have enough space (including the null byte). */ + if (len + 1 > elt_alloc) { - unsigned len = p - path; - - /* Make sure we have enough space (including the null byte). */ - if (len + 1 > elt_alloc) - { - elt_alloc = len + 1; - elt = xrealloc (elt, elt_alloc); - } + elt_alloc = len + 1; + elt = xrealloc (elt, elt_alloc); + } - strncpy (elt, path, len); - elt[len] = 0; - ret = elt; - - path += len + 1; - } + strncpy (elt, path, len); + elt[len] = 0; + ret = elt; + + /* If we are at the end, return NULL next time. */ + if (path[len] == 0) + path = NULL; + else + path += len + 1; return ret; } @@ -127,11 +126,11 @@ print_path_elements (NULL); /* */ print_path_elements (""); /* "" */ print_path_elements ("a"); /* a */ - print_path_elements (":"); /* "", "" */ - print_path_elements ("::"); /* "", "", "" */ - print_path_elements ("a:"); /* a, "" */ - print_path_elements (":b"); /* "", b */ - print_path_elements ("a:b"); /* a, b */ + 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; }
--- a/kpathsea/pathsearch.c +++ b/kpathsea/pathsearch.c @@ -30,6 +30,10 @@ #include <time.h> /* for `time' */ +#ifdef __DJGPP__ +#include <sys/stat.h> /* for stat bits */ +#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 @@ -51,9 +55,9 @@ static boolean first_time = true; /* Need to open the log file? */ if (first_time) { + /* Get name from either envvar or config file. */ string log_name = kpse_var_value ("TEXMFLOG"); first_time = false; - /* Get name from either envvar or config file. */ if (log_name) { log_file = fopen (log_name, FOPEN_A_MODE); if (!log_file) @@ -264,13 +268,38 @@ 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_progname' 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. */ - string name = kpse_expand (original_name); + name = kpse_expand (original_name); /* If the first name is absolute or explicitly relative, no need to consider PATH at all. */ - boolean absolute_p = kpse_absolute_p (name, true); + absolute_p = kpse_absolute_p (name, true); if (KPSE_DEBUG_P (KPSE_DEBUG_SEARCH)) DEBUGF4 ("start search(file=%s, must_exist=%d, find_all=%d, path=%s).\n", @@ -299,7 +328,12 @@ if (KPSE_DEBUG_P (KPSE_DEBUG_SEARCH)) putc ('\n', stderr); } - + +#ifdef __DJGPP__ + /* Undo any side effects. */ + _djstat_flags = save_djgpp_flags; +#endif + return STR_LIST (ret_list); } @@ -309,8 +343,17 @@ kpse_path_search P3C(const_string, path, const_string, name, boolean, must_exist) { - string *ret_list = search (path, name, must_exist, false); - return *ret_list; + static string *ret_list = 0; + + if (ret_list) + { + free (ret_list); + ret_list = 0; /* Don't let an interrupt in search() cause trouble */ + } + + ret_list = search (path, name, must_exist, false); + + return *ret_list; /* Freeing this is caller's responsibility */ } @@ -355,12 +398,13 @@ /* All lists end with NULL. */ test_path_search (".", "nonexistent"); test_path_search (".", "/nonexistent"); - test_path_search ("/k:.", "kpathsea.texi"); - test_path_search ("/k:.", "/etc/fstab"); - test_path_search (".:" TEXFONTS "//", "cmr10.tfm"); - test_path_search (".:" TEXFONTS "//", "logo10.tfm"); - test_path_search (TEXFONTS "//times:.::", "ptmr.vf"); - test_path_search (TEXFONTS "/adobe//:" + test_path_search ("/k" ENV_SEP_STRING ".", "kpathsea.texi"); + 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 "/adobe//" ENV_SEP_STRING "/usr/local/src/TeX+MF/typefaces//", "plcr.pfa"); test_path_search ("~karl", ".bashrc"); @@ -369,10 +413,10 @@ xputenv ("NONEXIST", "nonexistent"); test_path_search (".", "$NONEXISTENT"); xputenv ("KPATHSEA", "kpathsea"); - test_path_search ("/k:.", "$KPATHSEA.texi"); - test_path_search ("/k:.", "${KPATHSEA}.texi"); - test_path_search ("$KPATHSEA:.", "README"); - test_path_search (".:$KPATHSEA", "README"); + test_path_search ("/k" ENV_SEP_STRING ".", "$KPATHSEA.texi"); + test_path_search ("/k" ENV_SEP_STRING ".", "${KPATHSEA}.texi"); + test_path_search ("$KPATHSEA" ENV_SEP_STRING ".", "README"); + test_path_search ("." ENV_SEP_STRING "$KPATHSEA", "README"); return 0; }
--- a/kpathsea/proginit.c +++ b/kpathsea/proginit.c @@ -36,10 +36,10 @@ string size_var = concat (prefix, "SIZES"); /* Do both `pk_format' and `any_glyph_format' for the sake of xdvi; in - general, MakeTeXPK might apply to either, and the program will ask + general, mktexpk might apply to either, and the program will ask for the one it wants. */ - /* Might have a program-specific name for MakeTeXPK itself. */ + /* Might have a program-specific name for mktexpk itself. */ if (getenv (makepk_var)) { /* If we did, we want to enable the program, I think. */ kpse_set_program_enabled (kpse_pk_format, 1, kpse_src_env);
--- a/kpathsea/progname.c +++ b/kpathsea/progname.c @@ -21,6 +21,8 @@ #include <kpathsea/c-pathch.h> #include <kpathsea/c-stat.h> #include <kpathsea/pathsearch.h> +/* For kpse_reset_progname */ +#include <kpathsea/tex-file.h> #ifdef WIN32 #include <kpathsea/c-pathmx.h> @@ -47,9 +49,11 @@ #ifndef HAVE_PROGRAM_INVOCATION_NAME /* Don't redefine the variables if glibc already has. */ -string program_invocation_name; -string program_invocation_short_name; +string program_invocation_name = NULL; +string program_invocation_short_name = NULL; #endif +/* And the variable for the program we pretend to be. */ +string kpse_program_name = NULL; /* Return directory for NAME. This is "." if NAME contains no directory separators (should never happen for selfdir), else whatever precedes @@ -207,7 +211,7 @@ perror (s); return NULL; } - fclose (f); + if (f) fclose (f); } strcpy (post, s); @@ -376,8 +380,12 @@ self = xmalloc (BUFSIZ); lock = findpath (argv0); if (lock != ((BPTR) -1)) { - if (getpath (lock, self) == -1) + if (getpath (lock, self) == -1) { *self = '\0'; + } else { + strcat (self,DIR_SEP_STRING); + strcat (self,argv0); + } UnLock (lock); } CloseLibrary((struct Library *) DOSBase); @@ -399,7 +407,9 @@ `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)) { - self = name; + /* Do not stop at directories. */ + if (!S_ISDIR(s.st_mode)) + self = name; } } #endif /* not AMIGA */ @@ -418,10 +428,14 @@ #endif /* not WIN32 */ void -kpse_set_progname P1C(const_string, progname) +kpse_set_program_name P2C(const_string, argv0, const_string, progname) { string ext, sdir, sdir_parent, sdir_grandparent; string s = getenv ("KPATHSEA_DEBUG"); +#ifdef WIN32 + string debug_output = getenv("KPATHSEA_DEBUG_OUTPUT"); + int err, olderr; +#endif /* Set debugging stuff first, in case we end up doing debuggable stuff during this initialization. */ @@ -429,56 +443,119 @@ kpathsea_debug |= atoi (s); } -#ifdef WIN32 +#ifndef HAVE_PROGRAM_INVOCATION_NAME +#if defined(WIN32) + /* redirect stderr to debug_output. Easier to send logfiles. */ + if (debug_output) { + if ((err = _open(debug_output, _O_CREAT | _O_TRUNC | _O_RDWR, + _S_IREAD | _S_IWRITE)) == -1) { + WARNING1("Can't open %s for stderr redirection!\n", debug_output); + perror(debug_output); + } else if ((olderr = _dup(fileno(stderr))) == -1) { + WARNING("Can't dup() stderr!\n"); + close(err); + } else if (_dup2(err, fileno(stderr)) == -1) { + WARNING1("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 selfdir stuff useless for win32. */ - char path[PATH_MAX], *fp; - HANDLE hnd; - WIN32_FIND_DATA ffd; + { + char path[PATH_MAX], *fp; + HANDLE hnd; + WIN32_FIND_DATA ffd; - /* SearchPath() always give back an absolute directory */ - if (SearchPath(NULL, progname, ".exe", PATH_MAX, path, - &fp) == 0) - FATAL1("Can't determine where is the executable %s.\n", progname); - if ((hnd = FindFirstFile(path, &ffd)) == NULL) - FATAL1("The following path points to an invalid file : %s\n", path); - progname = ffd.cFileName; - /* slashify the dirname */ - assert(fp != NULL); - *fp = '\0'; - for (fp = path; fp && *fp; fp++) - if (IS_DIR_SEP(*fp)) *fp = DIR_SEP; - /* sdir will be the directory where the executable resides, ie: c:/TeX/bin */ - sdir = my_dirname(path); -#endif /* WIN32 */ - -#ifndef HAVE_PROGRAM_INVOCATION_NAME - program_invocation_name = xstrdup (progname); -#endif - - /* 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. Although it's theoretically wrong to make - `program_invocation_name' be anything but the real name, as a - practical matter it seems simpler to strip off the .exe here. Both - cnf.c and texmfmp.c (and who knows what else in the future) would - have to check for it otherwise. */ - ext = find_suffix (program_invocation_name); - if (ext && FILESTRCASEEQ (ext, "exe")) { - program_invocation_name = remove_suffix (program_invocation_name); + /* SearchPath() always gives back an absolute directory */ + if (SearchPath(NULL, argv0, ".exe", PATH_MAX, path, &fp) == 0) + FATAL1("Can't determine where the executable %s is.\n", argv0); + if ((hnd = FindFirstFile(path, &ffd)) == NULL) + FATAL1("The following path points to an invalid file : %s\n", path); + /* slashify the dirname */ + for (fp = path; fp && *fp; fp++) + if (IS_DIR_SEP(*fp)) *fp = DIR_SEP; + /* sdir will be the directory where the executable resides, ie: c:/TeX/bin */ + sdir = my_dirname(path); + program_invocation_name = xstrdup(ffd.cFileName); } -#ifndef HAVE_PROGRAM_INVOCATION_NAME - program_invocation_short_name = (string) basename (program_invocation_name); +#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; + + program_invocation_name = xstrdup (long_progname); + } + else + /* If `_truename' failed, God help them, because we won't... */ + program_invocation_name = xstrdup (argv0); + } + else + program_invocation_name = xstrdup (argv0); + +#else /* !WIN32 && !__DJGPP__ */ + + program_invocation_name = xstrdup (argv0); + #endif +#endif /* not HAVE_PROGRAM_INVOCATION_NAME */ - /* SELFAUTODIR is actually the parent of the invocation directory, - and SELFAUTOPARENT the grandparent. This is how teTeX did it. */ + /* We need to find SELFAUTOLOC *before* removing the ".exe" suffix from + the program_name, otherwise the PATH search inside selfdir will fail, + since `prog' doesn't exists as a file, there's `prog.exe' instead. */ #ifndef WIN32 sdir = selfdir (program_invocation_name); #endif + /* SELFAUTODIR is actually the parent of the invocation directory, + and SELFAUTOPARENT the grandparent. This is how teTeX did it. */ xputenv ("SELFAUTOLOC", sdir); sdir_parent = my_dirname (sdir); xputenv ("SELFAUTODIR", sdir_parent); @@ -488,8 +565,36 @@ free (sdir); free (sdir_parent); free (sdir_grandparent); + +#ifndef PROGRAM_INVOCATION_NAME + program_invocation_short_name = (string)basename (program_invocation_name); +#endif + + 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 (program_invocation_short_name); + if (ext && FILESTRCASEEQ (ext, "exe")) { + kpse_program_name = remove_suffix (program_invocation_short_name); + } else { + kpse_program_name = xstrdup (program_invocation_short_name); + } + } } +/* This function is deprecated, because when we pretend to have a different + name it will look for _that_ name in the PATH if program_invocation_name + is not defined. */ +void +kpse_set_progname P1C(const_string, argv0) +{ + kpse_set_program_name (argv0, NULL); +} + #ifdef TEST void main (int argc, char **argv)
--- a/kpathsea/progname.h +++ b/kpathsea/progname.h @@ -24,11 +24,28 @@ extern DllImport string program_invocation_name; extern DllImport string program_invocation_short_name; +extern DllImport string kpse_program_name; +/* Set the first two variables above (if they're not predefined) to a copy + of ARGV0 and everything in ARGV0 after the last directory separator, + respectively. Set kpse_program_name to a copy of PROGNAME or the + or the value of program_invocation_short_name if PROGNAME is NULL. + This function also determines the AUTO* variables. */ + +extern void kpse_set_program_name P2H(const_string argv0, + const_string progname); -/* Set the two variables above (if they're not predefined) to a copy of +/* See also `kpse_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. */ + +/* DEPRECATED + Set first two variables above (if they're not predefined) to a copy of ARGV0 and everything in ARGV0 after the last directory separator, - respectively. */ + respectively. kpse_program_name is _always_ set to a copy of everything + in ARGV0 after the last directory separator. */ extern void kpse_set_progname P1H(const_string argv0);
--- a/kpathsea/readable.c +++ b/kpathsea/readable.c @@ -28,9 +28,18 @@ 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(fn, st) \ + (access (fn, R_OK) == 0 && access (fn, D_OK) == -1) +#elif WIN32 +#define READABLE(fn, st) \ + (GetFileAttributes(fn) != 0xFFFFFFFF && \ + !(GetFileAttributes(fn) & FILE_ATTRIBUTE_DIRECTORY)) +#else #define READABLE(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
new file mode 100644 --- /dev/null +++ b/kpathsea/readlink.c @@ -0,0 +1,78 @@ +/* readlink -- obtain contents of symlink. + Copyright (C) 1998 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#include <stdio.h> +#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 (argc, argv) + 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@mail.tug.org.\n", stdout); + exit(0); + } else if (argc > 1 && strcmp (argv[1], "--version") == 0) { + printf ("%s (%s)\n\ +Copyright (C) 1998 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 COPYING.\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 `access --help' for more information.\n", 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; +}
new file mode 100644 --- /dev/null +++ b/kpathsea/readlink.man @@ -0,0 +1,48 @@ +.TH READLINK 1 "4 January 1998" "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 +readlink \- print contents of symbolic link +.SH SYNOPSIS +.B readlink +.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 readlink +will always fail. +.\"===================================================================== +.SH OPTIONS +.B readlink +accepts the following additional options: +.TP +.B --help +.rb +Print help message and exit. +.TP +.B --version +.rb +Print version information and exit. +.\"===================================================================== +.SH "SEE ALSO" +.BR readlink (2)
deleted file mode 100644 --- a/kpathsea/stamp-auto +++ /dev/null @@ -1,1 +0,0 @@ -Sun Dec 15 15:40:18 EST 1996
--- a/kpathsea/stamp-auto.in +++ b/kpathsea/stamp-auto.in @@ -1,1 +1,1 @@ -Mon Feb 3 14:27:12 EST 1997 +Mon Mar 9 07:26:52 CET 1998
--- a/kpathsea/tex-file.c +++ b/kpathsea/tex-file.c @@ -19,8 +19,10 @@ #include <kpathsea/config.h> #include <kpathsea/c-fopen.h> +#include <kpathsea/c-pathch.h> #include <kpathsea/c-vararg.h> #include <kpathsea/cnf.h> +#include <kpathsea/concatn.h> #include <kpathsea/default.h> #include <kpathsea/expand.h> #include <kpathsea/fontmap.h> @@ -42,6 +44,7 @@ #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" #define BASE_ENVS "MFBASES", "TEXMFINI" #define BIB_ENVS "BIBINPUTS", "TEXBIB" @@ -69,12 +72,14 @@ #define TEXPOOL_ENVS "TEXPOOL", "TEXMFINI" #define TEXSOURCE_ENVS "TEXSOURCES" #define TEX_PS_HEADER_ENVS "TEXPSHEADERS", "PSHEADERS" -#define TFM_ENVS "TFMFONTS", "TEXFONTS" #define TROFF_FONT_ENVS "TRFONTS" #define TYPE1_ENVS "T1FONTS", "T1INPUTS", TEX_PS_HEADER_ENVS #define VF_ENVS "VFFONTS", "TEXFONTS" #define DVIPS_CONFIG_ENVS "TEXCONFIG" #define IST_ENVS "TEXINDEXSTYLE", "INDEXSTYLE" +#define TRUETYPE_ENVS "TTFONTS" +#define TYPE42_ENVS "T42FONTS" +#define WEB2C_ENVS "WEB2C" /* The compiled-in default list, DEFAULT_FONT_SIZES, is intended to be set from the command line (presumably via the Makefile). */ @@ -157,11 +162,15 @@ if (FILESTRCASEEQ (fmtname, "pk")) { fmt = kpse_pk_format; } else if (FILESTRCASEEQ (fmtname, "mf")) { - fmt = kpse_tex_format; + fmt = kpse_mf_format; } else if (FILESTRCASEEQ (fmtname, "tex")) { fmt = kpse_tex_format; } else if (FILESTRCASEEQ (fmtname, "tfm")) { - fmt = kpse_tex_format; + fmt = kpse_tfm_format; + } else if (FILESTRCASEEQ (fmtname, "ofm")) { + fmt = kpse_ofm_format; + } else if (FILESTRCASEEQ (fmtname, "ocp")) { + fmt = kpse_ocp_format; } kpse_set_program_enabled (fmt, value, kpse_src_cmdline); } @@ -204,7 +213,7 @@ /* Since sh doesn't like envvar names with `.', check PATH_prog rather than PATH.prog. */ if (!var) { - string evar = concat3 (env_name, "_", program_invocation_short_name); + string evar = concat3 (env_name, "_", kpse_program_name); string env_value = getenv (evar); if (env_value && *env_value) { var = evar; @@ -221,8 +230,7 @@ /* 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->suffix || !FILESTRCASEEQ (info->suffix, ".cnf"))) + if (!info->cnf_path && info != &kpse_format_info[kpse_cnf_format]) info->cnf_path = kpse_cnf_get (env_name); if (var && info->cnf_path) @@ -245,40 +253,38 @@ if (var) EXPAND_DEFAULT (getenv (var), concat (var, " environment variable")); EXPAND_DEFAULT (info->override_path, "application override variable"); - info->path = kpse_path_expand (info->path); + info->path = kpse_brace_expand (info->path); }} -/* Some file types have more than one suffix. (We don't actually need - the constant argument here, but ANSI requires it.) */ +/* Some file types have more than one suffix. */ static void -add_alt_suffixes PVAR1C(kpse_format_info_type *, info, ap) +add_suffixes PVAR1C(const_string **, list, ap) { const_string s; unsigned count = 0; while ((s = va_arg (ap, string)) != NULL) { count++; - XRETALLOC (info->alt_suffix, count + 1, const_string); - info->alt_suffix[count - 1] = s; + XRETALLOC (*list, count + 1, const_string); + (*list)[count - 1] = s; } va_end (ap); - info->alt_suffix[count] = NULL; + (*list)[count] = NULL; }} /* The path spec we are defining, one element of the global array. */ #define FMT_INFO kpse_format_info[format] - - -/* Call add_alt_suffixes. */ -#define ALT_SUFFIXES(args) add_alt_suffixes (&FMT_INFO, args, NULL) +/* Call add_suffixes. */ +#define SUFFIXES(args) add_suffixes(&FMT_INFO.suffix, args, NULL) +#define ALT_SUFFIXES(args) add_suffixes (&FMT_INFO.alt_suffix, 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(ext, default_path, envs) \ - FMT_INFO.suffix = FMT_INFO.type = ext; \ +#define INIT_FORMAT(text, default_path, envs) \ + FMT_INFO.type = text; \ init_path (&FMT_INFO, default_path, envs, NULL) @@ -293,9 +299,9 @@ const_string, args) { kpse_format_info_type *f = &kpse_format_info[fmt]; - const_string prog = f->program ? f->program : dflt_prog; /* MakeTeXPK */ - string PROG = uppercasify (prog); /* MAKETEXPK */ - string progval = kpse_var_value (PROG); /* ENV/cnf{"MAKETEXPK"} */ + const_string prog = f->program ? f->program : dflt_prog; /* mktexpk */ + string PROG = uppercasify (prog); /* MKTEXPK */ + string progval = kpse_var_value (PROG); /* ENV/cnf{"MKTEXPK"} */ /* Doesn't hurt to always set this info. */ f->program = prog; @@ -311,8 +317,27 @@ } /* We need this twice, so ... */ -#define MAKETEXPK_ARGS \ - "$KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE" +#define MKTEXPK_ARGS \ + "--mfmode $MAKETEX_MODE --bdpi $MAKETEX_BASE_DPI --mag $MAKETEX_MAG --dpi $KPATHSEA_DPI" + +static string +remove_dbonly P1C(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); +} /* Initialize everything for FORMAT. */ @@ -328,148 +353,213 @@ 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 (format, "MakeTeXPK", MAKETEXPK_ARGS); + init_maketex (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 (format, "MakeTeXPK", MAKETEXPK_ARGS); - INIT_FORMAT (NULL, DEFAULT_GLYPHFONTS, GLYPH_ENVS); - FMT_INFO.type = "bitmap font"; + init_maketex (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 (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); + INIT_FORMAT ("afm", DEFAULT_AFMFONTS, AFM_ENVS); + SUFFIXES (".afm"); break; case kpse_base_format: - INIT_FORMAT (".base", DEFAULT_MFBASES, BASE_ENVS); + 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); + INIT_FORMAT ("bib", DEFAULT_BIBINPUTS, BIB_ENVS); + SUFFIXES (".bib"); break; case kpse_bst_format: - INIT_FORMAT (".bst", DEFAULT_BSTINPUTS, BST_ENVS); + INIT_FORMAT ("bst", DEFAULT_BSTINPUTS, BST_ENVS); + SUFFIXES (".bst"); break; case kpse_cnf_format: - INIT_FORMAT (".cnf", DEFAULT_TEXMFCNF, CNF_ENVS); + INIT_FORMAT ("cnf", DEFAULT_TEXMFCNF, CNF_ENVS); + SUFFIXES (".cnf"); break; case kpse_db_format: INIT_FORMAT ("ls-R", DEFAULT_TEXMFDBS, DB_ENVS); + SUFFIXES ("ls-R"); + FMT_INFO.path = remove_dbonly (FMT_INFO.path); break; case kpse_fmt_format: - INIT_FORMAT (".fmt", DEFAULT_TEXFORMATS, FMT_ENVS); + INIT_FORMAT ("fmt", DEFAULT_TEXFORMATS, FMT_ENVS); + SUFFIXES (".fmt"); +#define FMT_SUFFIXES ".efmt", ".efm" + ALT_SUFFIXES (FMT_SUFFIXES); + FMT_INFO.binmode = true; break; case kpse_fontmap_format: - INIT_FORMAT (".map", DEFAULT_TEXFONTMAPS, FONTMAP_ENVS); + INIT_FORMAT ("map", DEFAULT_TEXFONTMAPS, FONTMAP_ENVS); + SUFFIXES (".map"); break; case kpse_mem_format: - INIT_FORMAT (".mem", DEFAULT_MPMEMS, MEM_ENVS); + INIT_FORMAT ("mem", DEFAULT_MPMEMS, MEM_ENVS); + SUFFIXES (".mem"); + FMT_INFO.binmode = true; break; case kpse_mf_format: - init_maketex (format, "MakeTeXMF", NULL); - INIT_FORMAT (".mf", DEFAULT_MFINPUTS, MF_ENVS); + init_maketex (format, "mktexmf", NULL); + INIT_FORMAT ("mf", DEFAULT_MFINPUTS, MF_ENVS); + SUFFIXES (".mf"); break; case kpse_mft_format: - INIT_FORMAT (".mft", DEFAULT_MFTINPUTS, MFT_ENVS); + INIT_FORMAT ("mft", DEFAULT_MFTINPUTS, MFT_ENVS); + SUFFIXES (".mft"); break; case kpse_mfpool_format: - INIT_FORMAT (".pool", DEFAULT_MFPOOL, MFPOOL_ENVS); + INIT_FORMAT ("mfpool", DEFAULT_MFPOOL, MFPOOL_ENVS); + SUFFIXES (".pool"); break; case kpse_mp_format: - INIT_FORMAT (".mp", DEFAULT_MPINPUTS, MP_ENVS); + INIT_FORMAT ("mp", DEFAULT_MPINPUTS, MP_ENVS); + SUFFIXES (".mp"); break; case kpse_mppool_format: - INIT_FORMAT (".pool", DEFAULT_MPPOOL, MPPOOL_ENVS); + INIT_FORMAT ("mppool", DEFAULT_MPPOOL, MPPOOL_ENVS); + SUFFIXES (".pool"); break; case kpse_mpsupport_format: - INIT_FORMAT (NULL, DEFAULT_MPSUPPORT, MPSUPPORT_ENVS); - FMT_INFO.type = "MetaPost support"; + INIT_FORMAT ("MetaPost support", DEFAULT_MPSUPPORT, MPSUPPORT_ENVS); break; case kpse_ocp_format: - init_maketex (format, "MakeOmegaOCP", NULL); - INIT_FORMAT (".ocp", DEFAULT_OCPINPUTS, OCP_ENVS); + init_maketex (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 (format, "MakeOmegaOFM", NULL); - INIT_FORMAT (".ofm", DEFAULT_OFMFONTS, OFM_ENVS); + init_maketex (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); + INIT_FORMAT ("opl", DEFAULT_OPLFONTS, OPL_ENVS); + SUFFIXES (".opl"); FMT_INFO.suffix_search_only = true; break; case kpse_otp_format: - INIT_FORMAT (".otp", DEFAULT_OTPINPUTS, OTP_ENVS); + 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); + INIT_FORMAT ("ovf", DEFAULT_OVFFONTS, OVF_ENVS); + SUFFIXES (".ovf"); FMT_INFO.suffix_search_only = true; + FMT_INFO.binmode = true; break; case kpse_ovp_format: - INIT_FORMAT (".ovp", DEFAULT_OVPFONTS, OVP_ENVS); + INIT_FORMAT ("ovp", DEFAULT_OVPFONTS, OVP_ENVS); + SUFFIXES (".ovp"); FMT_INFO.suffix_search_only = true; break; case kpse_pict_format: - INIT_FORMAT (NULL, DEFAULT_TEXINPUTS, PICT_ENVS); - FMT_INFO.type = "graphic/figure"; - /* It is conveniently coincidental that this comes before - kpse_tex_format, since if the user runs kpsewhich --format=eps, - they'll get kpse_pict_format instead of tex_format. */ + INIT_FORMAT ("graphic/figure", DEFAULT_TEXINPUTS, PICT_ENVS); #define PICT_SUFFIXES ".eps", ".epsi" ALT_SUFFIXES (PICT_SUFFIXES); + FMT_INFO.binmode = true; break; case kpse_tex_format: - init_maketex (format, "MakeTeXTeX", NULL); - INIT_FORMAT (".tex", DEFAULT_TEXINPUTS, TEX_ENVS); -/* If this list changes, also change tex.ch. */ -#define TEX_SUFFIXES ".ltx", ".dtx", ".texi", ".texinfo", ".txi", PICT_SUFFIXES - ALT_SUFFIXES (TEX_SUFFIXES); + init_maketex (format, "mktextex", NULL); + INIT_FORMAT ("tex", DEFAULT_TEXINPUTS, TEX_ENVS); + SUFFIXES (".tex"); + /* We don't maintain a list of alternate TeX suffixes. Such a list + could never be complete. */ break; case kpse_tex_ps_header_format: - INIT_FORMAT (NULL, DEFAULT_TEXPSHEADERS, TEX_PS_HEADER_ENVS); - FMT_INFO.type = "PostScript header/font"; - ALT_SUFFIXES (".pro"); + INIT_FORMAT ("PostScript header", DEFAULT_TEXPSHEADERS, + TEX_PS_HEADER_ENVS); +/* Unfortunately, dvipsk uses this format for type1 fonts. */ +#define TEXPSHEADER_SUFFIXES ".pro", ".enc" + ALT_SUFFIXES (TEXPSHEADER_SUFFIXES); + FMT_INFO.binmode = true; break; case kpse_texdoc_format: - INIT_FORMAT (NULL, DEFAULT_TEXDOCS, TEXDOC_ENVS); - FMT_INFO.type = "TeX system documentation"; + INIT_FORMAT ("TeX system documentation", DEFAULT_TEXDOCS, TEXDOC_ENVS); break; case kpse_texpool_format: - INIT_FORMAT (".pool", DEFAULT_TEXPOOL, TEXPOOL_ENVS); + INIT_FORMAT ("texpool", DEFAULT_TEXPOOL, TEXPOOL_ENVS); + SUFFIXES (".pool"); break; case kpse_texsource_format: - INIT_FORMAT (NULL, DEFAULT_TEXSOURCES, TEXSOURCE_ENVS); - FMT_INFO.type = "TeX system sources"; - break; - case kpse_tfm_format: - init_maketex (format, "MakeTeXTFM", NULL); - INIT_FORMAT (".tfm", DEFAULT_TFMFONTS, TFM_ENVS); - FMT_INFO.suffix_search_only = true; + INIT_FORMAT ("TeX system sources", DEFAULT_TEXSOURCES, TEXSOURCE_ENVS); break; case kpse_troff_font_format: - INIT_FORMAT (NULL, DEFAULT_TRFONTS, TROFF_FONT_ENVS); - FMT_INFO.type = "Troff fonts"; + INIT_FORMAT ("Troff fonts", DEFAULT_TRFONTS, TROFF_FONT_ENVS); + FMT_INFO.binmode = true; break; case kpse_type1_format: - INIT_FORMAT (".pfa", DEFAULT_T1FONTS, TYPE1_ENVS); - FMT_INFO.type = "type1 fonts"; - ALT_SUFFIXES (".pfb"); + 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); + 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 (NULL, DEFAULT_TEXCONFIG, DVIPS_CONFIG_ENVS); - FMT_INFO.type = "dvips config"; + INIT_FORMAT ("dvips config", DEFAULT_TEXCONFIG, DVIPS_CONFIG_ENVS); break; case kpse_ist_format: - INIT_FORMAT (".ist", DEFAULT_INDEXSTYLE, IST_ENVS); + 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" + SUFFIXES (TRUETYPE_SUFFIXES); + FMT_INFO.suffix_search_only = true; + FMT_INFO.binmode = true; + break; + case kpse_type42_format: + INIT_FORMAT ("type42 fonts", DEFAULT_T42FONTS, TYPE42_ENVS); + 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 (".:", DEFAULT_TEXMF, "/", kpse_program_name, "//", + NULL), + concat (uppercasify (kpse_program_name), "INPUTS")); + break; + case kpse_program_binary_format: + INIT_FORMAT ("other binary files", + concatn (".:", DEFAULT_TEXMF, "/", kpse_program_name, "//", + NULL), + concat (uppercasify (kpse_program_name), "INPUTS")); + FMT_INFO.binmode = true; break; default: FATAL1 ("kpse_init_format: Unknown format %d", format); @@ -489,7 +579,16 @@ 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 (" default suffix = %s\n", MAYBE (suffix)); + 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; @@ -521,94 +620,86 @@ kpse_find_file P3C(const_string, name, kpse_file_format_type, format, boolean, must_exist) { - const_string suffix; - const_string *alt; + const_string *ext; unsigned name_len = 0; boolean name_has_suffix_already = false; + string mapped_name; + string *mapped_names; + boolean use_fontmaps = (format == kpse_tfm_format + || format == kpse_gf_format + || format == kpse_pk_format + || format == kpse_ofm_format); string ret = NULL; - /* A null or empty NAME is surely a mistake. */ - assert (name && *name); + /* NAME being NULL is a programming bug somewhere. NAME can be empty, + though; this happens with constructs like `\input\relax'. */ + assert (name); if (FMT_INFO.path == NULL) kpse_init_format (format); /* Does NAME already end in a possible suffix? */ - suffix = FMT_INFO.suffix; - if (suffix) { - /* Avoid the strlen's entirely if no SUFFIX. */ - unsigned suffix_len = strlen (suffix); - name_len = strlen (name); - name_has_suffix_already = (name_len > suffix_len - && FILESTRCASEEQ (suffix, name + name_len - suffix_len)); - } - for (alt = FMT_INFO.alt_suffix; !name_has_suffix_already && alt && *alt; - alt++) { - unsigned suffix_len = strlen (*alt); - if (!name_len) name_len = strlen (name); - name_has_suffix_already = (name_len > suffix_len - && FILESTRCASEEQ (*alt, name + name_len - suffix_len)); + name_len = strlen (name); + if (FMT_INFO.suffix) { + for (ext = FMT_INFO.suffix; !name_has_suffix_already && *ext; ext++) { + unsigned suffix_len = strlen (*ext); + name_has_suffix_already = (name_len > suffix_len + && FILESTRCASEEQ (*ext, name + name_len - suffix_len)); + } } - - /* Search #1: NAME has a suffix (any suffix). For example, foo.sty, - foo.eps, foo.tex. Since multiple suffixes (foo.bar.tex) are - relatively rare, first try NAME. (This loses - if given `Times-Roman.tfm', but is ok given `Times-Roman'.) */ - if (name_has_suffix_already || find_suffix (name)) { - /* Search for original NAME, since it has a suffix. - - If we will search again with `suffix', avoid pounding the disk. - Really should also avoid disk search until after we check the - fontmaps, but ... lazy. Sorry. */ - boolean must = must_exist && FMT_INFO.suffix_search_only - && (!suffix || name_has_suffix_already); - ret = kpse_path_search (FMT_INFO.path, name, must); + if (!name_has_suffix_already && FMT_INFO.alt_suffix) { + for (ext = FMT_INFO.alt_suffix; !name_has_suffix_already && *ext; ext++) { + unsigned suffix_len = strlen (*ext); + name_has_suffix_already = (name_len > suffix_len + && FILESTRCASEEQ (*ext, name + name_len - suffix_len)); + } } - /* Search #2: If we have `foo' or `foo.bar', and the above search - failed, try `foo.tex' or `foo.bar.tex' now (but don't try - `foo.tex.tex'. This is so we find the `foo.tex' before the - executable `foo'. But, if we might search yet again, still don't - pound the disk. */ - if (!ret && suffix && !name_has_suffix_already) { - /* Append `.suffix' and search for it. */ - string name_with_suffix = concat (name, suffix); - ret = kpse_path_search (FMT_INFO.path, name_with_suffix, - FMT_INFO.suffix_search_only ? must_exist : false); - free (name_with_suffix); + /* Search #1: NAME doesn't have a suffix which is equal to a "standard" + suffix. For example, foo.bar, but not foo.tex. We look for the + name with the standard suffixes appended. */ + if (!name_has_suffix_already && FMT_INFO.suffix) { + /* Append a suffix and search for it. Don't pound the disk yet. */ + for (ext = FMT_INFO.suffix; !ret && *ext; ext++) { + string name_with_suffix = concat (name, *ext); + ret = kpse_path_search (FMT_INFO.path, name_with_suffix, false); + if (!ret && use_fontmaps) { + mapped_names = kpse_fontmap_lookup (name_with_suffix); + while (mapped_names && (mapped_name = *mapped_names++) && !ret) + ret = kpse_path_search (FMT_INFO.path, mapped_name, false); + } + free (name_with_suffix); + } + /* If we only do suffix searches, and are instructed to pound the disk, + do so now. We don't pound the disk for aliases...perhaps we should? */ + if (!ret && FMT_INFO.suffix_search_only && must_exist) { + for (ext = FMT_INFO.suffix; !ret && *ext; ext++) { + string name_with_suffix = concat (name, *ext); + ret = kpse_path_search (FMT_INFO.path, name_with_suffix, true); + free (name_with_suffix); + } + } } - /* Search #3 (fonts only): Look for aliases for NAME. I don't - think this is necessary for VF files, since only names people might - mention in TeX documents -- i.e., TFM's -- need be aliased. */ - if (!ret && (format == kpse_tfm_format || format == kpse_gf_format - || format == kpse_pk_format)) { - string mapped_name; - string *mapped_names; - /* Include a suffix in what we pass to `kpse_fontmap_lookup'; otherwise, - when we are searching for `circle10', for example, we'll just get - back `lcircle10', and that basename won't match anything in ls-R. */ - string name_with_suffix = name_has_suffix_already ? (string) name - : concat (name, suffix); - mapped_names = kpse_fontmap_lookup (name_with_suffix); - while (mapped_names && (mapped_name = *mapped_names++) && !ret) { - ret = kpse_path_search (FMT_INFO.path, mapped_name, false); + /* Search #2: Just look for the name we've been given, provided non-suffix + searches are allowed or the name already includes a suffix. */ + if (!ret && (name_has_suffix_already || !FMT_INFO.suffix_search_only)) { + ret = kpse_path_search (FMT_INFO.path, name, false); + if (!ret && use_fontmaps) { + mapped_names = kpse_fontmap_lookup (name); + while (mapped_names && (mapped_name = *mapped_names++) && !ret) + ret = kpse_path_search (FMT_INFO.path, mapped_name, false); } - if (!name_with_suffix) - free (name_with_suffix); + /* We don't pound the disk for aliases...perhaps we should? */ + if (!ret && must_exist) { + ret = kpse_path_search (FMT_INFO.path, name, true); + } } - /* Search #4 (sort of): Call MakeTeXTFM or whatever to create a + /* Search #3 (sort of): Call mktextfm or whatever to create a missing file. */ if (!ret && must_exist) { - ret = kpse_make_tex (format, name); - } - - /* Search #5: If we have `foo', look for `foo' (if non-suffix searches - are enabled for this FORMAT). This is the last-chance search, so - never disable the caller's MUST_EXIST. */ - if (!ret && (name_has_suffix_already || !FMT_INFO.suffix_search_only)) { - ret = kpse_path_search (FMT_INFO.path, name, must_exist); + ret = kpse_make_tex (format, name); } return ret; @@ -621,13 +712,9 @@ kpse_open_file P2C(const_string, name, kpse_file_format_type, type) { string fullname = kpse_find_file (name, type, true); - const_string mode = type == kpse_gf_format - || type == kpse_ocp_format - || type == kpse_ofm_format - || type == kpse_ovf_format - || type == kpse_tfm_format - || type == kpse_vf_format - ? FOPEN_RBIN_MODE : FOPEN_R_MODE; + 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) { @@ -640,3 +727,41 @@ return f; } + +/* 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 + need kpse_format_info, and would cause all of tex-file to be pulled + in by programs that do not need it. */ +void +kpse_reset_program_name P1C(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); + + /* Clear paths -- do we want the db path to be cleared? */ + for (i = 0; i != kpse_last_format; ++i) { + /* Do not erase the cnf of 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; + if (kpse_format_info[i].path != NULL) { + free ((string)kpse_format_info[i].path); + kpse_format_info[i].path = NULL; + } + } +}
--- a/kpathsea/tex-file.h +++ b/kpathsea/tex-file.h @@ -49,6 +49,7 @@ kpse_gf_format, kpse_pk_format, kpse_any_glyph_format, /* ``any'' meaning anything above */ + kpse_tfm_format, kpse_afm_format, kpse_base_format, kpse_bib_format, @@ -77,11 +78,15 @@ kpse_texsource_format, kpse_tex_ps_header_format, kpse_troff_font_format, - kpse_tfm_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_last_format /* one past last index */ } kpse_file_format_type; @@ -96,7 +101,7 @@ 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_cmdline /* command-line option */ } kpse_src_type; @@ -117,13 +122,14 @@ 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 *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; /* ``MakeTeXPK'', etc. */ + const_string program; /* ``mktexpk'', etc. */ const_string program_args; /* Args to `program'. */ boolean program_enabled_p; /* Invoke `program'? */ kpse_src_type program_enable_level; /* Who said to invoke `program'. */ + boolean binmode; /* The files must be opened in binary mode. */ } kpse_format_info_type; /* The sole variable of that type, indexed by `kpse_file_format_type'. @@ -156,13 +162,21 @@ #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) /* Don't just look up the name, actually open the file. */ extern FILE *kpse_open_file P2H(const_string, kpse_file_format_type); +/* 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 void kpse_reset_program_name P1H(const_string progname); + #endif /* not KPATHSEA_TEX_FILE_H */
--- a/kpathsea/tex-glyph.c +++ b/kpathsea/tex-glyph.c @@ -47,11 +47,14 @@ boolean must_exist; string ret = NULL; const_string path = kpse_format_info[format].path; + const_string *sfx; if (!path) path = kpse_init_format (format); /* Set the suffix on the name we'll be searching for. */ - xputenv ("KPATHSEA_FORMAT", kpse_format_info[format].suffix); + sfx = kpse_format_info[format].suffix; + if (sfx && *sfx) + xputenv ("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' @@ -143,7 +146,7 @@ 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 - MakeTeXPK to only deal with real names.) */ + mktexpk to only deal with real names.) */ static string try_fontmap P4C(string *, fontname_ptr, unsigned, dpi, @@ -267,7 +270,7 @@ source = kpse_glyph_source_alias; ret = try_fontmap (&fontname, dpi, format, glyph_file); - /* If not an alias, try creating it on the fly with MakeTeXPK, + /* If not an alias, try creating it on the fly with mktexpk, unless FONTNAME is absolute or explicitly relative. */ if (!ret && !kpse_absolute_p (fontname, true)) { source = kpse_glyph_source_maketex; @@ -276,7 +279,7 @@ ret = kpse_make_tex (format, fontname); } - /* If MakeTeX... succeeded, set return struct. Doesn't make sense for + /* 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) { @@ -284,7 +287,7 @@ KPSE_GLYPH_FILE_NAME (*glyph_file) = fontname; } - /* If MakeTeX... failed, try any fallback resolutions. */ + /* If mktex... failed, try any fallback resolutions. */ else { if (kpse_fallback_resolutions) ret = try_fallback_resolutions (fontname, dpi, format, glyph_file);
--- a/kpathsea/tex-hush.c +++ b/kpathsea/tex-hush.c @@ -27,10 +27,12 @@ { string h; string hush = kpse_var_value ("TEX_HUSH"); - for (h = kpse_path_element (hush); h; h = kpse_path_element (NULL)) { - /* Don't do anything special with empty elements. */ - if (STREQ (hush, what) || STREQ (hush, "all")) - return true; + if (hush) { + for (h = kpse_path_element (hush); h; h = kpse_path_element (NULL)) { + /* Don't do anything special with empty elements. */ + if (STREQ (h, what) || STREQ (h, "all")) + return true; + } } return false;
--- a/kpathsea/tex-make.c +++ b/kpathsea/tex-make.c @@ -54,7 +54,6 @@ up DPI, but may as well be safe, and also get the magstep number. */ (void) kpse_magstep_fix (dpi, bdpi, &m); - /* Have to do something different for DOS? */ if (m == 0) sprintf (q, "%d+%d/%d", dpi / bdpi, dpi % bdpi, bdpi); else @@ -73,7 +72,7 @@ xputenv ("MAKETEX_MAG", q); } -/* This MakeTeX... program was disabled, or the script failed. If this +/* 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. */ @@ -129,7 +128,16 @@ unsigned i; FILE *f; string cmd = xstrdup (passed_cmd); - + +#if defined (MSDOS) || defined (WIN32) + /* For discarding stderr. This is so we don't require an MSDOS user + to istall a unixy shell (see kpse_make_tex below): they might + devise their own ingenious ways of running mktex... even though + they don't have such a shell. */ + int temp_stderr = -1; + int save_stderr = -1; +#endif + /* If the user snuck `backquotes` or $(command) substitutions into the name, foil them. */ for (i = 0; i < strlen (cmd); i++) { @@ -144,6 +152,18 @@ if (!kpse_make_tex_discard_errors) { fprintf (stderr, "kpathsea: Running %s\n", cmd); } +#if defined (MSDOS) || defined (WIN32) + else { + temp_stderr = open ("NUL", O_WRONLY); + if (temp_stderr >= 0) { + save_stderr = dup (2); + if (save_stderr >= 0) + dup2 (temp_stderr, 2); + } + /* Else they lose: the errors WILL be shown. However, open/dup + aren't supposed to fail in this case, it's just my paranoia. */ + } +#endif /* Run the script. The Amiga has a different interface. */ #ifdef AMIGA @@ -151,6 +171,18 @@ #else /* not AMIGA */ f = popen (cmd, FOPEN_R_MODE); +#if defined (MSDOS) || defined (WIN32) + if (kpse_make_tex_discard_errors) { + /* Close /dev/null and revert stderr. */ + if (save_stderr >= 0) { + dup2 (save_stderr, 2); + close (save_stderr); + } + if (temp_stderr >= 0) + close (temp_stderr); + } +#endif + if (f) { int c; string fn; /* The final filename. */ @@ -168,7 +200,7 @@ with ECHILD (No child processes), maybe only if we're being run by lpd. So don't make this a fatal error. */ if (pclose (f) == -1) { - perror ("pclose(MakeTeXPK)"); + perror ("pclose(mktexpk)"); WARNING ("kpathsea: This is probably the Linux pclose bug; continuing"); } @@ -185,7 +217,7 @@ what it output. */ ret = len == 1 ? NULL : kpse_readable_file (fn); if (!ret && len > 1) { - WARNING1 ("kpathsea: MakeTeXPK output `%s' instead of a filename", fn); + WARNING1 ("kpathsea: mktexpk output `%s' instead of a filename", fn); } /* Free the name if we're not returning it. */ @@ -227,40 +259,35 @@ string args, cmd; const_string prog = spec.program; const_string arg_spec = spec.program_args; - string mode = getenv ("MAKETEX_MODE"); - boolean unset_mode = false; if (format <= kpse_any_glyph_format) set_maketex_mag (); - /* Here's an awful kludge: if the mode is `/', unset it for the call - and then reset it. We could ignore a mode of / in MakeTeXPK, but - then everyone's MakeTeXPK would have to handle that special case, - which seems too onerous. `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, MakeTeXPK'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. */ - if (mode && STREQ (mode, DIR_SEP_STRING)) { - xputenv ("MAKETEX_MODE", ""); - unset_mode = true; - } + /* 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. */ args = arg_spec ? kpse_var_expand (arg_spec) : (string) ""; - if (unset_mode) - xputenv ("MAKETEX_MODE", DIR_SEP_STRING); /* The command is the program name plus the arguments. */ - cmd = concatn (prog, " ", base, " ", args, NULL); + cmd = concatn (prog, " ", args, " ", base, NULL); /* Only way to discard errors is redirect stderr inside another - shell; otherwise, if the MakeTeX... script doesn't exist, we - will see the `sh: MakeTeX...: not found' error. No point in + shell; otherwise, if the mktex... script doesn't exist, we + will see the `sh: mktex...: not found' error. No point in doing this if we're not actually going to run anything. */ +#if !defined(MSDOS) && !defined(WIN32) && !defined(AMIGA) + /* We don't want to require that a Unix-like shell be installed + on MS-DOS or WIN32 systems, so we will redirect stderr by hand + (in maketex). */ if (kpse_make_tex_discard_errors) { string old_cmd = cmd; #ifdef OS2 @@ -270,13 +297,14 @@ #endif free (old_cmd); } - +#endif + ret = maketex (format, cmd); free (cmd); if (*args) free (args); - } + } return ret; } @@ -298,12 +326,12 @@ int main () { - xputenv ("KPATHSEA_DPI", "781"); /* call MakeTeXPK */ - xputenv ("MAKETEX_BASE_DPI", "300"); /* call MakeTeXPK */ + xputenv ("KPATHSEA_DPI", "781"); /* call mktexpk */ + xputenv ("MAKETEX_BASE_DPI", "300"); /* call mktexpk */ KPSE_MAKE_SPEC_ENABLED (kpse_make_specs[kpse_pk_format]) = true; test_make_tex (kpse_pk_format, "cmr10"); - /* Fail with MakeTeXTFM. */ + /* Fail with mktextfm. */ KPSE_MAKE_SPEC_ENABLED (kpse_make_specs[kpse_tfm_format]) = true; test_make_tex (kpse_tfm_format, "foozler99");
--- a/kpathsea/tex-make.h +++ b/kpathsea/tex-make.h @@ -24,14 +24,14 @@ #include <kpathsea/types.h> -/* If true, throw away standard error from the MakeTeX... scripts. +/* If true, throw away standard error from the mktex... scripts. (Standard output is the filename, so we never throw that away.) */ extern DllImport boolean kpse_make_tex_discard_errors; /* 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 MakeTeXPK + the file is passed through environment variables. See the mktexpk stuff in `tex-make.c' for an example. */ extern string kpse_make_tex P2H(kpse_file_format_type format, const_string base_file);
deleted file mode 100644 --- a/kpathsea/texmf.cnf.in +++ /dev/null @@ -1,339 +0,0 @@ -% original texmf.cnf -- runtime path configuration file for kpathsea. -% (If you change or delete `original' on the previous line, the -% distribution won't install its version over yours.) -% Public domain. -% -% What follows is a super-summary of what this .cnf file can -% contain. Please read the Kpathsea manual for more information. -% -% texmf.cnf is generated from texmf.cnf.in, by replacing @var@ with the -% value of the Make variable `var', via a sed file texmf.sed, generated -% (once) by kpathsea/Makefile (itself generated from kpathsea/Makefile.in -% by configure). -% -% Any identifier (sticking to A-Za-z_ for names is safest) can be assigned. -% The `=' (and surrounding spaces) is optional. -% No % or @ in texmf.cnf.in, for the sake of autogeneration. -% (However, %'s and @'s can be edited into texmf.cnf or put in envvar values.) -% $foo (or ${foo}) in a value expands to the envvar or cnf value of foo. -% -% 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. -% -% // means to search subdirectories (recursively). -% A leading !! means to look only in the ls-R db, never on the disk. -% A leading/trailing/doubled : in the paths will be expanded into the -% compile-time default. Probably not what you want. - - -% Part 1: Search paths and directories. - -% The root of everything below. -prefix = @prefix@ - -% You can set an environment variable to override this if you're testing -% a new TeX tree, without changing anything else. -% -% You may wish to use one of the $SELFAUTO... variables here so TeX will -% find where to look dynamically. See the manual and the definition -% below of TEXMFCNF. -% -% If you have multiple trees, you can use shell brace notation, for example: -% TEXMF = {/usr/local/mytex,/usr/local/othertex} -% Also set TEXMFDBS to /usr/local/mytex:/usr/local/othertex, -% and set TEXMFMAIN to whichever is the main tree (with ./web2c, etc.), -% and set TEXMFLS_R to the tree where you want generated files to go -% -TEXMF = @texmf@ -% Change this if you have multiple trees or MakeTeX* will fail: -TEXMFMAIN = $TEXMF -% (this is the default) TEXMFLS_R = $TEXMFMAIN -% (this is the default) TEXMFCNF_DIR = $TEXMFMAIN - -% Where to look for ls-R files. There need not be an ls-R in the -% directories in this path, but if there is one, Kpathsea will use it. -TEXMFDBS = $TEXMF - -% The TeX inputs and fonts directories. -texdir = @texinputdir@ -fontdir = @fontdir@ - -% To avoid searching the filesystem, use the commented-out definitions here. -%dbtex = !!$texdir -%dbfonts = !!$fontdir -dbtex = $texdir -dbfonts = $fontdir - -% TeX input files -- i.e., anything to be found by \input or \openin, -% including .sty, .eps, etc. -TEXINPUTS = .:$dbtex// - -% LaTeX 2e specific macros are stored in latex/, macros that can only be -% used with 2.09 in latex209/. In addition, we look in the directory -% latex2, useful for macros that were written for 2.09 and do not -% mention 2e at all, but can be used with 2e. -latex209_inputs = .:$dbtex/latex209//:$dbtex/latex//:$dbtex/generic// -latex2e_inputs = .:$dbtex/latex//:$dbtex/latex209//:$dbtex/generic// -TEXINPUTS.latex209 = $latex209_inputs -TEXINPUTS.latex2e = $latex2e_inputs -TEXINPUTS.latex = $latex2e_inputs - -% Fontinst needs to read afm files. -TEXINPUTS.fontinst = .:$dbtex//:$dbfonts//afm// - -% Plain TeX. Have the command tex check all directories as a last -% resort, we may have plain-compatible stuff anywhere. -plain_inputs = $dbtex/plain//:$dbtex/generic// -TEXINPUTS.tex = .:$plain_inputs:$dbtex// -% other plain-based formats -TEXINPUTS.amstex = .:$dbtex/amstex//:$plain_inputs -TEXINPUTS.ftex = .:$dbtex/formate//:$plain_inputs -TEXINPUTS.texinfo = .:$dbtex/texinfo//:$plain_inputs - -% INITEX. May as well make this separate so it can search on disk; -% initex is seldom run, and might be used directly after files have been -% added, when ls-R may not up be to date. -TEXINPUTS.initex = .:$texdir// - -% Earlier entries override later ones, so put this last. -TEXINPUTS = .:$dbtex// - -% Metafont, MetaPost inputs. -MFINPUTS = .:@mfinputdir@//:{$dbfonts,$VARTEXFONTS}//source// -MPINPUTS = .:@mpinputdir@// - -% Dump files (fmt/base/mem) for vir{tex,mf,mp} to read (see -% web2c/INSTALL), and string pools (.pool) for ini{tex,mf,mp}. It is -% silly that we have six paths and directories here (they all resolve to -% a single place by default), but historically ... -TEXFORMATS = .:@fmtdir@ -MFBASES = .:@basedir@ -MPMEMS = .:@memdir@ -TEXPOOL = .:@texpooldir@ -MFPOOL = .:@mfpooldir@ -MPPOOL = .:@mppooldir@ - -% If you have a read-only central font directory and therefore need to -% cache MakeTeXPK-created fonts locally, set this as appropriate and -% also set the `vartexfonts' feature in MT_FEATURES in MakeTeXnames.cnf. -VARTEXFONTS = /var/tex/fonts - -% Device-independent font metric files. -VFFONTS = .:$dbfonts//vf// -TFMFONTS = .:{$dbfonts,$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. -PKFONTS = .:{$dbfonts,$VARTEXFONTS}//pk/$MAKETEX_MODE// - -% xdvi needs to find bitmaps for PostScript fonts, which can be -% generated by the standalone program gsftopk, among others. -PKFONTS.xdvi = .:{$dbfonts,$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 = .:$dbfonts//gf/$MAKETEX_MODE// - -% A backup for PKFONTS and GFFONTS. Not used for anything. -GLYPHFONTS = .:$dbfonts - -% For texfonts.map and included map files used by MakeTeXPK. -% See ftp://ftp.tug.org/tex/fontname.tar.gz. -TEXFONTMAPS = .:$TEXMF/fontname - -% BibTeX bibliographies and style files. -BIBINPUTS = .:$TEXMF/bibtex/bib// -BSTINPUTS = .:$TEXMF/bibtex/bst// - -% MFT style files. -MFTINPUTS = .:$TEXMF/mft// - -% PostScript headers, prologues (.pro), encodings (.enc) and fonts. -TEXPSHEADERS = .:@psheaderdir@//:$dbfonts//type1// - -% PostScript Type 1 outline fonts. -T1FONTS = .:$dbfonts//type1// - -% PostScript AFM metric files. -AFMFONTS = .:$dbfonts//afm// - -% Dvips' config.* files (this name should not start with `TEX'!). -TEXCONFIG = .:@dvipsdir@// - -% Makeindex style (.ist) files. -INDEXSTYLE = .:$TEXMF/makeindex// - -% Used by DMP (ditroff-to-mpx), called by makempx -troff. -TRFONTS = /usr/lib/font/devpost -MPSUPPORT = .:$TEXMF/metapost/support - -% For xdvi to find mime.types and .mailcap, if they do not exist in -% $HOME. These are single directories, not paths. -% (But the default mime.types, at least, may well suffice.) -MIMELIBDIR = $prefix/etc -MAILCAPLIBDIR = $prefix/etc - -% TeX documentation and source files, for use with kpsewhich. -TEXDOCS = .:$TEXMF/doc// -TEXSOURCES = .:$TEXMF/source// - -% Omega-related fonts and other files. -OFMFONTS = .:{$dbfonts,$VARTEXFONTS}//ofm// -OPLFONTS = .:{$dbfonts,$VARTEXFONTS}//opl// -OVFFONTS = .:{$dbfonts,$VARTEXFONTS}//ovf// -OVPFONTS = .:{$dbfonts,$VARTEXFONTS}//ovp// -OTPINPUTS = .:$TEXMF/omega/otp// -OCPINPUTS = .:$TEXMF/omega/ocp// - -% The MakeTeX* scripts rely on KPSE_DOT. Do not change it. -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_progname. -% -% About the /. construction: -% 1) if the variable is undefined, we'd otherwise have an empty path -% element in the compile-time path. This is not meaningful. -% 2) if we used /$VARIABLE, we'd end up with // if VARIABLE is defined, -% which would search the entire world. -% -% The TETEXDIR stuff isn't likely to relevant unless you're using teTeX, -% but it doesn't hurt. -% -web2cdir = @web2cdir@ -TEXMFCNF = .:$SELFAUTOLOC:$SELFAUTODIR:$SELFAUTODIR/share/texmf/web2c:$SELFAUTOPARENT:$SELFAUTOPARENT/share/texmf/web2c:/.$TETEXDIR:/.$TEXMF/web2c:$web2cdir - - -% Part 2: Non-path options. - -% Write .log/.dvi/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 equivalent to -% TEX_HUSH = checksum:lostchar:readable:special -TEX_HUSH = 0 - -% Enable system commands via \write18{...}? -shell_escape = 0 - -% Allow TeX \openout on filenames starting with `.' (e.g., .rhosts)? -openout_any = 0 - -% Enable the MakeTeX... 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 `MAKETEXPK' value. -% -% MAKETEXTEX = 0 -% MAKETEXPK = 0 -% MAKETEXMF = 0 -% MAKETEXTFM = 0 - -% What MetaPost runs to make MPX files. This is passed an option -troff -% if MP is in troff mode. Set to `0' to disable this feature. -MPXCOMMAND = makempx - - -% Part 3: Array and other sizes for TeX (and Metafont and MetaPost). -% -% If you want to change some of these sizes only for a certain TeX -% variant, the usual dot notation works, e.g., -% main_memory.hugetex = 20000000 -% -% 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 = 263000 % 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. - -% Words of font info for TeX (total size of all TFM files, approximately). -font_mem_size = 100000 - -% Total number of fonts. Must be >= 50 and <= 2000 (without tex.ch changes). -font_max = 500 - -% Extra space for the hash table of control sequences (which allows 10K -% names as distributed). -hash_extra = 0 - -% Max number of characters in all strings, including all error messages, -% help texts, font names, control sequences. These values apply to TeX and MP. -pool_size = 125000 -% Minimum pool space after TeX/MP's own strings; must be at least -% 25000 less than pool_size, but doesn't need to be nearly that large. -string_vacancies = 25000 -max_strings = 15000 % max number of strings -pool_free = 5000 % min pool space left after loading .fmt - -% Hyphenation trie. As distributed, the maximum is 65535; this should -% work unless `unsigned short' is not supported or is smaller than 16 -% bits. This value should suffice for UK English, US English, French, -% and German (for example). To increase, you must change -% `ssup_trie_opcode' and `ssup_trie_size' in tex.ch (and rebuild TeX); -% the trie will then consume four bytes per entry, instead of two. -% -% US English, German, and Portuguese: 30000. -% German: 14000. -% US English: 10000. -% -trie_size = 64000 - -hyph_size = 1000 % number of hyphenation exceptions, >610 and <32767. -buf_size = 3000 % max length of input lines or control sequence names -nest_size = 100 % simultaneous semantic levels (e.g., groups) -max_in_open = 15 % simultaneous input files and error insertions -param_size = 500 % simultaneous macro parameters -save_size = 4000 % for saving values outside current group -stack_size = 300 % simultaneous input sources - -% 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; -% max_print_line < 60 ; -% These apply to Metafont and MetaPost as well. -error_line = 79 -half_error_line = 50 -max_print_line = 79
new file mode 100644 --- /dev/null +++ b/kpathsea/texmf.in @@ -0,0 +1,412 @@ +% original texmf.cnf -- runtime path configuration file for kpathsea. +% (If you change or delete `original' on the previous line, the +% distribution won't install its version over yours.) +% Public domain. +% +% What follows is a super-summary of what this .cnf file can +% contain. Please read the Kpathsea manual for more information. +% +% texmf.cnf is generated from texmf.in, by replacing @var@ with the +% value of the Make variable `var', via a sed file texmf.sed, generated +% (once) by kpathsea/Makefile (itself generated from kpathsea/Makefile.in +% by configure). +% +% Any identifier (sticking to A-Za-z_ for names is safest) can be assigned. +% The `=' (and surrounding spaces) is optional. +% No % or @ in texmf.in, for the sake of autogeneration. +% (However, %'s and @'s can be edited into texmf.cnf or put in envvar values.) +% $foo (or ${foo}) in a value expands to the envvar or cnf value of foo. +% +% 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. +% +% // means to search subdirectories (recursively). +% A leading !! means to look only in the ls-R db, never on the disk. +% A leading/trailing/doubled : in the paths will be expanded into the +% compile-time default. Probably not what you want. +% +% You can use brace notation, for example: /usr/local/{mytex:othertex} +% expands to /usr/local/mytex:/usr/local/othertex. Instead of the path +% separator you can use a comma: /usr/local/{mytex,othertex} also expands +% to /usr/local/mytex:/usr/local/othertex. However, the use of the comma +% instead of the path separator is deprecated. +% +% The text above assumes thet path separator is a colon (:). Non-UNIX +% systems use different path separators, for example MicroSoft operating +% systems use the semicolon (;). + +% Part 1: Search paths and directories. + +% You can set an environment variable to override TEXMF if you're testing +% a new TeX tree, without changing anything else. +% +% You may wish to use one of the $SELFAUTO... variables here so TeX will +% find where to look dynamically. See the manual and the definition +% below of TEXMFCNF. + +% The main tree, which must be mentioned in $TEXMF, below: +TEXMFMAIN = @texmf@ + +% A place for local additions to a "standard" texmf tree. For example: +% TEXMFLOCAL = @texmf@.local + +% User texmf trees can be catered for like this... +% HOMETEXMF = $HOME/texmf + +% Now, list all the texmf trees. If you have multiple trees, +% use shell brace notation, like this: +% TEXMF = {$HOMETEXMF:!!$TEXMFLOCAL:!!$TEXMFMAIN} +% The braces are necessary. +TEXMF = $TEXMFMAIN + +% The system trees. These are the trees that are shared by all the users. +SYSTEXMF = $TEXMF + +% 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 = @vartexfonts@ + +% Where to look for ls-R files. There need not be an ls-R in the +% directories in this path, but if there is one, Kpathsea will use it. +TEXMFDBS = $TEXMF:$VARTEXFONTS + +% It may be convenient to define TEXMF like this: +% TEXMF = {$HOMETEXMF:!!$TEXMFLOCAL:!!$TEXMFMAIN:$HOME} +% which allows users to set up entire texmf trees, and tells TeX to +% look in places like ~/tex and ~/bibtex. If you do this, define TEXMFDBS +% like this: +% TEXMFDBS = $HOMETEXMF:$TEXMFLOCAL:$TEXMFMAIN:$VARTEXFONTS +% or mktexlsr will generate an ls-R file for $HOME when called, which is +% rarely desirable. If you do this you'll want to define SYSTEXMF like +% this: +% SYSTEXMF = $TEXMFLOCAL:$TEXMFMAIN +% so that fonts from a user's tree won't escape into the global trees. +% +% 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 +% VARTEXMF = /var/lib/texmf +% is used on many Linux systems. In this case, set VARTEXFONTS like this +% VARTEXFONTS = $VARTEXMF/fonts +% and do not mention it in TEXMFDBS (but _do_ mention VARTEXMF). + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Usually you will not need to edit any of the other variables in part 1. % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% WEB2C is for Web2C specific files. The current directory may not be +% a good place to look for them. +WEB2C = $TEXMF/web2c + +% TEXINPUTS is for TeX input files -- i.e., anything to be found by \input +% or \openin, including .sty, .eps, etc. + +% LaTeX 2e 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. +TEXINPUTS.latex209 = .:$TEXMF/tex/{latex209:generic:latex:}// +TEXINPUTS.latex2e = .:$TEXMF/tex/{latex:generic:latex209:}// +TEXINPUTS.latex = .:$TEXMF/tex/{latex:generic:latex209:}// + +% Fontinst needs to read afm files. +TEXINPUTS.fontinst = .:$TEXMF/tex//:$TEXMF/fonts//afm// + +% Plain TeX. Have the command tex check all directories as a last +% resort, we may have plain-compatible stuff anywhere. +TEXINPUTS.tex = .:$TEXMF/tex/{plain:generic:}// +% other plain-based formats +TEXINPUTS.amstex = .:$TEXMF/tex/{amstex:plain:generic:}// +TEXINPUTS.ftex = .:$TEXMF/tex/{formate:plain:generic:}// +TEXINPUTS.texinfo = .:$TEXMF/tex/{texinfo:plain:generic:}// +TEXINPUTS.eplain = .:$TEXMF/tex/{eplain:plain:generic:}// +TEXINPUTS.jadetex = .:$TEXMF/tex/{jadetex:plain:generic:}// + +% MLTeX. +TEXINPUTS.frtex = .:$TEXMF/{mltex:tex}/{french:plain:generic:}// +TEXINPUTS.frlatex = .:$TEXMF/{mltex:tex}/{french:latex:generic:latex209:}// +TEXINPUTS.mltex = .:$TEXMF/{mltex:tex}/{plain:generic:}// +TEXINPUTS.mllatex = .:$TEXMF/{mltex:tex}/{latex:generic:latex209:}// + +% e-TeX. This form of the input paths is borrowed from teTeX. A certain +% variant of TDS is assumed here, unaffected by the build variables. +TEXINPUTS.elatex = .:$TEXMF/{etex:tex}/{latex:generic:latex209:plain:}// +TEXINPUTS.etex = .:$TEXMF/{etex:tex}/{plain:generic:}// + +% PDFTeX. This form of the input paths is borrowed from teTeX. A certain +% variant of TDS is assumed here, unaffected by the build variables. +TEXINPUTS.pdftexinfo = .:$TEXMF/{pdftex:tex}/{texinfo:generic:plain:}// +TEXINPUTS.pdflatex = .:$TEXMF/{pdftex:tex}/{latex:generic:latex209:plain:}// +TEXINPUTS.pdftex = .:$TEXMF/{pdftex:tex}/{plain:generic:}// + +% Omega. +TEXINPUTS.lambda = .:$TEXMF/{omega:tex}/{lambda:latex:generic:latex209:plain:}// +TEXINPUTS.omega = .:$TEXMF/{omega:tex}/{plain:generic:}// + +% Earlier entries override later ones, so put this last. +TEXINPUTS = .:$TEXMF/tex/{generic:}// + +% Metafont, MetaPost inputs. +MFINPUTS = .:$TEXMF/metafont//:{$TEXMF/fonts:$VARTEXFONTS}//source// +MPINPUTS = .:$TEXMF/metapost// + +% Dump files (fmt/base/mem) for vir{tex,mf,mp} to read (see web2c/INSTALL), +% and string pools (.pool) for ini{tex,mf,mp}. It is silly that we have six +% paths and directories here (they all resolve to a single place by default), +% but historically ... +TEXFORMATS = .:$TEXMF/web2c +MFBASES = .:$TEXMF/web2c +MPMEMS = .:$TEXMF/web2c +TEXPOOL = .:$TEXMF/web2c +MFPOOL = .:$TEXMF/web2c +MPPOOL = .:$TEXMF/web2c + +% Device-independent font metric files. +VFFONTS = .:$TEXMF/fonts//vf// +TFMFONTS = .:{$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 = .:{$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 = .:$TEXMF/fonts//gf/$MAKETEX_MODE// + +% A backup for PKFONTS and GFFONTS. Not used for anything. +GLYPHFONTS = .:$TEXMF/fonts + +% For texfonts.map and included map files used by mktexpk. +% See ftp://ftp.tug.org/tex/fontname.tar.gz. +TEXFONTMAPS = .:$TEXMF/fontname + +% BibTeX bibliographies and style files. +BIBINPUTS = .:$TEXMF/bibtex/{bib:}// +BSTINPUTS = .:$TEXMF/bibtex/{bst:}// + +% MFT style files. +MFTINPUTS = .:$TEXMF/mft// + +% PostScript headers, prologues (.pro), encodings (.enc) and fonts. +TEXPSHEADERS = .:$TEXMF/dvips//:$TEXMF/pdftex//:$TEXMF/fonts//type1// + +% PostScript Type 1 outline fonts. +T1FONTS = .:$TEXMF/fonts//type1// + +% PostScript AFM metric files. +AFMFONTS = .:$TEXMF/fonts//afm// + +% TrueType outline fonts. +TTFONTS = .:$TEXMF/fonts//truetype// + +% Type 42 outline fonts. +T42FONTS = .:$TEXMF/fonts//type42// + +% Dvips' config.* files (this name should not start with `TEX'!). +TEXCONFIG = .:$TEXMF/dvips// + +% Makeindex style (.ist) files. +INDEXSTYLE = .:$TEXMF/makeindex// + +% Used by DMP (ditroff-to-mpx), called by makempx -troff. +TRFONTS = /usr/lib/font/devpost +MPSUPPORT = .:$TEXMF/metapost/support + +% For xdvi to find mime.types and .mailcap, if they do not exist in +% $HOME. These are single directories, not paths. +% (But the default mime.types, at least, may well suffice.) +MIMELIBDIR = @prefix@/etc +MAILCAPLIBDIR = @prefix@/etc + +% TeX documentation and source files, for use with kpsewhich. +TEXDOCS = .:$TEXMF/doc// +TEXSOURCES = .:$TEXMF/source// + +% Omega-related fonts and other files. The odd construction for OFMFONTS +% makes it behave in the face of a definition of TFMFONTS. Unfortunately +% no default substitution would take place for TFMFONTS, so an explicit +% path is retained. +OFMFONTS = .:{$TEXMF/fonts:$VARTEXFONTS}//{ofm:tfm}//:$TFMFONTS +OPLFONTS = .:{$TEXMF/fonts:$VARTEXFONTS}//opl// +OVFFONTS = .:{$TEXMF/fonts:$VARTEXFONTS}//ovf// +OVPFONTS = .:{$TEXMF/fonts:$VARTEXFONTS}//ovp// +OTPINPUTS = .:$TEXMF/omega/otp// +OCPINPUTS = .:$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. +XDVIINPUTS = .:$TEXMF/xdvi +TEX4HTINPUTS = .:$TEXMF/tex4ht// + +%% 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_progname. +% +% About the /. construction: +% 1) if the variable is undefined, we'd otherwise have an empty path +% element in the compile-time path. This is not meaningful. +% 2) if we used /$VARIABLE, we'd end up with // if VARIABLE is defined, +% which would search the entire world. +% +% The TETEXDIR stuff isn't likely to relevant unless you're using teTeX, +% but it doesn't hurt. +% +TEXMFCNF = .:{$SELFAUTOLOC:$SELFAUTODIR:$SELFAUTOPARENT}{:{/share:}/texmf{.local:}/web2c}:/.$TETEXDIR:/.$TEXMF/web2c:@web2c@ + + + +% Part 2: Non-path options. + +% Write .log/.dvi/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 equivalent to +% TEX_HUSH = checksum:lostchar:readable:special +TEX_HUSH = none + +% Enable system commands via \write18{...}? +shell_escape = f + +% Allow TeX \openout on filenames starting with `.' (e.g., .rhosts)? +% a (any) : any file can be opened. +% r (restricted) : disallow opening "dotfiles". +% p (paranoid) : as 'r' and disallow going to parent directories, and +% restrict absolute paths to be under $TEXMFOUTPUT. +openout_any = p + +% 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 +% MKOCP = 0 +% MKOFM = 0 + +% What MetaPost runs to make MPX files. This is passed an option -troff +% if MP is in troff mode. Set to `0' to disable this feature. +MPXCOMMAND = makempx + + +% Part 3: Array and other sizes for TeX (and Metafont and MetaPost). +% +% If you want to change some of these sizes only for a certain TeX +% variant, the usual dot notation works, e.g., +% main_memory.hugetex = 20000000 +% +% 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 = 263000 % 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. + +% Words of font info for TeX (total size of all TFM files, approximately). +font_mem_size = 200000 + +% Total number of fonts. Must be >= 50 and <= 2000 (without tex.ch changes). +font_max = 1000 + +% Extra space for the hash table of control sequences (which allows 10K +% names as distributed). +hash_extra = 0 + +% Max number of characters in all strings, including all error messages, +% help texts, font names, control sequences. These values apply to TeX and MP. +pool_size = 125000 +% Minimum pool space after TeX/MP's own strings; must be at least +% 25000 less than pool_size, but doesn't need to be nearly that large. +string_vacancies = 25000 +max_strings = 15000 % max number of strings +pool_free = 5000 % min pool space left after loading .fmt + +% Hyphenation trie. As distributed, the maximum is 65535; this should +% work unless `unsigned short' is not supported or is smaller than 16 +% bits. This value should suffice for UK English, US English, French, +% and German (for example). To increase, you must change +% `ssup_trie_opcode' and `ssup_trie_size' in tex.ch (and rebuild TeX); +% the trie will then consume four bytes per entry, instead of two. +% +% US English, German, and Portuguese: 30000. +% German: 14000. +% US English: 10000. +% +trie_size = 64000 + +% 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. As distributed, the size is 50000; most documents can be +% handled within a tenth of this size. +buf_size = 50000 + +hyph_size = 1000 % number of hyphenation exceptions, >610 and <32767. +nest_size = 100 % simultaneous semantic levels (e.g., groups) +max_in_open = 15 % simultaneous input files and error insertions +param_size = 500 % simultaneous macro parameters +save_size = 4000 % for saving values outside current group +stack_size = 300 % simultaneous input sources + +% These are Omega-specific. +ocp_buf_size = 20000 % character buffers for ocp filters. +ocp_stack_size = 10000 % stacks for ocp computations. +ocp_list_size = 1000 % control for multiple ocps. + +% 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 Metafont and MetaPost as well. +error_line = 79 +half_error_line = 50 +max_print_line = 79
--- a/kpathsea/tilde.c +++ b/kpathsea/tilde.c @@ -112,7 +112,7 @@ { string answer; - printf ("Tilde expansion of `%s':\t", filename ? filename : "(null)"); + printf ("Tilde expansion of `%s':\t", filename ? filename : "(nil)"); answer = kpse_tilde_expand (filename); puts (answer); }
--- a/kpathsea/unixtex.texi +++ b/kpathsea/unixtex.texi @@ -10,20 +10,19 @@ @cindex retrieving @TeX{} @flindex unixtex.ftp -@flindex tug.cs.umb.edu +@flindex tug.org @flindex www.tug.org @flindex ftp.tug.org This @iftex chapter @end iftex -is @url{ftp://ftp.tug.org/tex/unixtex.ftp}, last updated 1 February -1997. Also available as @url{http://www.tug.org/unixtex.ftp}. The IP -address is currently [158.121.106.10], and the canonical host name is -currently @samp{tug.cs.umb.edu}. It is also in Kpathsea source -distributions as @file{etc/unixtex.ftp} (although the network version is -usually newer). Mail @email{kb@@mail.tug.org} with comments or -questions. +is @url{ftp://ftp.tug.org/tex/unixtex.ftp}, last updated 18 March 1998. +Also available as @url{http://www.tug.org/unixtex.ftp}. The IP address +is currently @code{[158.121.106.10]}, and the canonical host name is +currently @samp{tug.org}. It is also in Kpathsea source distributions +as @file{etc/unixtex.ftp} (although the network version is usually +newer). Mail @email{kb@@mail.tug.org} with comments or questions. Following are general instructions for Unix or other sites who wish to acquire the Web2c distribution, (plain) @TeX{}, La@TeX{} (2e), @@ -40,7 +39,7 @@ a membership form. For actual installation instructions after obtaining the necessary -sources, @pxref{Installation}. A copy is in the distribution file +sources, see @ref{Installation}. A copy is in the distribution file @file{kpathsea/INSTALL}. @menu @@ -64,7 +63,7 @@ and a directory name. Here are some primary locations: @example -@url{ftp://ftp.cdrom.com/pub/tex/ctan} @r{(California, USA)} +@url{ftp://ctan.tug.org/tex-archive} @r{(California, USA)} @url{ftp://ftp.dante.de/tex-archive} @r{(Germany)} @url{ftp://ftp.tex.ac.uk/tex-archive} @r{(England)} @end example @@ -92,13 +91,16 @@ transfers): @table @asis -@item @file{@var{CTAN:}/systems/web2c/lib.tar.gz} +@item @file{@var{CTAN:}/systems/web2c/texmflib.tar.gz} A basic collection of fonts (TFM files only) and macro packages (including Texinfo and La@TeX{} 2e). It unpacks into @file{texmf/}; if you change the structure of this hierarchy, you will also have to change the default search paths (@pxref{Changing search paths}). It is required unless you already have these files, in which case you should -change the default paths as necessary to find them. +change the default paths as necessary to find them. There are other +packages of library files, @file{etexlib.tar.gz}, +@file{omegalib.tar.gz}, and @file{pdftexlib.tar.gz}, that are required +as well if you install e-@TeX{}, Omega, or pdf@TeX{} respectively. @item @file{@var{CTAN:}/systems/web2c/web.tar.gz} @cindex Knuth, Donald E., original author @@ -111,6 +113,24 @@ The Web2c system. Required. Also unpacks into @file{web2c-@var{version}}. +@item @file{@var{CTAN:}/systems/web2c/web2c-etex.tar.gz} +Additions to the Web2c system for building e-@TeX{}. Optional. Also +unpacks into @file{web2c-@var{version}}. + +@item @file{@var{CTAN:}/systems/web2c/web2c-omega.tar.gz} +Additions to the Web2c system for building Omega. Optional. Also +unpacks into @file{web2c-@var{version}}. + +@item @file{@var{CTAN:}/systems/web2c/web2c-pdftex.tar.gz} +Additions to the Web2c system for building pdf@TeX{}. Optional. Also +unpacks into @file{web2c-@var{version}}. + +@item @file{@var{CTAN:}/systems/web2c/texk.tar.gz} +The web and web2c sources, plus the additions for web2c, plus the dvi +drivers mentioned below, plus extra dvi drivers and tools not packaged +separately. Recommended if you want to build a complete system. +Unpacks into @file{texk-@var{version}}. + @c @item @file{@var{CTAN:}/systems/web2c/psfonts.tar.gz} @c Metrics, outlines, and bitmaps (for previewing) for the 35 de facto @c standard fonts donated by URW and the additional high-quality freely @@ -119,15 +139,15 @@ @c caps. Unpacks into @file{texmf}. Necessary for PostScript printing or @c previewing support. -@item @file{@var{CTAN:}/dviware/dvipsk.tar.gz} +@item @file{@var{CTAN:}/dviware/dvipsk/dvipsk.tar.gz} DVI-to-PostScript translator. Unpacks into @file{dvipsk-@var{version}}. Optional. -@item @file{@var{CTAN:}/dviware/xdvik.tar.gz} +@item @file{@var{CTAN:}/dviware/xdvik/xdvik.tar.gz} X window system DVI previewer. Unpacks into @file{xdvik-@var{version}}. Optional. -@item @file{@var{CTAN:}/dviware/dviljk.tar.gz} +@item @file{@var{CTAN:}/dviware/dviljk/dviljk.tar.gz} DVI-to-PCL (HP LaserJet) translator. Unpacks into @file{dviljk-@var{version}}. Optional. @end table @@ -159,11 +179,12 @@ @url{http://www.tug.org/tex-live.html}. @item -@cindex 4all@TeX{} Live CD-ROM -@cindex NTG -NTG (Dutch-speaking @TeX{} user group) produced the 4all@TeX{} CD-ROM; -email @email{ntg@@nic.surfnet.nl}, or see -@url{http://ei0.ei.ele.tue.nl/ntg/}. This is a runnable system. +@cindex Dante @TeX{} CD-ROM +@cindex German @TeX{} CD info +Dante (the German-speaking @TeX{} user group) has produced a CD-ROM. +See @url{http://www.dante.de/dante/DANTE-CTAN-CD-ROM.html}, and +@url{http://www.dante.de/tex-informationen/CD-ROMs.html} for +information about @TeX{} CD's in general. Both are in German. @item @cindex Free Software Foundation @@ -171,17 +192,27 @@ The Free Software Foundation's @cite{Source Code CD-ROM} contains the minimal @TeX{} source distribution described in the previous section (i.e., enough to print GNU documentation); email -@email{gnu@@prep.ai.mit.edu} or finger @email{fsf@@prep.ai.mit.edu}. +@email{gnu@@prep.ai.mit.edu}. @item The Gateway@! CD-ROM set contains a runnable NetBSD/Amiga distribution and sources; see @url{http://www.netbsd.org/Sites/cdroms.html}. @item +The InfoMagic CD-ROM is a copy of CTAN (see previous section); see +@url{http://www.infomagic.com}. + +@item +@cindex 4all@TeX{} Live CD-ROM +@cindex NTG +NTG (Dutch-speaking @TeX{} user group) produced the 4all@TeX{} CD-ROM; +email @email{ntg@@nic.surfnet.nl}, or see +@url{http://www.ntg.nl/4allcd/}. This is a runnable system. + +@item @cindex Prime Time @TeX{}cetera CD-ROM -The Prime Time @TeX{}cetera CD-ROM is a copy of CTAN (see the previous -section); email @email{ptf@@ctcl.com} or see -@url{http://www.ptf.com/ptf/}. +The Prime Time @TeX{}cetera CD-ROM is also a copy of CTAN; email +@email{ptf@@ctcl.com} or see @url{http://www.ptf.com/ptf/}. @item @cindex Walnut Creek @TeX{} CD-ROM
--- a/kpathsea/variable.c +++ b/kpathsea/variable.c @@ -37,6 +37,11 @@ if (ret) ret = kpse_var_expand (ret); +#ifdef KPSE_DEBUG + if (KPSE_DEBUG_P (KPSE_DEBUG_VARS)) + DEBUGF2("variable: %s = %s\n", var, ret ? ret : "(nil)"); +#endif + return ret; }
--- a/kpathsea/version.c +++ b/kpathsea/version.c @@ -1,4 +1,6 @@ -char *kpathsea_version_string = (char *) "kpathsea version 3.0"; +#include "c-auto.h" + +char *kpathsea_version_string = (char *) KPSEVERSION; /* If you are redistributing a modified version of my original distribution, please change this address.
new file mode 100644 --- /dev/null +++ b/kpathsea/win32lib.c @@ -0,0 +1,326 @@ +/* libc replacement functions for win32. + +Copyright (C) 1992, 93 Free Software Foundation, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* + This does make sense only under WIN32. + Functions: + - popen() rewritten + - pclose() rewritten + - stat() wrapper for _stat(), removing trailing slashes + */ + +#ifdef WIN32 + +#include <fcntl.h> +#include <kpathsea/config.h> +#include <kpathsea/c-pathch.h> +#include <kpathsea/c-pathmx.h> +#include <kpathsea/concatn.h> + +struct _popen_elt { + FILE *f; /* File stream returned */ + HANDLE hp; /* Handle of associated process */ + struct _popen_elt *next; /* Next list element */ +}; + +static struct _popen_elt _z = { NULL, 0, &_z }; +static struct _popen_elt *_popen_list = &_z; + +FILE *popen P2C(const_string, cmd, const_string, mode) +{ + STARTUPINFO si; + PROCESS_INFORMATION pi; + SECURITY_ATTRIBUTES sa = { sizeof(SECURITY_ATTRIBUTES), NULL, TRUE }; + FILE *f = NULL; + int fno, i; + HANDLE child_in, child_out; + HANDLE father_in, father_out; + HANDLE father_in_dup, father_out_dup; + HANDLE current_in, current_out; + HANDLE current_pid; + int binary_mode; + char *new_cmd, *app_name = NULL; + char *p, *q; + struct _popen_elt *new_process; + char pname[PATH_MAX], *fp; + char *suffixes[] = { ".bat", ".cmd", ".com", ".exe", NULL }; + char **s; + boolean go_on; + + /* We should look for the application name along the PATH, + and decide to prepend "%COMSPEC% /c " or not to the command line. + Do nothing for the moment. */ + + /* Another way to do that would be to try CreateProcess first without + invoking cmd, and look at the error code. If it fails because of + command not found, try to prepend "cmd /c" to the cmd line. + */ + + /* Look for the application name */ + for (p = cmd; *p && isspace(*p); p++); + if (*p == '"') { + q = ++p; + while(*p && *p != '"') p++; + if (*p != '\0') { + fprintf(stderr, "popen: malformed command (\" not terminated)\n"); + return NULL; + } + } + else + for (q = p; *p && !isspace(*p); p++); + /* q points to the beginning of appname, p to the last + 1 char */ + if ((app_name = malloc(p - q + 1)) == NULL) { + fprintf(stderr, "xpopen: malloc(app_name) failed.\n"); + return NULL; + } + strncpy(app_name, q, p - q ); + app_name[p - q] = '\0'; + pname[0] = '\0'; +#ifdef TRACE + fprintf(stderr, "popen: app_name = %s\n", app_name); +#endif + + /* Looking for appname on the path */ + for (s = suffixes, go_on = true; go_on; *s++) { + if (SearchPath(NULL, /* Address of search path */ + app_name, /* Address of filename */ + *s, /* Address of extension */ + PATH_MAX, /* Size of destination buffer */ + pname, /* Address of destination buffer */ + &fp) /* File part of app_name */ + != 0) { +#ifdef TRACE + fprintf(stderr, "%s found with suffix %s\n", app_name, *s); +#endif + new_cmd = xstrdup(cmd); + free(app_name); + app_name = xstrdup(pname); + break; + } + go_on = (*s != NULL); + } + if (go_on == false) { + /* the app_name was not found */ +#ifdef TRACE + fprintf(stderr, "%s not found, concatenating comspec\n", app_name); +#endif + new_cmd = concatn(getenv("COMSPEC"), " /c ", cmd, NULL); + free(app_name); + app_name = NULL; + } + else { + } +#ifdef TRACE + fprintf(stderr, "popen: app_name = %s\n", app_name); + fprintf(stderr, "popen: cmd_line = %s\n", new_cmd); +#endif + + current_in = GetStdHandle(STD_INPUT_HANDLE); + current_out = GetStdHandle(STD_OUTPUT_HANDLE); + current_pid = GetCurrentProcess(); + ZeroMemory( &si, sizeof(STARTUPINFO) ); + si.cb = sizeof(STARTUPINFO); + si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; + si.wShowWindow = SW_HIDE; + + if (strchr(mode, 'b')) + binary_mode = _O_BINARY; + else + binary_mode = _O_TEXT; + + /* Opening the pipe for writing */ + if (strchr(mode, 'w')) { + binary_mode |= _O_WRONLY; + if (CreatePipe(&child_in, &father_out, &sa, 0) == FALSE) { + fprintf(stderr, "popen: error CreatePipe\n"); + return NULL; + } +#if 0 + if (SetStdHandle(STD_INPUT_HANDLE, child_in) == FALSE) { + fprintf(stderr, "popen: error SetStdHandle child_in\n"); + return NULL; + } +#endif + si.hStdInput = child_in; + si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + si.hStdError = GetStdHandle(STD_ERROR_HANDLE); + + if (DuplicateHandle(current_pid, father_out, + current_pid, &father_out_dup, + 0, FALSE, DUPLICATE_SAME_ACCESS) == FALSE) { + fprintf(stderr, "popen: error DuplicateHandle father_out\n"); + return NULL; + } + CloseHandle(father_out); + fno = _open_osfhandle((long)father_out_dup, binary_mode); + f = _fdopen(fno, mode); + i = setvbuf( f, NULL, _IONBF, 0 ); + } + /* Opening the pipe for reading */ + else if (strchr(mode, 'r')) { + binary_mode |= _O_RDONLY; + if (CreatePipe(&father_in, &child_out, &sa, 0) == FALSE) { + fprintf(stderr, "popen: error CreatePipe\n"); + return NULL; + } +#if 0 + if (SetStdHandle(STD_OUTPUT_HANDLE, child_out) == FALSE) { + fprintf(stderr, "popen: error SetStdHandle child_out\n"); + return NULL; + } +#endif + si.hStdInput = GetStdHandle(STD_INPUT_HANDLE); + si.hStdOutput = child_out; + si.hStdError = GetStdHandle(STD_ERROR_HANDLE); + if (DuplicateHandle(current_pid, father_in, + current_pid, &father_in_dup, + 0, FALSE, DUPLICATE_SAME_ACCESS) == FALSE) { + fprintf(stderr, "popen: error DuplicateHandle father_in\n"); + return NULL; + } + CloseHandle(father_in); + fno = _open_osfhandle((long)father_in_dup, binary_mode); + f = _fdopen(fno, mode); + i = setvbuf( f, NULL, _IONBF, 0 ); + } + else { + fprintf(stderr, "popen: invalid mode %s\n", mode); + return NULL; + } + + /* creating child process */ + if (CreateProcess(app_name, /* pointer to name of executable module */ + new_cmd, /* pointer to command line string */ + NULL, /* pointer to process security attributes */ + NULL, /* pointer to thread security attributes */ + TRUE, /* handle inheritance flag */ + CREATE_NEW_CONSOLE, /* creation flags */ + NULL, /* pointer to environment */ + NULL, /* pointer to current directory */ + &si, /* pointer to STARTUPINFO */ + &pi /* pointer to PROCESS_INFORMATION */ + ) == FALSE) { + fprintf(stderr, "popen: CreateProcess %x\n", GetLastError()); + return NULL; + } + +#if 0 + /* Restoring saved values for stdin/stdout */ + if (SetStdHandle(STD_INPUT_HANDLE, current_in) == FALSE) + fprintf(stderr, "popen: error re-redirecting Stdin\n"); + if (SetStdHandle(STD_OUTPUT_HANDLE, current_out) == FALSE) + fprintf(stderr, "popen: error re-redirecting Stdout\n"); +#endif + /* Only the process handle is needed */ + if (CloseHandle(pi.hThread) == FALSE) { + fprintf(stderr, "popen: error closing thread handle\n"); + return NULL; + } + + if (new_cmd) free(new_cmd); + if (app_name) free(app_name); + +#if 0 + /* This does not seem to make sense for console apps */ + while (1) { + i = WaitForInputIdle(pi.hProcess, 5); /* Wait 5ms */ + if (i == 0xFFFFFFFF) { + fprintf(stderr, "popen: process can't initialize\n"); + return NULL; + } + else if (i == WAIT_TIMEOUT) + fprintf(stderr, "popen: warning, process still not initialized\n"); + else + break; + } +#endif + + /* Add the pair (f, pi.hProcess) to the list */ + if ((new_process = malloc(sizeof(struct _popen_elt))) == NULL) { + fprintf (stderr, "popen: malloc(new_process) error\n"); + return NULL; + } + /* Saving the FILE * pointer, access key for retrieving the process + handle later on */ + new_process->f = f; + /* Closing the unnecessary part of the pipe */ + if (strchr(mode, 'r')) { + CloseHandle(child_out); + } + else if (strchr(mode, 'w')) { + CloseHandle(child_in); + } + /* Saving the process handle */ + new_process->hp = pi.hProcess; + /* Linking it to the list of popen() processes */ + new_process->next = _popen_list; + _popen_list = new_process; + + return f; + +} + +int pclose P1C(FILE *, f) +{ + struct _popen_elt *p, *q; + int exit_code; + + /* Look for f is the access key in the linked list */ + for (q = NULL, p = _popen_list; + p != &_z && p->f != f; + q = p, p = p->next); + + if (p == &_z) { + fprintf(stderr, "pclose: error, file not found."); + return -1; + } + + /* Closing the FILE pointer */ + fclose(f); + + /* Waiting for the process to terminate */ + if (WaitForSingleObject(p->hp, INFINITE) != WAIT_OBJECT_0) { + fprintf(stderr, "pclose: error, process still active\n"); + return -1; + } + + /* retrieving the exit code */ + if (GetExitCodeProcess(p->hp, &exit_code) == 0) { + fprintf(stderr, "pclose: can't get process exit code\n"); + return -1; + } + + /* Closing the process handle, this will cause the system to + remove the process from memory */ + if (CloseHandle(p->hp) == FALSE) { + fprintf(stderr, "pclose: error closing process handle\n"); + return -1; + } + + /* remove the elt from the list */ + if (q != NULL) + q->next = p->next; + else + _popen_list = p->next; + free(p); + + return exit_code; +} + + +#endif
new file mode 100644 --- /dev/null +++ b/kpathsea/win32lib.h @@ -0,0 +1,141 @@ +/* System description file for Windows NT. + Copyright (C) 1997, 1998 Free Software Foundation, Inc. + +This file is part of Web2C. + +Web2C is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Web2C is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Web2C; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef KPATHSEA_WIN32LIB_H +#define KPATHSEA_WIN32LIB_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). */ + +#define access _access +#define alloca _alloca +#define chdir _chdir +#define chmod _chmod +#define close _close +#define creat _creat +#define dup _dup +#define dup2 _dup2 +#define execlp _execlp +#define execvp _execvp +#define fdopen _fdopen +#define fileno _fileno +#define getpid _getpid +#define getwd(dir) GetCurrentDirectory(MAXPATHLEN, dir) +#define index strchr +#define isatty _isatty +#define itoa _itoa +#define link _link +#define lseek _lseek +#define mkdir _mkdir +#define mktemp _mktemp +#define open _open +#define pipe _pipe +#if 0 +#define popen _popen +#define pclose _pclose +#endif +#define putenv _putenv +#define read _read +#define rmdir _rmdir +#define setmode _setmode +#define spawnlp _spawnlp +#define stat _stat +#define strcasecmp _stricmp +#define strdup _strdup +#define strncasecmp _strnicmp +#define unlink _unlink +#define umask _umask +#define utime _utime +#define write _write + +#define S_IFMT _S_IFMT +#define S_IFDIR _S_IFDIR +#define S_IFCHR _S_IFCHR +#define S_IFIFO _S_IFIFO +#define S_IFREG _S_IFREG +#define S_IREAD _S_IREAD +#define S_IWRITE _S_IWRITE +#define S_IEXEC _S_IEXEC +#define S_IXUSR _S_IEXEC +#define S_IXGRP _S_IEXEC +#define S_IXOTH _S_IEXEC +#define S_IRUSR _S_IREAD +#define S_IWUSR _S_IWRITE +#define O_RDWR _O_RDWR +#define O_CREAT _O_CREAT +#define O_TRUNC _O_TRUNC +#define O_RDONLY _O_RDONLY +#define O_WRONLY _O_WRONLY +#define O_APPEND _O_APPEND +#define O_TEXT _O_TEXT +#define O_BINARY _O_BINARY + +/* 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. */ +#define _WINSOCKAPI_ 1 + +#include <windows.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> + +/* Web2C takes care of ensuring that these are defined. */ +#ifdef max +#undef max +#undef min +#endif + +/* Functions from win32lib.c */ +extern FILE *popen(const char *, const char *); +extern int pclose(FILE *); + +/* ============================================================ */ + +#endif /* not KPATHSEA_WIN32LIB_H */
--- a/kpathsea/withenable.ac +++ b/kpathsea/withenable.ac @@ -1,20 +1,81 @@ dnl withenable.ac: --with and --enable options. -AC_ARG_WITH(maketexmf-default, -[ --without-maketexmf-default do not run MakeTeXMF if MF source missing], - , enableval=yes) -if test $enableval = yes; then +AC_ARG_WITH(mktexmf-default, +[ --without-mktexmf-default do not run mktexmf if MF source missing], + , withval=yes) +if test "x$withval" = xyes; then AC_DEFINE(MAKE_TEX_MF_BY_DEFAULT) fi -AC_ARG_WITH(maketexpk-default, -[ --without-maketexpk-default do not run MakeTeXPK if PK font missing], - , enableval=yes) -if test $enableval = yes; then +AC_ARG_WITH(mktexpk-default, +[ --without-mktexpk-default do not run mktexpk if PK font missing], + , withval=yes) +if test "x$withval" = xyes; then AC_DEFINE(MAKE_TEX_PK_BY_DEFAULT) fi -AC_ARG_WITH(maketextfm-default, -[ --without-maketextfm-default do not run MakeTeXTFM if TFM file missing], - , enableval=yes) -if test $enableval = yes; then +AC_ARG_WITH(mktextfm-default, +[ --without-mktextfm-default do not run mktextfm if TFM file missing], + , withval=yes) +if test "x$withval" = xyes; then AC_DEFINE(MAKE_TEX_TFM_BY_DEFAULT) fi +AC_ARG_WITH(mkocp-default, +[ --without-mkocp-default do not run mkocp if OCP file missing], + , withval=yes) +if test "x$withval" = xyes; then + AC_DEFINE(MAKE_OMEGA_OCP_BY_DEFAULT) +fi +AC_ARG_WITH(mkofm-default, +[ --without-mkofm-default do not run mkofm if OFM file missing], + , withval=yes) +if test "x$withval" = xyes; then + AC_DEFINE(MAKE_OMEGA_OFM_BY_DEFAULT) +fi + +dnl The --enable-multiplatform option. +AC_CANONICAL_HOST +AC_ARG_ENABLE(multiplatform, +[ --enable-multiplatform put executables in bin/PLATFORM], +if test "x$enable_multiplatform" = xyes && + test "x$bindir" = 'x${exec_prefix}/bin' +then + bindir="$bindir/$host" +fi) + +dnl Check whether we can find a texmf tree. Look at the most common spots. +dnl Not a switch, but something that must be included everywhere, even at +dnl at the top level, so putting it in common.ac is not enough. +AC_MSG_CHECKING(where the main texmf tree is located) +texmfmain= +if test "x$datadir" != 'x${prefix}/share'; then + # First case, datadir is defined... + eval p=\"$datadir\" + if test -d "$p/texmf"; then + texmfmain="$p/texmf" + fi +else + # Second case, datadir is default... + if test "x$prefix" = "xNONE"; then + p="$ac_default_prefix" + else + eval p=\"$prefix\" + fi + for e in share/texmf lib/texmf texmf; do + if test -d "$p/$e"; then + texmfmain="$p/$e" + break + fi + done +fi +texmfmain=`echo "$texmfmain" | sed 's,//*,/,g'` +if test -n "$texmfmain"; then + AC_MSG_RESULT("$texmfmain") +else + AC_MSG_RESULT([not found]) + AC_MSG_WARN([The main texmf tree was not found. + Specify the location of its parent directory with the --datadir option. + If you do not have the files, you can retrieve a minimal set from + ftp://ftp.tug.org/tex/texmflib.tar.gz, which is mirrored on CTAN hosts + in systems/web2c. Winging it by using the default location.]) + texmfmain="$datadir/texmf" +fi +AC_SUBST(texmfmain)
--- a/kpathsea/xgetcwd.c +++ b/kpathsea/xgetcwd.c @@ -19,9 +19,9 @@ #include <kpathsea/config.h> -#ifdef HAVE_GETWD +#if defined (HAVE_GETCWD) || defined (HAVE_GETWD) #include <kpathsea/c-pathmx.h> -#else /* not HAVE_GETWD */ +#else /* not HAVE_GETCWD && not HAVE_GETWD*/ #include <kpathsea/c-dir.h> #include <kpathsea/xopendir.h> #include <kpathsea/xstat.h> @@ -34,7 +34,7 @@ FATAL_PERROR (dirname); } -#endif /* not HAVE_GETWD */ +#endif /* not HAVE_GETCWD && not HAVE_GETWD */ /* Return the pathname of the current directory, or give a fatal error. */ @@ -42,10 +42,23 @@ string xgetcwd P1H(void) { - /* If the system provides getwd, use it. But don't use getcwd; that - forks a process on some systems, which is far more expensive than - all the stat calls we make figuring out the cwd. */ -#ifdef HAVE_GETWD + /* 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) + string path = xmalloc (PATH_MAX + 1); + + if (getcwd (path, PATH_MAX + 1) == 0) + { + fprintf (stderr, "getcwd: %s", path); + exit (1); + } + + return path; +#elif defined (HAVE_GETWD) string path = xmalloc (PATH_MAX + 1); if (getwd (path) == 0) @@ -55,7 +68,7 @@ } return path; -#else /* not HAVE_GETWD */ +#else /* not HAVE_GETCWD && not HAVE_GETWD */ struct stat root_stat, cwd_stat; string cwd_path = xmalloc (2); /* In case we assign "/" below. */ @@ -112,6 +125,29 @@ /* 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_GETWD */ +#endif /* not HAVE_GETCWD && not HAVE_GETWD */ }
--- a/kpathsea/xmalloc.c +++ b/kpathsea/xmalloc.c @@ -16,16 +16,12 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Don't include config.h or all our other usual includes, since - it's useful to just throw this file into other programs. */ - #include <stdio.h> -extern char *malloc (); +#include <kpathsea/config.h> void * -xmalloc (size) - unsigned size; +xmalloc P1C(unsigned, size) { void *new_mem = (void *) malloc (size);
--- a/kpathsea/xputenv.c +++ b/kpathsea/xputenv.c @@ -1,6 +1,6 @@ /* xputenv.c: set an environment variable without return. -Copyright (C) 1993, 94, 95, 96 Karl Berry. +Copyright (C) 1993, 94, 95, 96, 97, 98 Karl Berry. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -41,13 +41,16 @@ void xputenv P2C(const_string, var_name, const_string, value) { - static const_string *saved_env_items = NULL; - static unsigned saved_len; string old_item = NULL; string new_item = concat3 (var_name, "=", value); + unsigned name_len = strlen (var_name); + +#ifndef SMART_PUTENV + + static const_string *saved_env_items = NULL; + static unsigned saved_len; boolean found = false; -#ifndef SMART_PUTENV /* Check if we have saved anything yet. */ if (!saved_env_items) { @@ -59,7 +62,6 @@ { /* Check if we've assigned VAR_NAME before. */ unsigned i; - unsigned len = strlen (var_name); for (i = 0; i < saved_len && !found; i++) { if (STREQ (saved_env_items[i], var_name)) @@ -72,16 +74,16 @@ is not made between the value being "" or the variable not set. */ if (old_item) - old_item -= (len + 1); + old_item -= (name_len + 1); #else assert (old_item); /* Back up to the `NAME=' in the environment before the value that getenv returns. */ - old_item -= (len + 1); + old_item -= (name_len + 1); #endif } } - + if (!found) { /* If we haven't seen VAR_NAME before, save it. Assume it is @@ -93,17 +95,35 @@ } #endif /* not SMART_PUTENV */ - /* As far as I can see there's no way to distinguish between the - various errors; putenv doesn't have errno values. */ - if (putenv (new_item) < 0) - FATAL1 ("putenv (%s) failed", new_item); - + /* If the old and the new values are identical, don't do anything. + This is both more memory-efficient and safer as far as our + assumptions (about how putenv is implemented in libc) go. */ + if (!old_item || !STREQ (old_item, new_item)) + { + char *new_val; + /* As far as I can see there's no way to distinguish between the + various errors; putenv doesn't have errno values. */ + if (putenv (new_item) < 0) + FATAL1 ("putenv (%s) failed", new_item); + + /* If their putenv copied `new_item', we can free it. */ + new_val = getenv (var_name); + if (new_val && new_val - name_len - 1 != new_item) + free (new_item); + #ifndef SMART_PUTENV - /* Can't free `new_item' because its contained value is now in - `environ', but we can free `old_item', since it's been replaced. */ - if (old_item) - free (old_item); + /* Can't free `new_item' because its contained value is now in + `environ', but we can free `old_item', since it's been replaced. */ +#ifdef WIN32 + /* ... except on Win32, where old_item points to garbage if we set the + variable to "". So we recognize this special case. */ + if (old_item && value && *value) +#else + if (old_item) +#endif + free (old_item); #endif /* not SMART_PUTENV */ + } }
--- a/kpathsea/xrealloc.c +++ b/kpathsea/xrealloc.c @@ -16,19 +16,13 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Don't include config.h or all our other usual includes, since - it's useful to just throw this file into other programs. */ +#include <stdio.h> +#include <kpathsea/config.h> -#include <stdio.h> -extern char *realloc (); - - -extern void *xmalloc (); +extern void *xmalloc P1H(unsigned); void * -xrealloc (old_ptr, size) - void *old_ptr; - unsigned size; +xrealloc P2C(void *, old_ptr, unsigned, size) { void *new_mem;