From 095b437301aec4df44d136ed1af96aafda130aad Mon Sep 17 00:00:00 2001
From: Luigi Scarso <luigi.scarso@gmail.com>
Date: Wed, 31 Jan 2018 17:47:28 +0000
Subject: [PATCH] sync trunk with TeXLive to revision 46500.

---
 source/build-aux/config.guess            | 475 ++++++++++++-----------
 source/libs/README                       |   4 +-
 source/m4/kpse-pkgs.m4                   |   2 +-
 source/texk/README                       |   4 +-
 source/texk/kpathsea/ChangeLog           |  26 +-
 source/texk/kpathsea/kpsewhich.c         |   6 +-
 source/texk/kpathsea/pathsearch.c        | 196 +++++-----
 source/texk/kpathsea/readable.c          | 137 ++++---
 source/texk/kpathsea/readable.h          |  10 +-
 source/texk/kpathsea/str-list.c          |  85 ++--
 source/texk/kpathsea/str-list.h          |   9 +-
 source/texk/kpathsea/tex-file.c          |  96 ++---
 source/texk/web2c/ChangeLog              |   5 +
 source/texk/web2c/Makefile.am            |   2 +-
 source/texk/web2c/Makefile.in            | 217 ++++++-----
 source/texk/web2c/configure              |   4 +-
 source/texk/web2c/configure.ac           |   4 +-
 source/texk/web2c/cwebboot.cin           |   2 +-
 source/texk/web2c/cwebdir/ChangeLog      |   8 +
 source/texk/web2c/cwebdir/common.c       |   2 +-
 source/texk/web2c/cwebdir/common.w       |   2 +-
 source/texk/web2c/cwebdir/cweave.w       |   2 +-
 source/texk/web2c/euptexdir/am/euptex.am |   2 +-
 source/texk/web2c/man/ChangeLog          |   4 +
 source/texk/web2c/man/mf.man             |  15 +-
 source/texk/web2c/omegafonts/Makefile.in |   5 +
 source/texk/web2c/otps/Makefile.in       |   5 +
 source/texk/web2c/otps/win32/Makefile.in |   5 +
 source/texk/web2c/pmpostdir/am/pmpost.am |   1 +
 source/texk/web2c/synctexdir/ChangeLog   |   4 +
 source/texk/web2c/tiedir/ChangeLog       |   5 +
 source/texk/web2c/tiedir/tie.w           |   6 +-
 source/texk/web2c/uptexdir/am/uptex.am   |  11 +-
 source/texk/web2c/window/Makefile.in     |   5 +
 source/texk/web2c/xetexdir/am/xetex.am   |   3 +-
 source/utils/README                      |   4 +-
 36 files changed, 725 insertions(+), 648 deletions(-)

diff --git a/source/build-aux/config.guess b/source/build-aux/config.guess
index a710e2faf..9baaa270b 100755
--- a/source/build-aux/config.guess
+++ b/source/build-aux/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2018-01-11'
+timestamp='2018-01-26'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
+ ,,)    echo "int x;" > "$dummy.c" ;
 	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
 	     CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
 	# If the system lacks a compiler, then just pick glibc.
 	# We could probably try harder.
 	LIBC=gnu
 
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
+	eval "$set_cc_for_build"
+	cat <<-EOF > "$dummy.c"
 	#include <features.h>
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+	# If ldd exists, use it to detect musl libc.
+	if command -v ldd >/dev/null && \
+		ldd --version 2>&1 | grep -q ^musl
+	then
+	    LIBC=musl
+	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
 	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-	    /sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || \
+	    "/sbin/$sysctl" 2>/dev/null || \
+	    "/usr/sbin/$sysctl" 2>/dev/null || \
 	    echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
 	    earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-unknown
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine="${arch}${endian}"-unknown
 		;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	    *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently (or will in the future) and ABI.
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    earm*)
 		os=netbsdelf
 		;;
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
+		eval "$set_cc_for_build"
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
 		then
@@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		;;
 	esac
 	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
+	case "$UNAME_MACHINE_ARCH" in
 	    earm*)
 		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
 		;;
 	esac
 	# The OS release
@@ -219,51 +226,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# thus, need a distinct triplet. However, they do not need
 	# kernel version information, so it can be replaced with a
 	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
+	case "$UNAME_VERSION" in
 	    Debian*)
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}${abi}"
+	echo "$machine-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
 	exit ;;
     *:OpenBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
 	exit ;;
     *:LibertyBSD:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
 	exit ;;
     *:MidnightBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-midnightbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
 	exit ;;
     *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
 	exit ;;
     *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
 	exit ;;
     macppc:MirBSD:*:*)
-	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
     *:Sortix:*:*)
-	echo ${UNAME_MACHINE}-unknown-sortix
+	echo "$UNAME_MACHINE"-unknown-sortix
 	exit ;;
     *:Redox:*:*)
-	echo ${UNAME_MACHINE}-unknown-redox
+	echo "$UNAME_MACHINE"-unknown-redox
 	exit ;;
     mips:OSF1:*.*)
         echo mips-dec-osf1
@@ -319,7 +326,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# 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 ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
@@ -328,10 +335,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo m68k-unknown-sysv4
 	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
+	echo "$UNAME_MACHINE"-unknown-amigaos
 	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
+	echo "$UNAME_MACHINE"-unknown-morphos
 	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
@@ -343,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo powerpc-ibm-os400
 	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
+	echo arm-acorn-riscix"$UNAME_RELEASE"
 	exit ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
 	echo arm-unknown-riscos
@@ -370,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
     s390x:SunOS:*:*)
-	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
 	exit ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-	echo i386-pc-auroraux${UNAME_RELEASE}
+	echo i386-pc-auroraux"$UNAME_RELEASE"
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	eval $set_cc_for_build
+	eval "$set_cc_for_build"
 	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -395,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		SUN_ARCH=x86_64
 	    fi
 	fi
-	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
@@ -410,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		;;
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
 	exit ;;
     sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
+	echo m68k-sun-sunos"$UNAME_RELEASE"
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
+		echo m68k-sun-sunos"$UNAME_RELEASE"
 		;;
 	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
+		echo sparc-sun-sunos"$UNAME_RELEASE"
 		;;
 	esac
 	exit ;;
     aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
+	echo sparc-auspex-sunos"$UNAME_RELEASE"
 	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
@@ -439,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
+	echo m68k-atari-mint"$UNAME_RELEASE"
 	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-	echo m68k-milan-mint${UNAME_RELEASE}
+	echo m68k-milan-mint"$UNAME_RELEASE"
 	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-	echo m68k-hades-mint${UNAME_RELEASE}
+	echo m68k-hades-mint"$UNAME_RELEASE"
 	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-	echo m68k-unknown-mint${UNAME_RELEASE}
+	echo m68k-unknown-mint"$UNAME_RELEASE"
 	exit ;;
     m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
+	echo m68k-apple-machten"$UNAME_RELEASE"
 	exit ;;
     powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
+	echo powerpc-apple-machten"$UNAME_RELEASE"
 	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
 	exit ;;
     RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
+	echo mips-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
+	echo vax-dec-ultrix"$UNAME_RELEASE"
 	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
+	echo clipper-intergraph-clix"$UNAME_RELEASE"
 	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
 	int main (int argc, char *argv[]) {
@@ -497,11 +504,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
 	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
+	echo mips-mips-riscos"$UNAME_RELEASE"
 	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
@@ -527,17 +534,17 @@ EOF
     AViiON:dgux:*:*)
 	# DG/UX returns AViiON for all architectures
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
 	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+	       [ "$TARGET_BINARY_INTERFACE"x = x ]
 	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
+		echo m88k-dg-dgux"$UNAME_RELEASE"
 	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+		echo m88k-dg-dguxbcs"$UNAME_RELEASE"
 	    fi
 	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
+	    echo i586-dg-dgux"$UNAME_RELEASE"
 	fi
 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
@@ -554,7 +561,7 @@ EOF
 	echo m68k-tektronix-bsd
 	exit ;;
     *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
 	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
 	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
@@ -566,14 +573,14 @@ EOF
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
+		eval "$set_cc_for_build"
+		sed 's/^		//' << EOF > "$dummy.c"
 		#include <sys/systemcfg.h>
 
 		main()
@@ -584,7 +591,7 @@ EOF
 			exit(0);
 			}
 EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
 		then
 			echo "$SYSTEM_NAME"
 		else
@@ -598,7 +605,7 @@ EOF
 	exit ;;
     *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
 	else
 		IBM_ARCH=powerpc
@@ -607,9 +614,9 @@ EOF
 		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
 			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+		IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
 	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
 	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
@@ -618,7 +625,7 @@ EOF
 	echo romp-ibm-bsd4.4
 	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
 	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
@@ -633,28 +640,28 @@ EOF
 	echo m68k-hp-bsd4.4
 	exit ;;
     9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	case "$UNAME_MACHINE" in
 	    9000/31?)            HP_ARCH=m68000 ;;
 	    9000/[34]??)         HP_ARCH=m68k ;;
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-		    case "${sc_cpu_version}" in
+		    case "$sc_cpu_version" in
 		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
 		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
-			case "${sc_kernel_bits}" in
+			case "$sc_kernel_bits" in
 			  32) HP_ARCH=hppa2.0n ;;
 			  64) HP_ARCH=hppa2.0w ;;
 			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^		//' << EOF >$dummy.c
+		if [ "$HP_ARCH" = "" ]; then
+		    eval "$set_cc_for_build"
+		    sed 's/^		//' << EOF > "$dummy.c"
 
 		#define _HPUX_SOURCE
 		#include <stdlib.h>
@@ -687,13 +694,13 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = hppa2.0w ]
+	if [ "$HP_ARCH" = hppa2.0w ]
 	then
-	    eval $set_cc_for_build
+	    eval "$set_cc_for_build"
 
 	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
 	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -712,15 +719,15 @@ EOF
 		HP_ARCH=hppa64
 	    fi
 	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
 	exit ;;
     ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
+	HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux"$HPUX_REV"
 	exit ;;
     3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 	#include <unistd.h>
 	int
 	main ()
@@ -745,7 +752,7 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
 		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
 	exit ;;
@@ -766,9 +773,9 @@ EOF
 	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	    echo "$UNAME_MACHINE"-unknown-osf1mk
 	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
+	    echo "$UNAME_MACHINE"-unknown-osf1
 	fi
 	exit ;;
     parisc*:Lites*:*:*)
@@ -793,109 +800,109 @@ EOF
 	echo c4-convex-bsd
 	exit ;;
     CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     5000:UNIX_System_V:4.*:*)
 	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
 	exit ;;
     sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	echo sparc-unknown-bsdi"$UNAME_RELEASE"
 	exit ;;
     *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
 	exit ;;
     *:FreeBSD:*:*)
 	UNAME_PROCESSOR=`/usr/bin/uname -p`
-	case ${UNAME_PROCESSOR} in
+	case "$UNAME_PROCESSOR" in
 	    amd64)
 		UNAME_PROCESSOR=x86_64 ;;
 	    i386)
 		UNAME_PROCESSOR=i586 ;;
 	esac
-	echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
 	exit ;;
     i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
+	echo "$UNAME_MACHINE"-pc-cygwin
 	exit ;;
     *:MINGW64*:*)
-	echo ${UNAME_MACHINE}-pc-mingw64
+	echo "$UNAME_MACHINE"-pc-mingw64
 	exit ;;
     *:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
+	echo "$UNAME_MACHINE"-pc-mingw32
 	exit ;;
     *:MSYS*:*)
-	echo ${UNAME_MACHINE}-pc-msys
+	echo "$UNAME_MACHINE"-pc-msys
 	exit ;;
     i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
+	echo "$UNAME_MACHINE"-pc-pw32
 	exit ;;
     *:Interix*:*)
-	case ${UNAME_MACHINE} in
+	case "$UNAME_MACHINE" in
 	    x86)
-		echo i586-pc-interix${UNAME_RELEASE}
+		echo i586-pc-interix"$UNAME_RELEASE"
 		exit ;;
 	    authenticamd | genuineintel | EM64T)
-		echo x86_64-unknown-interix${UNAME_RELEASE}
+		echo x86_64-unknown-interix"$UNAME_RELEASE"
 		exit ;;
 	    IA64)
-		echo ia64-unknown-interix${UNAME_RELEASE}
+		echo ia64-unknown-interix"$UNAME_RELEASE"
 		exit ;;
 	esac ;;
     i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
+	echo "$UNAME_MACHINE"-pc-uwin
 	exit ;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
 	echo x86_64-unknown-cygwin
 	exit ;;
     prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
 	exit ;;
     i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
+	echo "$UNAME_MACHINE"-pc-minix
 	exit ;;
     aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -909,63 +916,63 @@ EOF
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     arm*:Linux:*:*)
-	eval $set_cc_for_build
+	eval "$set_cc_for_build"
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	    echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+		echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
 	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
 	exit ;;
     crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
 	exit ;;
     e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     k1om:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
+	eval "$set_cc_for_build"
+	sed 's/^	//' << EOF > "$dummy.c"
 	#undef CPU
 	#undef ${UNAME_MACHINE}
 	#undef ${UNAME_MACHINE}el
@@ -979,70 +986,70 @@ EOF
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+	test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
 	;;
     mips64el:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-${LIBC}
+	echo or1k-unknown-linux-"$LIBC"
 	exit ;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-${LIBC}
+	echo sparc-unknown-linux-"$LIBC"
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-${LIBC}
+	echo hppa64-unknown-linux-"$LIBC"
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	  PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+	  PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+	  *)    echo hppa-unknown-linux-"$LIBC" ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-${LIBC}
+	echo powerpc64-unknown-linux-"$LIBC"
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-${LIBC}
+	echo powerpc-unknown-linux-"$LIBC"
 	exit ;;
     ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-${LIBC}
+	echo powerpc64le-unknown-linux-"$LIBC"
 	exit ;;
     ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-${LIBC}
+	echo powerpcle-unknown-linux-"$LIBC"
 	exit ;;
     riscv32:Linux:*:* | riscv64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
 	exit ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
 	exit ;;
     xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1056,34 +1063,34 @@ EOF
 	# 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}
+	echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
 	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
+	echo "$UNAME_MACHINE"-pc-os2-emx
 	exit ;;
     i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
+	echo "$UNAME_MACHINE"-unknown-stop
 	exit ;;
     i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
+	echo "$UNAME_MACHINE"-unknown-atheos
 	exit ;;
     i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
+	echo "$UNAME_MACHINE"-pc-syllable
 	exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
+	echo i386-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	echo "$UNAME_MACHINE"-pc-msdosdjgpp
 	exit ;;
     i*86:*:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+		echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
 	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+		echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
 	fi
 	exit ;;
     i*86:*:5:[678]*)
@@ -1093,12 +1100,12 @@ EOF
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
 	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+		echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
 	elif /bin/uname -X 2>/dev/null >/dev/null ; then
 		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1108,9 +1115,9 @@ EOF
 			&& UNAME_MACHINE=i686
 		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+		echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
 	else
-		echo ${UNAME_MACHINE}-pc-sysv32
+		echo "$UNAME_MACHINE"-pc-sysv32
 	fi
 	exit ;;
     pc:*:*:*)
@@ -1130,9 +1137,9 @@ EOF
 	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	  echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	  echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
 	fi
 	exit ;;
     mini*:CTIX:SYS*5:*)
@@ -1152,9 +1159,9 @@ EOF
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 	  && { echo i486-ncr-sysv4; exit; } ;;
@@ -1163,28 +1170,28 @@ EOF
 	test -r /etc/.relid \
 	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	echo m68k-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit ;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	echo sparc-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	echo rs6000-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	echo powerpc-unknown-lynxos"$UNAME_RELEASE"
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
+	echo mips-dde-sysv"$UNAME_RELEASE"
 	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
@@ -1195,7 +1202,7 @@ EOF
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
+		echo "$UNAME_MACHINE"-sni-sysv4
 	else
 		echo ns32k-sni-sysv
 	fi
@@ -1215,23 +1222,23 @@ EOF
 	exit ;;
     i*86:VOS:*:*)
 	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
+	echo "$UNAME_MACHINE"-stratus-vos
 	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
 	exit ;;
     mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
+	echo m68k-apple-aux"$UNAME_RELEASE"
 	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
 	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-		echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv"$UNAME_RELEASE"
 	else
-		echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv"$UNAME_RELEASE"
 	fi
 	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
@@ -1250,39 +1257,39 @@ EOF
 	echo x86_64-unknown-haiku
 	exit ;;
     SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
+	echo sx4-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
+	echo sx5-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
+	echo sx6-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-7:SUPER-UX:*:*)
-	echo sx7-nec-superux${UNAME_RELEASE}
+	echo sx7-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-8:SUPER-UX:*:*)
-	echo sx8-nec-superux${UNAME_RELEASE}
+	echo sx8-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-8R:SUPER-UX:*:*)
-	echo sx8r-nec-superux${UNAME_RELEASE}
+	echo sx8r-nec-superux"$UNAME_RELEASE"
 	exit ;;
     SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux${UNAME_RELEASE}
+	echo sxace-nec-superux"$UNAME_RELEASE"
 	exit ;;
     Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	echo powerpc-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	eval $set_cc_for_build
+	eval "$set_cc_for_build"
 	if test "$UNAME_PROCESSOR" = unknown ; then
 	    UNAME_PROCESSOR=powerpc
 	fi
-	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
 	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
@@ -1310,7 +1317,7 @@ EOF
 	    # that Apple uses in portable devices.
 	    UNAME_PROCESSOR=x86_64
 	fi
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
@@ -1318,25 +1325,25 @@ EOF
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
 	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
 	exit ;;
     NEO-*:NONSTOP_KERNEL:*:*)
-	echo neo-tandem-nsk${UNAME_RELEASE}
+	echo neo-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSE-*:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
+	echo nse-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSR-*:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
+	echo nsr-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSV-*:NONSTOP_KERNEL:*:*)
-	echo nsv-tandem-nsk${UNAME_RELEASE}
+	echo nsv-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     NSX-*:NONSTOP_KERNEL:*:*)
-	echo nsx-tandem-nsk${UNAME_RELEASE}
+	echo nsx-tandem-nsk"$UNAME_RELEASE"
 	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
@@ -1345,7 +1352,7 @@ EOF
 	echo bs2000-siemens-sysv
 	exit ;;
     DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
 	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
@@ -1356,7 +1363,7 @@ EOF
 	else
 	    UNAME_MACHINE="$cputype"
 	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
+	echo "$UNAME_MACHINE"-unknown-plan9
 	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
@@ -1377,14 +1384,14 @@ EOF
 	echo pdp10-unknown-its
 	exit ;;
     SEI:*:*:SEIUX)
-	echo mips-sei-seiux${UNAME_RELEASE}
+	echo mips-sei-seiux"$UNAME_RELEASE"
 	exit ;;
     *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
 	exit ;;
     *:*VMS:*:*)
 	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
+	case "$UNAME_MACHINE" in
 	    A*) echo alpha-dec-vms ; exit ;;
 	    I*) echo ia64-dec-vms ; exit ;;
 	    V*) echo vax-dec-vms ; exit ;;
@@ -1393,16 +1400,16 @@ EOF
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+	echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
 	exit ;;
     i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
+	echo "$UNAME_MACHINE"-pc-rdos
 	exit ;;
     i*86:AROS:*:*)
-	echo ${UNAME_MACHINE}-pc-aros
+	echo "$UNAME_MACHINE"-pc-aros
 	exit ;;
     x86_64:VMkernel:*:*)
-	echo ${UNAME_MACHINE}-unknown-esx
+	echo "$UNAME_MACHINE"-unknown-esx
 	exit ;;
     amd64:Isilon\ OneFS:*:*)
 	echo x86_64-unknown-onefs
@@ -1411,7 +1418,7 @@ esac
 
 echo "$0: unable to guess system type" >&2
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
     mips:Linux | mips64:Linux)
 	# If we got here on MIPS GNU/Linux, output extra information.
 	cat >&2 <<EOF
@@ -1453,10 +1460,10 @@ hostinfo               = `(hostinfo) 2>/dev/null`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
 EOF
 
 exit 1
diff --git a/source/libs/README b/source/libs/README
index 35846eaeb..78855c5dc 100644
--- a/source/libs/README
+++ b/source/libs/README
@@ -1,4 +1,4 @@
-$Id: README 46290 2018-01-12 18:35:28Z karl $
+$Id: README 46498 2018-01-31 01:11:59Z kakuto $
 Public domain.  Originally created by Karl Berry, 2005.
 
 Libraries we compile for TeX Live.
@@ -24,7 +24,7 @@ gmp 6.1.2 - checked 16dec16
 graphite2 1.3.10 - checked 20jun17
   http://sourceforge.net/projects/silgraphite/files/graphite2/
 
-harfbuzz 1.7.4 - checked 20dec17
+harfbuzz 1.7.5 - checked 31jan18
   http://www.freedesktop.org/software/harfbuzz/release/
 
 icu 60.2 - checked 11jan18
diff --git a/source/m4/kpse-pkgs.m4 b/source/m4/kpse-pkgs.m4
index 35f5c0355..55f8d127b 100644
--- a/source/m4/kpse-pkgs.m4
+++ b/source/m4/kpse-pkgs.m4
@@ -1,4 +1,4 @@
-# $Id: kpse-pkgs.m4 39962 2016-03-07 19:26:54Z karl $
+# $Id: kpse-pkgs.m4 46348 2018-01-17 18:00:12Z lscarso $
 # Private Autoconf macros for the TeX Live (TL) tree.
 # Copyright 2016 Karl Berry <tex-live@tug.org>
 # Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
diff --git a/source/texk/README b/source/texk/README
index 3a0857c97..735824595 100644
--- a/source/texk/README
+++ b/source/texk/README
@@ -1,4 +1,4 @@
-$Id: README 43927 2017-04-19 22:27:13Z karl $
+$Id: README 46352 2018-01-17 22:50:15Z karl $
 Copyright 2006-2017 TeX Users Group.
 You may freely use, modify and/or distribute this file.
 
@@ -58,7 +58,7 @@ dvipos - ?
 
 dvipsk - maintained here, by us
 
-dvisvgm 2.1.3 - checked 21feb17
+dvisvgm 2.3.1 - checked 13jan18
   http://dvisvgm.bplaced.net/Downloads
 
 gregorio 5.0.1 - checked 16apr17
diff --git a/source/texk/kpathsea/ChangeLog b/source/texk/kpathsea/ChangeLog
index ad1756b46..52b4e79b6 100644
--- a/source/texk/kpathsea/ChangeLog
+++ b/source/texk/kpathsea/ChangeLog
@@ -1,6 +1,30 @@
+2018-01-27  Karl Berry  <karl@freefriends.org>
+
+	* readable.h: doc fixes.
+	* readable.c (READABLE): take (ignored) kpse arg in macro, so:
+	(kpathsea_readable_file): we can avoid #ifdefs in body.
+
+	* str-list.c (str_list_concat_elements): reformat for consistency.
+
+	* str-list.h (STR_LIST_EMPTY, STR_LIST_FIRST_ELT): new macros.
+	* kpsewhich.c,
+	* pathsearch.c,
+	* str-list.c (str_list_concat_elements): use them.
+
+2018-01-26  Karl Berry  <karl@freefriends.org>
+
+	* tex-file.c (kpathsea_init_format_return_varlist): log a newline
+	before kpse_cnf_format, since this happens mid-search.
+
+2018-01-25  Karl Berry  <karl@freefriends.org>
+
+	* pathsearch.c: more consistent code formatting, doc fixes.
+	No functional code changes.
+
 2018-01-17  Norbert Preining  <norbert@preining.info>
 
-	* mktexlsr (treefile): use mktemp with fallback option for temporary file.
+	* mktexlsr (treefile): use mktemp with fallback option for
+	temporary file.
 
 2018-01-16  Karl Berry  <karl@freefriends.org>
 
diff --git a/source/texk/kpathsea/kpsewhich.c b/source/texk/kpathsea/kpsewhich.c
index 4271bc1a3..41862d7ba 100644
--- a/source/texk/kpathsea/kpsewhich.c
+++ b/source/texk/kpathsea/kpsewhich.c
@@ -1,7 +1,7 @@
 /* kpsewhich -- standalone path lookup and variable expansion for Kpathsea.
    Ideas from Thomas Esser, Pierre MacKay, and many others.
 
-   Copyright 1995-2017 Karl Berry & Olaf Weber.
+   Copyright 1995-2018 Karl Berry & Olaf Weber.
 
    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -425,7 +425,7 @@ lookup (kpathsea kpse, string name)
   }
 
   /* Filter by subdirectories, if specified.  */
-  if (STR_LIST_LENGTH (subdir_paths) > 0) {
+  if (!STR_LIST_EMPTY (subdir_paths)) {
 #if defined(WIN32)
     string *new_list = kpathsea_subdir_match (kpse, subdir_paths, ret_list);
 #else
@@ -845,7 +845,7 @@ main (int argc,  string *argv)
 
   /* --subdir must imply --all, since we filter here after doing the
      search, rather than inside the search itself.  */
-  if (STR_LIST_LENGTH (subdir_paths) > 0) {
+  if (!STR_LIST_EMPTY (subdir_paths)) {
     show_all = 1;
   }
 
diff --git a/source/texk/kpathsea/pathsearch.c b/source/texk/kpathsea/pathsearch.c
index 4f57c1161..24dc472b5 100644
--- a/source/texk/kpathsea/pathsearch.c
+++ b/source/texk/kpathsea/pathsearch.c
@@ -46,7 +46,8 @@
    which calls kpse_all_path_search to find all the texmf.cnf's.  We
    need to do various special things in this case, since we obviously
    don't yet have the configuration files when we're searching for the
-   configuration files.  */
+   configuration files.  Therefore we have a followup_search member in
+   kpathsea_instance to distinguish the first search from all others.  */
 
 
 
@@ -57,7 +58,6 @@
 static void
 log_search (kpathsea kpse, str_list_type filenames)
 {
-
   if (kpse->log_opened == false) {
     /* Get name from either envvar or config file.  */
       string log_name = kpathsea_var_value (kpse, "TEXMFLOG");
@@ -83,9 +83,10 @@ log_search (kpathsea kpse, str_list_type filenames)
       string filename = STR_LIST_ELT (filenames, e);
 
       /* Only record absolute filenames, for privacy.  */
-      if (kpse->log_file && kpathsea_absolute_p (kpse, filename, false))
+      if (kpse->log_file && kpathsea_absolute_p (kpse, filename, false)) {
         fprintf (kpse->log_file, "%lu %s\n", (long unsigned) time (NULL),
                  filename);
+      }
 
 #ifdef KPSE_DEBUG
       /* And show them online, if debugging.  We've already started
@@ -121,44 +122,41 @@ dir_list_search (kpathsea kpse, str_llist_type *dirs,  const_string name,
   str_list_type ret;
   unsigned name_len = strlen (name);
   unsigned allocated = INIT_ALLOC;
-  string potential = (string)xmalloc (allocated);
+  string potential = (string) xmalloc (allocated);
 
   ret = str_list_init ();
 
-  for (elt = *dirs; elt; elt = next_elt)
-    {
-      const_string dir = STR_LLIST (*elt);
-      unsigned dir_len = strlen (dir);
+  for (elt = *dirs; elt; elt = next_elt) {
+    const_string dir = STR_LLIST (*elt);
+    unsigned dir_len = strlen (dir);
 
-      next_elt = STR_LLIST_NEXT (*elt); /* in case elt floats */
+    next_elt = STR_LLIST_NEXT (*elt); /* in case elt floats */
 
-      while (dir_len + name_len + 1 > allocated)
-        {
-          allocated += allocated;
-          XRETALLOC (potential, allocated, char);
-        }
+    while (dir_len + name_len + 1 > allocated) {
+      allocated += allocated;
+      XRETALLOC (potential, allocated, char);
+    }
 
-      strcpy (potential, dir);
-      strcat (potential, name);
+    strcpy (potential, dir);
+    strcat (potential, name);
 
-      if (kpathsea_readable_file (kpse, potential))
-        {
-          str_list_add (&ret, potential);
+    if (kpathsea_readable_file (kpse, potential)) {
+      str_list_add (&ret, potential);
 
-          /* Move this element towards the top of the list.  */
-          str_llist_float (dirs, elt);
+      /* Move this element towards the top of the list.  */
+      str_llist_float (dirs, elt);
 
-          /* If caller only wanted one file returned, no need to
-             terminate the list with NULL; the caller knows to only look
-             at the first element.  */
-          if (!search_all)
-            return ret;
+      /* If caller only wanted one file returned, no need to
+         terminate the list with NULL; the caller knows to only look
+         at the first element.  */
+      if (!search_all)
+        return ret;
 
-          /* Start new filename.  */
-          allocated = INIT_ALLOC;
-          potential = (string)xmalloc (allocated);
-        }
+      /* Start new filename.  */
+      allocated = INIT_ALLOC;
+      potential = (string) xmalloc (allocated);
     }
+  }
 
   /* If we get here, either we didn't find any files, or we were finding
      all the files.  But we're done with the last filename, anyway.  */
@@ -177,52 +175,52 @@ dir_list_search_list (kpathsea kpse, str_llist_type *dirs, string* names,
   str_llist_elt_type *next_elt;
   str_list_type ret;
   unsigned allocated = INIT_ALLOC;
-  string potential = XTALLOC(allocated, char);
+  string potential = XTALLOC (allocated, char);
 
   ret = str_list_init ();
 
   for (elt = *dirs; elt; elt = next_elt) {
-      const_string dir = STR_LLIST (*elt);
-      unsigned dir_len = strlen (dir);
-      int i;
+    const_string dir = STR_LLIST (*elt);
+    unsigned dir_len = strlen (dir);
+    int i;
 
-      next_elt = STR_LLIST_NEXT (*elt); /* in case elt floats */
+    next_elt = STR_LLIST_NEXT (*elt); /* in case elt floats */
 
-      for (i = 0; names[i]; i++) {
-          const_string name = names[i];
-          unsigned name_len;
+    for (i = 0; names[i]; i++) {
+      const_string name = names[i];
+      unsigned name_len;
 
-          /* Don't bother with absolute & explicit relative. */
-          if (kpathsea_absolute_p(kpse, name, true))
-              continue;
+      /* Don't bother with absolute & explicit relative. */
+      if (kpathsea_absolute_p (kpse, name, true))
+        continue;
 
-          name_len = strlen(name);
+      name_len = strlen (name);
 
-          while (dir_len + name_len + 1 > allocated) {
-              allocated += allocated;
-              XRETALLOC (potential, allocated, char);
-          }
+      while (dir_len + name_len + 1 > allocated) {
+        allocated += allocated;
+        XRETALLOC (potential, allocated, char);
+      }
 
-          strcpy (potential, dir);
-          strcat (potential+dir_len, name);
+      strcpy (potential, dir);
+      strcat (potential+dir_len, name);
 
-          if (kpathsea_readable_file (kpse, potential)) {
-              str_list_add (&ret, potential);
+      if (kpathsea_readable_file (kpse, potential)) {
+        str_list_add (&ret, potential);
 
-              /* Move this element towards the top of the list.  */
-              str_llist_float (dirs, elt);
+        /* Move this element towards the top of the list.  */
+        str_llist_float (dirs, elt);
 
-              /* If caller only wanted one file returned, no need to
-                 terminate the list with NULL; the caller knows to only look
-                 at the first element.  */
-              if (!search_all)
-                  return ret;
+        /* If caller only wanted one file returned, no need to
+           terminate the list with NULL; the caller knows to only look
+           at the first element.  */
+        if (!search_all)
+          return ret;
 
-              /* Start new filename. */
-              allocated = INIT_ALLOC;
-              potential = XTALLOC(allocated, char);
-          }
+        /* Start new filename. */
+        allocated = INIT_ALLOC;
+        potential = XTALLOC (allocated, char);
       }
+    }
   }
 
   /* If we get here, either we didn't find any files, or we were finding
@@ -280,7 +278,7 @@ path_search (kpathsea kpse, const_string path,  string name,
     }
 
     /* See elt-dirs.c for side effects of this function */
-    kpathsea_normalize_path(kpse, elt);
+    kpathsea_normalize_path (kpse, elt);
 
     /* Try ls-R, unless we're searching for texmf.cnf.  Our caller
        (search), also tests first_search, and does the resetting.  */
@@ -297,18 +295,19 @@ path_search (kpathsea kpse, const_string path,  string name,
     if (allow_disk_search && (!found || (must_exist && !STR_LIST (*found)))) {
         str_llist_type *dirs = kpathsea_element_dirs (kpse, elt);
       if (dirs && *dirs) {
-        if (!found)
+        if (!found) {
           found = XTALLOC1 (str_list_type);
+        }
         *found = dir_list_search (kpse, dirs, name, all);
       }
     }
 
     /* Did we find anything anywhere?  */
     if (found && STR_LIST (*found)) {
-      if (all)
+      if (all) {
         str_list_concat (&ret_list, *found);
-      else {
-        str_list_add (&ret_list, STR_LIST_ELT (*found, 0));
+      } else {
+        str_list_add (&ret_list, STR_LIST_FIRST_ELT (*found));
         done = true;
       }
     }
@@ -342,7 +341,6 @@ search (kpathsea kpse, const_string path,  const_string original_name,
   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
@@ -385,7 +383,7 @@ search (kpathsea kpse, const_string path,  const_string original_name,
 
   /* Append NULL terminator if we didn't find anything at all, or we're
      supposed to find ALL and the list doesn't end in NULL now.  */
-  if (STR_LIST_LENGTH (ret_list) == 0
+  if (STR_LIST_EMPTY (ret_list)
       || (all && STR_LIST_LAST_ELT (ret_list) != NULL))
     str_list_add (&ret_list, NULL);
 
@@ -415,10 +413,8 @@ search (kpathsea kpse, const_string path,  const_string original_name,
   return STR_LIST (ret_list);
 }
 
-/* Search PATH for NAMES.
-
-   Always return a list; if no files are found, the list will
-   contain just NULL.  If ALL is true, the list will be
+/* Search PATH for NAMES. Always return a list; if no files are found,
+   the list will contain just NULL.  If ALL is true, the list will be
    terminated with NULL.  */
 
 string *
@@ -431,53 +427,41 @@ kpathsea_path_search_list_generic (kpathsea kpse,
   string elt;
   boolean done = false;
   boolean all_absolute = true;
-
 #ifdef __DJGPP__
-  /* We will use `stat' heavily, so let's request for
-     the fastest possible version of `stat', by telling
-     it what members of struct stat do we really need.
-
-     We need to set this on each call because this is a
-     library function; the caller might need other options
-     from `stat'.  Thus save the flags and restore them
-     before exit.
-
-     This call tells `stat' that we do NOT need to recognize
-     executable files (neither by an extension nor by a magic
-     signature); that we do NOT need time stamp of root directories;
-     and that we do NOT need the write access bit in st_mode.
-
-     Note that `kpse_set_program_name' needs the EXEC bits,
-     but it was already called by the time we get here.  */
+  /* See DJGPP comments above.  */
   unsigned short save_djgpp_flags  = _djstat_flags;
 
   _djstat_flags = _STAT_EXEC_MAGIC | _STAT_EXEC_EXT
                   | _STAT_ROOT_TIME | _STAT_WRITEBIT;
 #endif
 
-  ret_list = str_list_init();
+  ret_list = str_list_init ();
 
 #ifdef KPSE_DEBUG
   if (KPATHSEA_DEBUG_P (KPSE_DEBUG_SEARCH)) {
     DEBUGF1  ("start search(files=[%s", *names);
     for (namep = names+1; *namep != NULL; namep++) {
-      fputc(' ', stderr);
-      fputs(*namep, stderr);
+      fputc (' ', stderr);
+      fputs (*namep, stderr);
     }
     fprintf (stderr, "], must_exist=%d, find_all=%d, path=%s).\n",
              must_exist, all, path);
   }
 #endif /* KPSE_DEBUG */
 
-  /* FIXME: is this really true?  No need to do any expansion on names.  */
+  /* kpathsea_find_file_generic in tex-file.c does the variable and
+     tilde expansion, so don't redo that here. Maybe we should have done
+     it differently originally, but we certainly don't want to create an
+     incompatibility now.  */
 
   /* First catch any absolute or explicit relative names. */
   for (namep = names; *namep; namep++) {
     if (kpathsea_absolute_p (kpse, *namep, true)) {
       if (kpathsea_readable_file (kpse, *namep)) {
-        str_list_add (&ret_list, xstrdup(*namep));
-        if (!all)
+        str_list_add (&ret_list, xstrdup (*namep));
+        if (!all) {
           goto out;
+        }
       }
     } else {
       all_absolute = false;
@@ -486,13 +470,13 @@ kpathsea_path_search_list_generic (kpathsea kpse,
   /* Shortcut: if we were only given absolute/explicit relative names,
      we can skip the rest.  Typically, if one name is absolute, they
      all are, because our caller derived them from each other. */
-  if (all_absolute)
-      goto out;
+  if (all_absolute) {
+    goto out;
+  }
 
   /* Look at each path element in turn. */
   for (elt = kpathsea_path_element (kpse, path); !done && elt;
-       elt = kpathsea_path_element (kpse, NULL))
-  {
+       elt = kpathsea_path_element (kpse, NULL)) {
     str_list_type *found;
     boolean allow_disk_search = true;
     if (elt[0] == '!' && elt[1] == '!') {
@@ -515,11 +499,12 @@ kpathsea_path_search_list_generic (kpathsea kpse,
          (3) MUST_EXIST && NAME was not in the db.
        In (2*), `found' will be NULL.
        In (3),  `found' will be an empty list. */
-    if (allow_disk_search && (!found || (must_exist && !STR_LIST(*found)))) {
+    if (allow_disk_search && (!found || (must_exist && !STR_LIST (*found)))) {
         str_llist_type *dirs = kpathsea_element_dirs (kpse, elt);
       if (dirs && *dirs) {
-        if (!found)
+        if (!found) {
           found = XTALLOC1 (str_list_type);
+        }
         *found = dir_list_search_list (kpse, dirs, names, all);
       }
     }
@@ -529,7 +514,7 @@ kpathsea_path_search_list_generic (kpathsea kpse,
       if (all) {
         str_list_concat (&ret_list, *found);
       } else {
-        str_list_add (&ret_list, STR_LIST_ELT (*found, 0));
+        str_list_add (&ret_list, STR_LIST_FIRST_ELT (*found));
         done = true;
       }
     }
@@ -541,7 +526,7 @@ kpathsea_path_search_list_generic (kpathsea kpse,
   str_list_uniqify (&ret_list);
 
   /* Add NULL if we will be returning multiple elements.  */
-  if (STR_LIST_LENGTH (ret_list) == 0
+  if (STR_LIST_EMPTY (ret_list)
       || (all && STR_LIST_LAST_ELT (ret_list) != NULL))
     str_list_add (&ret_list, NULL);
 
@@ -598,7 +583,6 @@ kpathsea_all_path_search (kpathsea kpse, const_string path, const_string name)
 }
 
 #if defined (KPSE_COMPAT_API)
-
 string
 kpse_path_search (const_string path,  const_string name, boolean must_exist)
 {
@@ -610,7 +594,7 @@ kpse_all_path_search (const_string path,  const_string name)
 {
     return kpathsea_all_path_search (kpse_def,  path, name);
 }
-#endif
+#endif /* KPSE_COMPAT_API */
 
 
 #ifdef TEST
@@ -641,7 +625,7 @@ test_path_search (const_string path, const_string file)
 int
 main (int argc, char **argv)
 {
-  kpse_set_program_name(argv[0], NULL);
+  kpse_set_program_name (argv[0], NULL);
   /* All lists end with NULL.  */
   test_path_search (".", "nonexistent");
   test_path_search (".", "/nonexistent");
diff --git a/source/texk/kpathsea/readable.c b/source/texk/kpathsea/readable.c
index 0afdd6a24..2623fd2b8 100644
--- a/source/texk/kpathsea/readable.c
+++ b/source/texk/kpathsea/readable.c
@@ -1,6 +1,6 @@
 /* readable.c: check if a filename is a readable non-directory file.
 
-   Copyright 1993, 1995, 1996, 2008, 2011, 2012, 2016 Karl Berry.
+   Copyright 1993, 1995, 1996, 2008, 2011, 2012, 2016, 2018 Karl Berry.
    Copyright 1998, 1999, 2000, 2001, 2005 Olaf Weber.
 
    This library is free software; you can redistribute it and/or
@@ -33,8 +33,8 @@
 
 #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)
+#define READABLE(kpse, fn, st) \
+  (access ((fn), R_OK) == 0 && access ((fn), D_OK) == -1)
 #elif defined (WIN32)
 /* st must be an unsigned int under Windows */
 static boolean
@@ -43,34 +43,34 @@ READABLE(kpathsea kpse, const_string fn, unsigned int st)
   wchar_t *fnw;
   fnw = get_wstring_from_mbstring(kpse->File_system_codepage, fn, fnw=NULL);
   if ((st = GetFileAttributesW(fnw)) != 0xFFFFFFFF) {
-      /* succeeded */
-      errno = 0;
+    /* succeeded */
+    errno = 0;
   } else {
-      switch(GetLastError()) {
-      case ERROR_BUFFER_OVERFLOW:
-          errno = ENAMETOOLONG;
-          break;
-      case ERROR_ACCESS_DENIED:
-          errno = EACCES;
-          break;
-      default :
-          errno = EIO;          /* meaningless, will make ret=NULL later */
-          break;
-      }
+    switch(GetLastError()) {
+    case ERROR_BUFFER_OVERFLOW:
+      errno = ENAMETOOLONG;
+      break;
+    case ERROR_ACCESS_DENIED:
+      errno = EACCES;
+      break;
+    default :
+      errno = EIO;          /* meaningless, will make ret=NULL later */
+      break;
+    }
   }
-  if(fnw) free(fnw);
-  return ((st != 0xFFFFFFFF) &&
-                  !(st & FILE_ATTRIBUTE_DIRECTORY));
+  if (fnw)
+    free (fnw);
+  return ((st != 0xFFFFFFFF) && !(st & FILE_ATTRIBUTE_DIRECTORY));
 }
-#else
-#define READABLE(fn, st) \
-  (access (fn, R_OK) == 0 && stat (fn, &(st)) == 0 && !S_ISDIR (st.st_mode))
+#else /* not __DJGPP__ and not WIN32 */
+#define READABLE(kpse, fn, st) \
+ (access((fn), R_OK) == 0 && stat((fn), &(st)) == 0 && !S_ISDIR ((st).st_mode))
 #endif
 
-
+
 /* POSIX invented the brain-damage of not necessarily truncating
    filename components; the system's behavior is defined by the value of
-   the symbol _POSIX_NO_TRUNC, but you can't change it dynamically!  */
+   the symbol _POSIX_NO_TRUNC, but it can't be changed.  */
 
 string
 kpathsea_readable_file (kpathsea kpse, string name)
@@ -82,67 +82,66 @@ kpathsea_readable_file (kpathsea kpse, string name)
 #endif
 
   kpathsea_normalize_path (kpse, name);
-#ifdef WIN32
   if (READABLE (kpse, name, st)) {
-#else
-  if (READABLE (name, st)) {
-#endif
-      return name;
+    return name;
+
 #ifdef ENAMETOOLONG
   } else if (errno == ENAMETOOLONG) {
-      /* Truncate any too-long components in NAME.  */
-      unsigned c_len = 0;        /* Length of current component.  */
-      char *s = name;            /* Position in current component.  */
-      char *t = name;            /* End of allowed length.  */
-      
-      for (; *s; s++) {
-          if (c_len <= NAME_MAX)
-              t = s;
+    /* Truncate any too-long components in NAME.  */
+    unsigned c_len = 0;        /* Length of current component.  */
+    char *s = name;            /* Position in current component.  */
+    char *t = name;            /* End of allowed length.  */
+
+    for (; *s; s++) {
+      if (c_len <= NAME_MAX) {
+        t = s;
+      }
 #if defined(WIN32)
-          if (kpathsea_IS_KANJI (kpse, s)) {
-              s++;
-              c_len += 2;
-              continue;
-          }
-#endif
-          if (IS_DIR_SEP (*s) || IS_DEVICE_SEP (*s)) {
-              if (c_len > NAME_MAX) {
-                  /* Truncate if past the max for a component.  */
-                  memmove (t, s, strlen (s) + 1);
-                  s = t;
-              }
-              /* At a directory delimiter, reset component length.  */
-              c_len = 0;
-          } else
-              c_len++;
+      if (kpathsea_IS_KANJI (kpse, s)) {
+        s++;
+        c_len += 2;
+        continue;
+      }
+#endif /* WIN32 */
+      if (IS_DIR_SEP (*s) || IS_DEVICE_SEP (*s)) {
+        if (c_len > NAME_MAX) {
+          /* Truncate if past the max for a component.  */
+          memmove (t, s, strlen (s) + 1);
+          s = t;
+        }
+        /* At a directory delimiter, reset component length.  */
+        c_len = 0;
+      } else {
+        c_len++;
       }
-      if (c_len > NAME_MAX)
-          /* Truncate if past the max for last component.  */
-          *t = 0;
+    }
+    if (c_len > NAME_MAX) {
+      /* Truncate if past the max for last component.  */
+      *t = 0;
+    }
 
-      /* Perhaps some other error will occur with the truncated name, so
-         let's call access again.  */
-#ifdef WIN32
-      if (READABLE (kpse, name, st)) /* Success.  */
-#else
-      if (READABLE (name, st)) /* Success.  */
-#endif
-          return name;
+    /* Perhaps some other error will occur with the truncated name, so
+       let's call access again.  */
+    if (READABLE (kpse, name, st)) /* Success.  */
+      return name;
 #endif /* ENAMETOOLONG */
+
   } else { /* Some other error.  */
-      if (errno == EACCES) { /* Maybe warn them if permissions are bad.  */
-          if (!kpathsea_tex_hush (kpse, "readable")) {
-              perror (name);
-          }
+    if (errno == EACCES) { /* Maybe warn them if permissions are bad.  */
+      if (!kpathsea_tex_hush (kpse, "readable")) {
+        perror (name);
       }
+    }
   }
+
   return NULL;
 }
 
+
 #if defined (KPSE_COMPAT_API)
 string
 kpse_readable_file (string name)
 {
-    return kpathsea_readable_file (kpse_def, name);
+  return kpathsea_readable_file (kpse_def, name);
 }
 #endif
diff --git a/source/texk/kpathsea/readable.h b/source/texk/kpathsea/readable.h
index 123e299b1..98e434bbc 100644
--- a/source/texk/kpathsea/readable.h
+++ b/source/texk/kpathsea/readable.h
@@ -1,6 +1,6 @@
 /* readable.h: is a file readable?
 
-   Copyright 1993, 2008, 2009 Karl Berry.
+   Copyright 1993, 2008, 2009, 2018 Karl Berry.
    Copyright 1999, 2005 Olaf Weber.
 
    This library is free software; you can redistribute it and/or
@@ -26,10 +26,10 @@
 extern "C" {
 #endif
 
-/* If NAME is readable and is a regular file, return it.  If the error is
-   ENAMETOOLONG, truncate any too-long path components, and if the
-   result is a readable file, return that.  Otherwise return NULL.  */
-
+/* If NAME is readable and is a regular file, return it (as is).  If the
+   error is ENAMETOOLONG, truncate any too-long path components, and if
+   the result is a readable file, return that (in the same memory, since
+   it only got shorter).  Otherwise return NULL.  */
 extern KPSEDLL string kpathsea_readable_file (kpathsea kpse, string name);
 
 #if defined (KPSE_COMPAT_API)
diff --git a/source/texk/kpathsea/str-list.c b/source/texk/kpathsea/str-list.c
index 750ccd916..676aaa0ad 100644
--- a/source/texk/kpathsea/str-list.c
+++ b/source/texk/kpathsea/str-list.c
@@ -1,6 +1,6 @@
 /* str-list.c: define routines for string lists.
 
-    Copyright 1993, 2008, 2012 Karl Berry.
+    Copyright 1993, 2008, 2012, 2018 Karl Berry.
     Copyright 2001, 2005 Olaf Weber.
 
     This library is free software; you can redistribute it and/or
@@ -53,50 +53,54 @@ str_list_concat (str_list_type *target,  str_list_type more)
   STR_LIST_LENGTH (*target) += STR_LIST_LENGTH (more);
   XRETALLOC (STR_LIST (*target), STR_LIST_LENGTH (*target), string);
 
-  for (e = 0; e < STR_LIST_LENGTH (more); e++)
+  for (e = 0; e < STR_LIST_LENGTH (more); e++) {
     STR_LIST_ELT (*target, prev_len + e) = STR_LIST_ELT (more, e);
+  }
 }
 
 
-/* Concatenate the elements of more to each element of target.  This
-   _must_ be done with the first index varying fastest. */
-/* Note that we free the old elements of target as well. */
+/* Concatenate the elements of MORE to each element of TARGET.  This
+   _must_ be done with the first index varying fastest.
+   We free the old elements of TARGET.  */
 
 void
 str_list_concat_elements (str_list_type *target,  str_list_type more)
 {
-    if (STR_LIST_LENGTH(more) == 0) {
-        return;
-    } else if (STR_LIST_LENGTH(*target) == 0) {
-        unsigned int i;
-        STR_LIST_LENGTH(*target) = STR_LIST_LENGTH(more);
-        STR_LIST(*target) =
-                (string*)xmalloc(STR_LIST_LENGTH(more)*sizeof(char*));
-        for (i=0;i!=STR_LIST_LENGTH(more);++i) {
-            STR_LIST_ELT(*target,i)=xstrdup(STR_LIST_ELT(more,i));
-        }
-        return;
-    } else {
-        unsigned new_len;
-        char ** new_list;
-        unsigned int i,j;
-        new_list = (string*)xmalloc(STR_LIST_LENGTH (*target)
-                                    * STR_LIST_LENGTH (more) * sizeof(char*));
-
-        new_len = 0;
-        for (j = 0; j != STR_LIST_LENGTH(more); ++j) {
-            for (i = 0; i != STR_LIST_LENGTH(*target); ++i) {
-                new_list[new_len] = concat(STR_LIST_ELT(*target,i),
-                                           STR_LIST_ELT(more,j));
-                ++new_len;
-            }
-        }
-        for (i = 0; i != STR_LIST_LENGTH(*target); ++i)
-            free(STR_LIST_ELT(*target, i));
-        free(STR_LIST(*target));
-        STR_LIST_LENGTH(*target) = new_len;
-        STR_LIST(*target) = new_list;
+  if (STR_LIST_EMPTY (more)) {
+    return;
+
+  } else if (STR_LIST_EMPTY (*target)) {
+    unsigned i;
+    STR_LIST_LENGTH (*target) = STR_LIST_LENGTH (more);
+    STR_LIST (*target) = (string *) xmalloc (STR_LIST_LENGTH (more)
+                                             * sizeof (char *));
+    for (i = 0; i != STR_LIST_LENGTH (more); ++i) {
+      STR_LIST_ELT (*target, i) = xstrdup (STR_LIST_ELT (more, i));
+    }
+    return;
+
+  } else {
+    unsigned new_len;
+    char **new_list;
+    unsigned i, j;
+    new_list = (string *) xmalloc (STR_LIST_LENGTH (*target)
+                                   * STR_LIST_LENGTH (more)
+                                   * sizeof (char *));
+    new_len = 0;
+    for (j = 0; j != STR_LIST_LENGTH (more); ++j) {
+      for (i = 0; i != STR_LIST_LENGTH (*target); ++i) {
+        new_list[new_len] = concat (STR_LIST_ELT (*target, i),
+                                    STR_LIST_ELT (more, j));
+        ++new_len;
+      }
     }
+    for (i = 0; i != STR_LIST_LENGTH(*target); ++i) {
+      free (STR_LIST_ELT (*target, i));
+    }
+    free (STR_LIST (*target));
+    STR_LIST_LENGTH (*target) = new_len;
+    STR_LIST (*target) = new_list;
+  }
 }
 
 
@@ -105,11 +109,10 @@ str_list_concat_elements (str_list_type *target,  str_list_type more)
 void
 str_list_free (str_list_type *l)
 {
-  if (STR_LIST (*l))
-    {
-      free (STR_LIST (*l));
-      STR_LIST (*l) = NULL;
-    }
+  if (STR_LIST (*l)) {
+    free (STR_LIST (*l));
+    STR_LIST (*l) = NULL;
+  }
 }
 
 
diff --git a/source/texk/kpathsea/str-list.h b/source/texk/kpathsea/str-list.h
index 770abbdd3..0644f10aa 100644
--- a/source/texk/kpathsea/str-list.h
+++ b/source/texk/kpathsea/str-list.h
@@ -1,6 +1,6 @@
 /* str-list.h: declarations for string lists.
 
-   Copyright 1993, 1994, 2007, 2008, 2010, 2012 Karl Berry.
+   Copyright 1993, 1994, 2007, 2008, 2010, 2012, 2018 Karl Berry.
    Copyright 1999, 2005 Olaf Weber.
 
    This library is free software; you can redistribute it and/or
@@ -42,9 +42,12 @@ typedef struct
 } cstr_list_type;
 
 #define STR_LIST_LENGTH(l) ((l).length)
+#define STR_LIST_EMPTY(l) (STR_LIST_LENGTH (l) == 0)
+
 #define STR_LIST(l) ((l).list)
-#define STR_LIST_ELT(l, n) STR_LIST (l)[n]
-#define STR_LIST_LAST_ELT(l) STR_LIST_ELT (l, STR_LIST_LENGTH (l) - 1)
+#define STR_LIST_ELT(l, n) (STR_LIST (l)[n])
+#define STR_LIST_FIRST_ELT(l) STR_LIST_ELT ((l), 0)
+#define STR_LIST_LAST_ELT(l) STR_LIST_ELT ((l), STR_LIST_LENGTH (l) - 1)
 
 #ifdef MAKE_KPSE_DLL /* libkpathsea internal only */
 
diff --git a/source/texk/kpathsea/tex-file.c b/source/texk/kpathsea/tex-file.c
index 952f1f205..f11753e62 100644
--- a/source/texk/kpathsea/tex-file.c
+++ b/source/texk/kpathsea/tex-file.c
@@ -843,54 +843,56 @@ kpathsea_init_format_return_varlist(kpathsea kpse,kpse_file_format_type format)
 #define MAYBE(member) (FMT_INFO.member ? FMT_INFO.member : "(none)")
 
   /* Describe the monster we've created.  */
-  if (KPATHSEA_DEBUG_P (KPSE_DEBUG_PATHS))
-    {
-      DEBUGF2 ("Search path for %s files (from %s)\n",
-              FMT_INFO.type, FMT_INFO.path_source);
-      DEBUGF1 ("  = %s\n", FMT_INFO.path);
-      DEBUGF1 ("  before expansion = %s\n", FMT_INFO.raw_path);
-      DEBUGF1 ("  application override path = %s\n", MAYBE (override_path));
-      DEBUGF1 ("  application config file path = %s\n", MAYBE (client_path));
-      DEBUGF1 ("  texmf.cnf path = %s\n", MAYBE (cnf_path));
-      DEBUGF1 ("  compile-time path = %s\n", MAYBE (default_path));
-      DEBUGF1 ("  environment variables = %s\n", envvar_list);
-      DEBUGF  ("  default suffixes =");
-      if (FMT_INFO.suffix) {
-        const_string *ext;
-        for (ext = FMT_INFO.suffix; ext && *ext; ext++) {
-          fprintf (stderr, " %s", *ext);
-        }
-        putc ('\n', stderr);
-      } else {
-        fputs (" (none)\n", stderr);
+  if (KPATHSEA_DEBUG_P (KPSE_DEBUG_PATHS)) {
+    if (format == kpse_cnf_format)
+      fputs ("\n", stderr); /* always mid-search, so break log output */
+
+    DEBUGF2 ("Search path for %s files (from %s)\n",
+            FMT_INFO.type, FMT_INFO.path_source);
+    DEBUGF1 ("  = %s\n", FMT_INFO.path);
+    DEBUGF1 ("  before expansion = %s\n", FMT_INFO.raw_path);
+    DEBUGF1 ("  application override path = %s\n", MAYBE (override_path));
+    DEBUGF1 ("  application config file path = %s\n", MAYBE (client_path));
+    DEBUGF1 ("  texmf.cnf path = %s\n", MAYBE (cnf_path));
+    DEBUGF1 ("  compile-time path = %s\n", MAYBE (default_path));
+    DEBUGF1 ("  environment variables = %s\n", envvar_list);
+    DEBUGF  ("  default suffixes =");
+    if (FMT_INFO.suffix) {
+      const_string *ext;
+      for (ext = FMT_INFO.suffix; ext && *ext; ext++) {
+        fprintf (stderr, " %s", *ext);
       }
-      DEBUGF  ("  other suffixes =");
-      if (FMT_INFO.alt_suffix) {
-        const_string *alt;
-        for (alt = FMT_INFO.alt_suffix; alt && *alt; alt++) {
-          fprintf (stderr, " %s", *alt);
-        }
-        putc ('\n', stderr);
-      } else {
-        fputs (" (none)\n", stderr);
+      putc ('\n', stderr);
+    } else {
+      fputs (" (none)\n", stderr);
+    }
+    DEBUGF  ("  other suffixes =");
+    if (FMT_INFO.alt_suffix) {
+      const_string *alt;
+      for (alt = FMT_INFO.alt_suffix; alt && *alt; alt++) {
+        fprintf (stderr, " %s", *alt);
       }
-      DEBUGF1 ("  search only with suffix = %d\n",FMT_INFO.suffix_search_only);
-      DEBUGF1 ("  runtime generation program = %s\n", MAYBE (program));
-      DEBUGF  ("  runtime generation command =");
-      if (FMT_INFO.argv) {
-        const_string *arg;
-        for (arg = FMT_INFO.argv; *arg; arg++) {
-          fprintf (stderr, " %s", *arg);
-        }
-        putc ('\n', stderr);
-      } else {
-          fputs(" (none)\n", stderr);
+      putc ('\n', stderr);
+    } else {
+      fputs (" (none)\n", stderr);
+    }
+    DEBUGF1 ("  search only with suffix = %d\n",FMT_INFO.suffix_search_only);
+    DEBUGF1 ("  runtime generation program = %s\n", MAYBE (program));
+    DEBUGF  ("  runtime generation command =");
+    if (FMT_INFO.argv) {
+      const_string *arg;
+      for (arg = FMT_INFO.argv; *arg; arg++) {
+        fprintf (stderr, " %s", *arg);
       }
-      DEBUGF1 ("  program enabled = %d\n", FMT_INFO.program_enabled_p);
-      DEBUGF1 ("  program enable level = %d\n", FMT_INFO.program_enable_level);
-      DEBUGF1 ("  open files in binary mode = %d\n", FMT_INFO.binmode);
-      DEBUGF1 ("  numeric format value = %d\n", format);
+      putc ('\n', stderr);
+    } else {
+        fputs(" (none)\n", stderr);
     }
+    DEBUGF1 ("  program enabled = %d\n", FMT_INFO.program_enabled_p);
+    DEBUGF1 ("  program enable level = %d\n", FMT_INFO.program_enable_level);
+    DEBUGF1 ("  open files in binary mode = %d\n", FMT_INFO.binmode);
+    DEBUGF1 ("  numeric format value = %d\n", format);
+}
 #endif /* KPSE_DEBUG */
 
   return envvar_list;
@@ -1045,8 +1047,6 @@ kpathsea_find_file_generic (kpathsea kpse, const_string const_name,
   /* Do variable and tilde expansion. */
   name = kpathsea_expand (kpse, const_name);
 
-  try_std_extension_first
-    = kpathsea_var_value (kpse, "try_std_extension_first");
   has_any_suffix = strrchr (name, '.');
   if (has_any_suffix) {
     string p = strchr (has_any_suffix, DIR_SEP);
@@ -1076,8 +1076,10 @@ kpathsea_find_file_generic (kpathsea kpse, const_string const_name,
      try_std_extension_first.  */
   count = 0;
   target = XTALLOC1 (string);
+  try_std_extension_first
+    = kpathsea_var_value (kpse, "try_std_extension_first");
 
-  if (has_any_suffix
+  if (has_any_suffix /* xxx && ! KPSE_CNF_VALUE_P (try_std_extension_first)*/
       && (try_std_extension_first == NULL || *try_std_extension_first == 'f'
           || *try_std_extension_first == '0')) {
     target_asis_name (kpse, &target, &count, format, name, use_fontmaps,
diff --git a/source/texk/web2c/ChangeLog b/source/texk/web2c/ChangeLog
index b6432ed9d..8c15742da 100644
--- a/source/texk/web2c/ChangeLog
+++ b/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-21  Karl Berry  <karl@freefriends.org>
+
+	* configure.ac <luatex>: quote [notice] so not misparsed at comma,
+	ending up with "bad fd number".
+
 2017-09-10  Hironobu Yamashita  <h.y.acetaminophen@gmail.com>
 
 	* pltotf.ch: web2c extends the range of 'lf' from 0..32767
diff --git a/source/texk/web2c/Makefile.am b/source/texk/web2c/Makefile.am
index 2f795888e..7747e5658 100644
--- a/source/texk/web2c/Makefile.am
+++ b/source/texk/web2c/Makefile.am
@@ -1,4 +1,4 @@
-## $Id: Makefile.am 43617 2017-03-27 18:00:45Z karl $
+## $Id: Makefile.am 46348 2018-01-17 18:00:12Z lscarso $
 ## Makefile.am for the TeX Live subdirectory texk/web2c/.
 ##
 ## Copyright 2017      Karl Berry <tex-live@tug.org>
diff --git a/source/texk/web2c/Makefile.in b/source/texk/web2c/Makefile.in
index 46dc60a6e..a821d4b75 100644
--- a/source/texk/web2c/Makefile.in
+++ b/source/texk/web2c/Makefile.in
@@ -123,8 +123,8 @@ TESTS = tangle.test $(am__EXEEXT_43) ctiedir/ctie.test \
 	$(am__append_58) $(am__append_63) $(am__append_66) \
 	$(am__append_68) $(am__append_73) $(am__append_76) \
 	$(am__append_78) $(am__append_83) $(am__append_99) \
-	$(am__append_100) $(am__append_101) $(am__append_108) \
-	$(am__append_110) $(am__append_112) $(am__append_146) \
+	$(am__append_100) $(am__append_101) $(am__append_109) \
+	$(am__append_111) $(am__append_113) $(am__append_147) \
 	libmd5/md5.test
 @WEB_TRUE@am__append_1 = $(web_programs)
 @WEB_TRUE@am__append_2 = $(web_tests)
@@ -233,114 +233,115 @@ TESTS = tangle.test $(am__EXEEXT_43) ctiedir/ctie.test \
 @LUAJITTEX_TRUE@am__append_101 = $(luajittex_tests)
 @XETEX_TRUE@am__append_102 = xetex
 @XETEX_MACOSX_TRUE@am__append_103 = -DXETEX_MAC
-@XETEX_MACOSX_FALSE@am__append_104 = $(FONTCONFIG_INCLUDES)
-@XETEX_MACOSX_FALSE@am__append_105 = $(FONTCONFIG_LIBS)
-@XETEX_MACOSX_TRUE@am__append_106 = \
+@XETEX_MACOSX_TRUE@am__append_104 = -std=c++11
+@XETEX_MACOSX_FALSE@am__append_105 = $(FONTCONFIG_INCLUDES)
+@XETEX_MACOSX_FALSE@am__append_106 = $(FONTCONFIG_LIBS)
+@XETEX_MACOSX_TRUE@am__append_107 = \
 @XETEX_MACOSX_TRUE@	xetexdir/XeTeXFontInst_Mac.cpp \
 @XETEX_MACOSX_TRUE@	xetexdir/XeTeXFontInst_Mac.h \
 @XETEX_MACOSX_TRUE@	xetexdir/XeTeXFontMgr_Mac.mm \
 @XETEX_MACOSX_TRUE@	xetexdir/XeTeXFontMgr_Mac.h \
 @XETEX_MACOSX_TRUE@	xetexdir/XeTeX_mac.c
 
-@XETEX_MACOSX_FALSE@am__append_107 = \
+@XETEX_MACOSX_FALSE@am__append_108 = \
 @XETEX_MACOSX_FALSE@	xetexdir/XeTeXFontMgr_FC.cpp \
 @XETEX_MACOSX_FALSE@	xetexdir/XeTeXFontMgr_FC.h
 
-@XETEX_TRUE@am__append_108 = $(xetex_tests)
-@OTANGLE_TRUE@am__append_109 = $(omegaware_programs)
-@OTANGLE_TRUE@am__append_110 = $(OTANGLE_tests) $(OMFONTS_tests)
-@ALEPH_TRUE@am__append_111 = aleph
-@ALEPH_TRUE@am__append_112 = $(aleph_tests)
-@SYNCTEX_TRUE@am__append_113 = synctex
-@SYNCTEX_TRUE@am__append_114 = $(LTLIBSYNCTEX)
-@SYNCTEX_TRUE@am__append_115 = $(LIBSYNCTEX)
-@MINGW32_TRUE@am__append_116 = -lshlwapi
+@XETEX_TRUE@am__append_109 = $(xetex_tests)
+@OTANGLE_TRUE@am__append_110 = $(omegaware_programs)
+@OTANGLE_TRUE@am__append_111 = $(OTANGLE_tests) $(OMFONTS_tests)
+@ALEPH_TRUE@am__append_112 = aleph
+@ALEPH_TRUE@am__append_113 = $(aleph_tests)
+@SYNCTEX_TRUE@am__append_114 = synctex
+@SYNCTEX_TRUE@am__append_115 = $(LTLIBSYNCTEX)
+@SYNCTEX_TRUE@am__append_116 = $(LIBSYNCTEX)
 @MINGW32_TRUE@am__append_117 = -lshlwapi
-@TEX_SYNCTEX_TRUE@am__append_118 = -I$(srcdir)/synctexdir \
+@MINGW32_TRUE@am__append_118 = -lshlwapi
+@TEX_SYNCTEX_TRUE@am__append_119 = -I$(srcdir)/synctexdir \
 @TEX_SYNCTEX_TRUE@	$(ZLIB_INCLUDES) -D__SyncTeX__ \
 @TEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-tex.h\"
-@TEX_SYNCTEX_TRUE@am__append_119 = $(ZLIB_LIBS)
-@TEX_SYNCTEX_TRUE@am__append_120 = $(ZLIB_DEPEND)
-@TEX_SYNCTEX_TRUE@am__append_121 = \
+@TEX_SYNCTEX_TRUE@am__append_120 = $(ZLIB_LIBS)
+@TEX_SYNCTEX_TRUE@am__append_121 = $(ZLIB_DEPEND)
+@TEX_SYNCTEX_TRUE@am__append_122 = \
 @TEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @TEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @TEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @TEX_SYNCTEX_TRUE@	synctexdir/synctex-tex.h
 
-@ETEX_SYNCTEX_TRUE@am__append_122 = -I$(srcdir)/synctexdir \
+@ETEX_SYNCTEX_TRUE@am__append_123 = -I$(srcdir)/synctexdir \
 @ETEX_SYNCTEX_TRUE@	$(ZLIB_INCLUDES) -D__SyncTeX__ \
 @ETEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-etex.h\"
-@ETEX_SYNCTEX_TRUE@am__append_123 = $(ZLIB_LIBS)
-@ETEX_SYNCTEX_TRUE@am__append_124 = $(ZLIB_DEPEND)
-@ETEX_SYNCTEX_TRUE@am__append_125 = \
+@ETEX_SYNCTEX_TRUE@am__append_124 = $(ZLIB_LIBS)
+@ETEX_SYNCTEX_TRUE@am__append_125 = $(ZLIB_DEPEND)
+@ETEX_SYNCTEX_TRUE@am__append_126 = \
 @ETEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @ETEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @ETEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @ETEX_SYNCTEX_TRUE@	synctexdir/synctex-etex.h
 
-@PTEX_SYNCTEX_TRUE@am__append_126 = -I$(srcdir)/synctexdir \
+@PTEX_SYNCTEX_TRUE@am__append_127 = -I$(srcdir)/synctexdir \
 @PTEX_SYNCTEX_TRUE@	$(ZLIB_INCLUDES) -D__SyncTeX__ \
 @PTEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-ptex.h\"
-@PTEX_SYNCTEX_TRUE@am__append_127 = $(ZLIB_LIBS)
-@PTEX_SYNCTEX_TRUE@am__append_128 = $(ZLIB_DEPEND)
-@PTEX_SYNCTEX_TRUE@am__append_129 = \
+@PTEX_SYNCTEX_TRUE@am__append_128 = $(ZLIB_LIBS)
+@PTEX_SYNCTEX_TRUE@am__append_129 = $(ZLIB_DEPEND)
+@PTEX_SYNCTEX_TRUE@am__append_130 = \
 @PTEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @PTEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @PTEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @PTEX_SYNCTEX_TRUE@	synctexdir/synctex-ptex.h
 
-@UPTEX_SYNCTEX_TRUE@am__append_130 = -I$(srcdir)/synctexdir \
+@UPTEX_SYNCTEX_TRUE@am__append_131 = -I$(srcdir)/synctexdir \
 @UPTEX_SYNCTEX_TRUE@	$(ZLIB_INCLUDES) -D__SyncTeX__ \
 @UPTEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-uptex.h\"
-@UPTEX_SYNCTEX_TRUE@am__append_131 = $(ZLIB_LIBS)
-@UPTEX_SYNCTEX_TRUE@am__append_132 = $(ZLIB_DEPEND)
-@UPTEX_SYNCTEX_TRUE@am__append_133 = \
+@UPTEX_SYNCTEX_TRUE@am__append_132 = $(ZLIB_LIBS)
+@UPTEX_SYNCTEX_TRUE@am__append_133 = $(ZLIB_DEPEND)
+@UPTEX_SYNCTEX_TRUE@am__append_134 = \
 @UPTEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @UPTEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @UPTEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @UPTEX_SYNCTEX_TRUE@	synctexdir/synctex-uptex.h
 
-@EPTEX_SYNCTEX_TRUE@am__append_134 = -I$(srcdir)/synctexdir \
+@EPTEX_SYNCTEX_TRUE@am__append_135 = -I$(srcdir)/synctexdir \
 @EPTEX_SYNCTEX_TRUE@	$(ZLIB_INCLUDES) -D__SyncTeX__ \
 @EPTEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-eptex.h\"
-@EPTEX_SYNCTEX_TRUE@am__append_135 = $(ZLIB_LIBS)
-@EPTEX_SYNCTEX_TRUE@am__append_136 = $(ZLIB_DEPEND)
-@EPTEX_SYNCTEX_TRUE@am__append_137 = \
+@EPTEX_SYNCTEX_TRUE@am__append_136 = $(ZLIB_LIBS)
+@EPTEX_SYNCTEX_TRUE@am__append_137 = $(ZLIB_DEPEND)
+@EPTEX_SYNCTEX_TRUE@am__append_138 = \
 @EPTEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @EPTEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @EPTEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @EPTEX_SYNCTEX_TRUE@	synctexdir/synctex-eptex.h
 
-@EUPTEX_SYNCTEX_TRUE@am__append_138 = -I$(srcdir)/synctexdir \
+@EUPTEX_SYNCTEX_TRUE@am__append_139 = -I$(srcdir)/synctexdir \
 @EUPTEX_SYNCTEX_TRUE@	$(ZLIB_INCLUDES) -D__SyncTeX__ \
 @EUPTEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-euptex.h\"
-@EUPTEX_SYNCTEX_TRUE@am__append_139 = $(ZLIB_LIBS)
-@EUPTEX_SYNCTEX_TRUE@am__append_140 = $(ZLIB_DEPEND)
-@EUPTEX_SYNCTEX_TRUE@am__append_141 = \
+@EUPTEX_SYNCTEX_TRUE@am__append_140 = $(ZLIB_LIBS)
+@EUPTEX_SYNCTEX_TRUE@am__append_141 = $(ZLIB_DEPEND)
+@EUPTEX_SYNCTEX_TRUE@am__append_142 = \
 @EUPTEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @EUPTEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @EUPTEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @EUPTEX_SYNCTEX_TRUE@	synctexdir/synctex-euptex.h
 
-@PDFTEX_SYNCTEX_TRUE@am__append_142 = -I$(srcdir)/synctexdir \
+@PDFTEX_SYNCTEX_TRUE@am__append_143 = -I$(srcdir)/synctexdir \
 @PDFTEX_SYNCTEX_TRUE@	-D__SyncTeX__ \
 @PDFTEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-pdftex.h\"
-@PDFTEX_SYNCTEX_TRUE@am__append_143 = \
+@PDFTEX_SYNCTEX_TRUE@am__append_144 = \
 @PDFTEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @PDFTEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @PDFTEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @PDFTEX_SYNCTEX_TRUE@	synctexdir/synctex-pdftex.h
 
-@XETEX_SYNCTEX_TRUE@am__append_144 = -I$(srcdir)/synctexdir \
+@XETEX_SYNCTEX_TRUE@am__append_145 = -I$(srcdir)/synctexdir \
 @XETEX_SYNCTEX_TRUE@	-D__SyncTeX__ \
 @XETEX_SYNCTEX_TRUE@	-DSYNCTEX_ENGINE_H=\"synctex-xetex.h\"
-@XETEX_SYNCTEX_TRUE@am__append_145 = \
+@XETEX_SYNCTEX_TRUE@am__append_146 = \
 @XETEX_SYNCTEX_TRUE@	synctexdir/synctex.c \
 @XETEX_SYNCTEX_TRUE@	synctexdir/synctex.h \
 @XETEX_SYNCTEX_TRUE@	synctexdir/synctex-common.h \
 @XETEX_SYNCTEX_TRUE@	synctexdir/synctex-xetex.h
 
-@SYNCTEX_TRUE@am__append_146 = $(synctex_tests)
+@SYNCTEX_TRUE@am__append_147 = $(synctex_tests)
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
@@ -2175,7 +2176,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJCXX = @OBJCXX@
 OBJCXXDEPMODE = @OBJCXXDEPMODE@
-OBJCXXFLAGS = @OBJCXXFLAGS@
+OBJCXXFLAGS = @OBJCXXFLAGS@ $(am__append_104)
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OTANGLE = @OTANGLE@
@@ -2307,8 +2308,8 @@ EXTRA_LIBRARIES = libmf.a libmflua.a libmfluajit.a libmputil.a \
 	libff.a libluatex.a liblua53tex.a libluajittex.a libluaffi.a \
 	liblua53ffi.a libxetex.a libsynctex.a libmd5.a
 EXTRA_LTLIBRARIES = libsynctex.la
-lib_LIBRARIES = $(am__append_115)
-lib_LTLIBRARIES = $(am__append_114)
+lib_LIBRARIES = $(am__append_116)
+lib_LTLIBRARIES = $(am__append_115)
 dist_man_MANS = synctexdir/man1/synctex.1 synctexdir/man5/synctex.5
 nodist_man_MANS = 
 TEST_EXTENSIONS = .pl .test
@@ -2371,21 +2372,22 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
 	mfluadir/mfluatrap/mfluatrap.diffs mplibdir/ChangeLog \
 	$(mpost_web) $(mp_tests) pmpostdir/ChangeLog $(pmpost_web) \
 	$(pmpost_tests) $(upmpost_tests) pmpostdir/tests/psample.mp \
-	$(libmplib_web) $(etex_web_srcs) $(etex_ch_srcs) \
-	etexdir/ChangeLog etexdir/etex_gen.tex $(etex_tests) \
-	tests/wprob.tex etexdir/etrip/etrip.diffs \
-	etexdir/etrip/etrip.fot etexdir/etrip/etrip.log \
-	etexdir/etrip/etrip.out etexdir/etrip/etrip.pl \
-	etexdir/etrip/etrip.tex etexdir/etrip/etrip.typ \
-	etexdir/etrip/etrip1.in etexdir/etrip/etrip2.in \
-	etexdir/etrip/etrip3.in etexdir/etrip/etripin.log \
-	etexdir/etrip/etripman.tex etexdir/etrip/texmf.cnf \
-	etexdir/etrip/trip2.in $(ptex_web_srcs) $(ptex_ch_srcs) \
-	ptexdir/ptex.defines ptexdir/pbibtex.ch web2c/cvtbib.sed \
-	ptexdir/pdvitype.ch ptexdir/ppltotf.ch ptexdir/ptftopl.ch \
-	ptexdir/COPYRIGHT ptexdir/COPYRIGHT.jis ptexdir/ChangeLog \
-	ptexdir/Changes.txt ptexdir/INSTALL.txt ptexdir/README.txt \
-	$(ptex_tests) $(pweb_tests) ptexdir/tests/nissya_bib.aux \
+	README README.old.ja Changes.old.ja $(libmplib_web) \
+	$(etex_web_srcs) $(etex_ch_srcs) etexdir/ChangeLog \
+	etexdir/etex_gen.tex $(etex_tests) tests/wprob.tex \
+	etexdir/etrip/etrip.diffs etexdir/etrip/etrip.fot \
+	etexdir/etrip/etrip.log etexdir/etrip/etrip.out \
+	etexdir/etrip/etrip.pl etexdir/etrip/etrip.tex \
+	etexdir/etrip/etrip.typ etexdir/etrip/etrip1.in \
+	etexdir/etrip/etrip2.in etexdir/etrip/etrip3.in \
+	etexdir/etrip/etripin.log etexdir/etrip/etripman.tex \
+	etexdir/etrip/texmf.cnf etexdir/etrip/trip2.in \
+	$(ptex_web_srcs) $(ptex_ch_srcs) ptexdir/ptex.defines \
+	ptexdir/pbibtex.ch web2c/cvtbib.sed ptexdir/pdvitype.ch \
+	ptexdir/ppltotf.ch ptexdir/ptftopl.ch ptexdir/COPYRIGHT \
+	ptexdir/COPYRIGHT.jis ptexdir/ChangeLog ptexdir/Changes.txt \
+	ptexdir/INSTALL.txt ptexdir/README.txt $(ptex_tests) \
+	$(pweb_tests) ptexdir/tests/nissya_bib.aux \
 	ptexdir/tests/nissya.bst ptexdir/tests/sample.bib \
 	tests/memdata1.bst tests/memdata2.bst tests/memdata3.bst \
 	ptexdir/tests/goth10.tfm ptexdir/tests/sample.dvi \
@@ -2404,8 +2406,9 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \
 	ptexdir/ppltotf.ch uptexdir/uppltotf.ch ptexdir/ptftopl.ch \
 	uptexdir/uptftopl.ch uptexdir/COPYRIGHT uptexdir/COPYRIGHT.jis \
 	uptexdir/ChangeLog $(uptex_tests) $(upweb_tests) \
-	uptexdir/tests/min10.pl uptexdir/tests/min10.tfm \
-	uptexdir/tests/tmin10.pl uptexdir/tests/tmin10.tfm \
+	uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm \
+	uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm \
+	uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm \
 	uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf \
 	$(euptex_web_srcs) $(euptex_ch_srcs) euptexdir/euptex.defines \
 	euptexdir/COPYRIGHT euptexdir/COPYRIGHT.jis \
@@ -2696,13 +2699,13 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \
 	$(upweb_programs:=.web) uptests/xexampl.aux \
 	uptests/xexampl.bbl uptests/xexampl.blg uptests/xstory.dvityp \
 	uptests/xpagenum.typ uptests/xcmr10.tfm uptests/xcmr10.pl \
-	uptests/x*min10.* uptrip.diffs $(nodist_euptex_SOURCES) \
-	euptex.web euptex.ch euptex-web2c euptex.p euptex.pool \
-	euptex-tangle euptrip.diffs pdfprimitive-euptex.* \
-	$(nodist_pdftex_SOURCES) pdftex.ch pdftex-web2c pdftex.p \
-	pdftex.pool pdftex-tangle pwprob.log pwprob.tex pdfimage.fmt \
-	pdfimage.log pdfimage.pdf postV3.afm postV7.afm test-13.pdf \
-	test-13.xref test-15.pdf test-15.xref \
+	uptests/x*min10.* uptests/xtestnewu.* uptrip.diffs \
+	$(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \
+	euptex.p euptex.pool euptex-tangle euptrip.diffs \
+	pdfprimitive-euptex.* $(nodist_pdftex_SOURCES) pdftex.ch \
+	pdftex-web2c pdftex.p pdftex.pool pdftex-tangle pwprob.log \
+	pwprob.tex pdfimage.fmt pdfimage.log pdfimage.pdf postV3.afm \
+	postV7.afm test-13.pdf test-13.xref test-15.pdf test-15.xref \
 	$(nodist_libluatex_sources) luaimage.* luajitimage.* \
 	$(nodist_xetex_SOURCES) xetex.web xetex.ch xetex-web2c xetex.p \
 	xetex.pool xetex-tangle bug73.fmt bug73.log bug73.out \
@@ -2857,18 +2860,18 @@ tie_CPPFLAGS = $(AM_CPPFLAGS) -DNOT_WEB2C
 initex_CPPFLAGS = -DEXEPROG=\"tex.exe\"
 nodist_initex_SOURCES = callexe.c
 initex_LDADD = 
-tex_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_118)
+tex_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_119)
 
 # With --enable-ipc, TeX may need to link with -lsocket.
-tex_LDADD = $(LDADD) $(ipc_socketlibs) $(am__append_119)
+tex_LDADD = $(LDADD) $(ipc_socketlibs) $(am__append_120)
 
 # TeX C sources
 tex_c_h = texini.c tex0.c texcoerce.h texd.h
 nodist_tex_SOURCES = $(tex_c_h) tex-pool.c
-dist_tex_SOURCES = texextra.c $(am__append_121)
+dist_tex_SOURCES = texextra.c $(am__append_122)
 
 # We must create texd.h before building the tex_OBJECTS.
-tex_prereq = texd.h $(am__append_120)
+tex_prereq = texd.h $(am__append_121)
 tex_ch_srcs = \
 	tex.web \
 	tex.ch \
@@ -3063,19 +3066,19 @@ libmplib_web = mplibdir/mp.w mplibdir/psout.w mplibdir/svgout.w \
 	mplibdir/pngout.w mplibdir/mpmath.w mplibdir/mpmathbinary.w \
 	mplibdir/mpmathdecimal.w mplibdir/mpmathdouble.w \
 	mplibdir/mpstrings.w mplibdir/tfmin.w
-etex_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_122)
+etex_CPPFLAGS = $(AM_CPPFLAGS) $(am__append_123)
 
 # With --enable-ipc, e-TeX may need to link with -lsocket.
-etex_LDADD = $(LDADD) $(ipc_socketlibs) $(am__append_123)
+etex_LDADD = $(LDADD) $(ipc_socketlibs) $(am__append_124)
 
 # e-TeX C sources
 etex_c_h = etexini.c etex0.c etexcoerce.h etexd.h
 nodist_etex_SOURCES = $(etex_c_h) etex-pool.c
 dist_etex_SOURCES = etexdir/etexextra.c etexdir/etexextra.h \
-	etexdir/etex_version.h $(am__append_125)
+	etexdir/etex_version.h $(am__append_126)
 
 # We must create etexd.h and etexdir/etex_version.h before building the etex_OBJECTS.
-etex_prereq = etexd.h etexdir/etex_version.h $(am__append_124)
+etex_prereq = etexd.h etexdir/etex_version.h $(am__append_125)
 etex_web_srcs = \
 	tex.web \
 	etexdir/etex.ch
@@ -3101,20 +3104,20 @@ pweb_programs = pbibtex pdvitype ppltotf ptftopl
 pproglib = lib/libp.a
 libkanji_a_SOURCES = ptexdir/kanji.c ptexdir/kanji.h
 libkanji_a_CPPFLAGS = $(ptex_cppflags)
-ptex_CPPFLAGS = $(ptex_cppflags) $(am__append_126)
+ptex_CPPFLAGS = $(ptex_cppflags) $(am__append_127)
 
 # With --enable-ipc, pTeX may need to link with -lsocket.
-ptex_LDADD = $(ptex_ldadd) $(ipc_socketlibs) $(am__append_127)
+ptex_LDADD = $(ptex_ldadd) $(ipc_socketlibs) $(am__append_128)
 ptex_DEPENDENCIES = $(ptex_dependencies)
 
 # pTeX C sources
 ptex_c_h = ptexini.c ptex0.c ptexcoerce.h ptexd.h
 nodist_ptex_SOURCES = $(ptex_c_h) ptex-pool.c
 dist_ptex_SOURCES = ptexdir/ptexextra.c ptexdir/ptexextra.h \
-	ptexdir/ptex_version.h $(am__append_129)
+	ptexdir/ptex_version.h $(am__append_130)
 
 # We must create ptexd.h and ptexdir/ptex_version.h before building the ptex_OBJECTS.
-ptex_prereq = ptexd.h ptexdir/ptex_version.h $(am__append_128)
+ptex_prereq = ptexd.h ptexdir/ptex_version.h $(am__append_129)
 ptex_web_srcs = \
 	tex.web \
 	tex.ch
@@ -3154,22 +3157,22 @@ pweb_tests = ptexdir/pbibtex.test ptexdir/pdvitype.test \
 	ptexdir/pbibtex-longline-test.pl ptexdir/pbibtex-mem.test \
 	ptexdir/nissya.test ptexdir/sample.test ptexdir/yokotate.test
 eptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) -I$(srcdir)/libmd5 \
-	$(am__append_134)
+	$(am__append_135)
 
 # With --enable-ipc, e-pTeX may need to link with -lsocket.
 eptex_LDADD = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) \
-	$(ipc_socketlibs) libmd5.a $(am__append_135)
+	$(ipc_socketlibs) libmd5.a $(am__append_136)
 eptex_DEPENDENCIES = libkanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies) libmd5.a
 
 # e-pTeX C sources
 eptex_c_h = eptexini.c eptex0.c eptexcoerce.h eptexd.h
 nodist_eptex_SOURCES = $(eptex_c_h) eptex-pool.c
 dist_eptex_SOURCES = eptexdir/eptexextra.c eptexdir/eptexextra.h \
-	eptexdir/eptex_version.h $(am__append_137)
+	eptexdir/eptex_version.h $(am__append_138)
 
 # We must create eptexd.h and eptexdir/eptex_version.h before building the eptex_OBJECTS.
 eptex_prereq = eptexd.h etexdir/etex_version.h ptexdir/ptex_version.h \
-	eptexdir/eptex_version.h $(am__append_136)
+	eptexdir/eptex_version.h $(am__append_137)
 eptex_web_srcs = \
 	tex.web \
 	etexdir/etex.ch \
@@ -3199,21 +3202,21 @@ up_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/uptexdir:$(srcdir) $(buildenv)
 upweb_programs = upbibtex updvitype uppltotf uptftopl
 libukanji_a_SOURCES = uptexdir/kanji.c uptexdir/kanji.h uptexdir/kanji_dump.c
 libukanji_a_CPPFLAGS = $(uptex_cppflags)
-uptex_CPPFLAGS = $(uptex_cppflags) $(am__append_130)
+uptex_CPPFLAGS = $(uptex_cppflags) $(am__append_131)
 
 # With --enable-ipc, upTeX may need to link with -lsocket.
-uptex_LDADD = $(uptex_ldadd) $(ipc_socketlibs) $(am__append_131)
+uptex_LDADD = $(uptex_ldadd) $(ipc_socketlibs) $(am__append_132)
 uptex_DEPENDENCIES = $(uptex_dependencies)
 
 # upTeX C sources
 uptex_c_h = uptexini.c uptex0.c uptexcoerce.h uptexd.h
 nodist_uptex_SOURCES = $(uptex_c_h) uptex-pool.c
 dist_uptex_SOURCES = uptexdir/uptexextra.c uptexdir/uptexextra.h \
-	uptexdir/uptex_version.h $(am__append_133)
+	uptexdir/uptex_version.h $(am__append_134)
 
 # We must create uptexd.h and uptexdir/uptex_version.h before building the uptex_OBJECTS.
 uptex_prereq = uptexd.h ptexdir/ptex_version.h \
-	uptexdir/uptex_version.h $(am__append_132)
+	uptexdir/uptex_version.h $(am__append_133)
 uptex_web_srcs = \
 	tex.web \
 	tex.ch
@@ -3252,26 +3255,27 @@ upweb_tests = \
 	uptexdir/updvitype.test \
 	uptexdir/uppltotf.test \
 	uptexdir/uptftopl.test \
-	uptexdir/yokotate.test
+	uptexdir/yokotate.test \
+	uptexdir/newjfm.test
 
 euptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS) \
-	-I$(srcdir)/libmd5 $(am__append_138)
+	-I$(srcdir)/libmd5 $(am__append_139)
 
 # With --enable-ipc, e-upTeX may need to link with -lsocket.
 euptex_LDADD = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) \
-	$(ipc_socketlibs) libmd5.a $(am__append_139)
+	$(ipc_socketlibs) libmd5.a $(am__append_140)
 euptex_DEPENDENCIES = libukanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies) libmd5.a
 
 # e-upTeX C sources
 euptex_c_h = euptexini.c euptex0.c euptexcoerce.h euptexd.h
 nodist_euptex_SOURCES = $(euptex_c_h) euptex-pool.c
 dist_euptex_SOURCES = euptexdir/euptexextra.c euptexdir/euptexextra.h \
-	$(am__append_141)
+	$(am__append_142)
 
 # We must create euptexd.h and [eu]ptexdir/[eu]ptex_version.h before building the euptex_OBJECTS.
 euptex_prereq = euptexd.h etexdir/etex_version.h \
 	ptexdir/ptex_version.h eptexdir/eptex_version.h \
-	uptexdir/uptex_version.h $(am__append_140)
+	uptexdir/uptex_version.h $(am__append_141)
 euptex_web_srcs = \
 	tex.web \
 	etexdir/etex.ch \
@@ -3285,8 +3289,8 @@ euptex_ch_srcs = \
 	uptexdir/uptex-m.ch \
 	euptexdir/euptex.ch0 \
 	eptexdir/eptex.ech \
-	euptexdir/euptex.ch1 \
 	eptexdir/etex.ch1 \
+	euptexdir/euptex.ch1 \
 	$(euptex_ch_synctex) \
 	eptexdir/fam256.ch \
 	euptexdir/pdfstrcmp-eup-pre.ch \
@@ -3327,7 +3331,7 @@ pdftex_dependencies = $(proglib) $(KPATHSEA_DEPEND) $(LIBPNG_DEPEND) \
 # Force Automake to use CXXLD for linking
 nodist_EXTRA_pdftex_SOURCES = dummy.cxx
 pdf_tangle = WEBINPUTS=.:$(srcdir)/pdftexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
-pdftex_CPPFLAGS = $(pdftex_cppflags) $(am__append_142)
+pdftex_CPPFLAGS = $(pdftex_cppflags) $(am__append_143)
 pdftex_CXXFLAGS = $(WARNING_CXXFLAGS)
 
 # With --enable-ipc, pdfTeX may need to link with -lsocket.
@@ -3340,7 +3344,7 @@ pdftex_c_h = pdftexini.c pdftex0.c pdftexcoerce.h pdftexd.h
 nodist_pdftex_SOURCES = $(pdftex_c_h) pdftex-pool.c
 dist_pdftex_SOURCES = pdftexdir/pdftexextra.c pdftexdir/pdftexextra.h \
 	pdftexdir/pdftex_version.h pdftexdir/etex_version.h \
-	$(am__append_143)
+	$(am__append_144)
 pdftex_ch_srcs = \
 	pdftexdir/pdftex.web \
 	pdftexdir/tex.ch0 \
@@ -3847,17 +3851,17 @@ xetex_cppflags = $(AM_CPPFLAGS) -I$(srcdir)/xetexdir $(ICU_INCLUDES) \
 	$(FREETYPE2_INCLUDES) $(TECKIT_INCLUDES) $(HARFBUZZ_INCLUDES) \
 	$(GRAPHITE2_INCLUDES) $(POPPLER_INCLUDES) $(LIBPNG_INCLUDES) \
 	$(ZLIB_INCLUDES) -I$(srcdir)/libmd5 $(am__append_103) \
-	$(am__append_104)
+	$(am__append_105)
 xetex_ldadd = $(libxetex) $(HARFBUZZ_LIBS) $(GRAPHITE2_LIBS) \
 	$(ICU_LIBS) $(ICU_LIBS_EXTRA) $(TECKIT_LIBS) $(POPPLER_LIBS) \
 	$(LIBPNG_LIBS) $(FREETYPE2_LIBS) $(ZLIB_LIBS) libmd5.a \
-	$(am__append_105)
+	$(am__append_106)
 xetex_dependencies = $(proglib) $(KPATHSEA_DEPEND) $(ICU_DEPEND) \
 	$(TECKIT_DEPEND) $(HARFBUZZ_DEPEND) $(GRAPHITE2_DEPEND) \
 	$(POPPLER_DEPEND) $(LIBPNG_DEPEND) $(FREETYPE2_DEPEND) \
 	$(ZLIB_DEPEND) libmd5.a
 @XETEX_MACOSX_TRUE@xetex_LDFLAGS = -framework ApplicationServices -framework Cocoa
-xetex_CPPFLAGS = $(xetex_cppflags) $(am__append_144)
+xetex_CPPFLAGS = $(xetex_cppflags) $(am__append_145)
 xetex_CFLAGS = $(WARNING_CFLAGS)
 xetex_CXXFLAGS = # $(WARNING_CXXFLAGS)
 xetex_LDADD = $(xetex_ldadd) $(LDADD) $(ipc_socketlibs)
@@ -3868,7 +3872,7 @@ xetex_c_h = xetexini.c xetex0.c xetexcoerce.h xetexd.h
 nodist_xetex_SOURCES = $(xetex_c_h) xetex-pool.c
 dist_xetex_SOURCES = xetexdir/xetexextra.c xetexdir/xetexextra.h \
 	xetexdir/etex_version.h xetexdir/xetex_version.h \
-	$(am__append_145)
+	$(am__append_146)
 xetex_ch_srcs = \
 	xetexdir/xetex.web \
 	xetexdir/tex.ch0 \
@@ -3895,7 +3899,7 @@ libxetex_a_SOURCES = xetexdir/XeTeXFontInst.cpp \
 	xetexdir/image/jpegimage.h xetexdir/image/mfileio.c \
 	xetexdir/image/mfileio.h xetexdir/image/numbers.c \
 	xetexdir/image/numbers.h xetexdir/image/pngimage.c \
-	xetexdir/image/pngimage.h $(am__append_106) $(am__append_107)
+	xetexdir/image/pngimage.h $(am__append_107) $(am__append_108)
 
 # We must create xetexd.h etc. before building the libxetex_a_OBJECTS.
 libxetex_prereq = xetexd.h $(xetex_dependencies)
@@ -3999,12 +4003,12 @@ synctex_SOURCES = \
 	synctexdir/synctex_main.c
 
 synctex_CPPFLAGS = -I$(srcdir)/synctexdir
-synctex_LDADD = $(libsynctex) $(ZLIB_LIBS) $(am__append_116)
+synctex_LDADD = $(libsynctex) $(ZLIB_LIBS) $(am__append_117)
 libsynctex = $(LTLIBSYNCTEX) $(LIBSYNCTEX)
 libsynctex_la_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
 libsynctex_a_CPPFLAGS = $(libsynctex_la_CPPFLAGS)
 libsynctex_la_LDFLAGS = -rpath @libdir@ -bindir @bindir@ -no-undefined -version-info $(SYNCTEX_LT_VERSINFO)
-libsynctex_la_LIBADD = $(ZLIB_LIBS) $(am__append_117)
+libsynctex_la_LIBADD = $(ZLIB_LIBS) $(am__append_118)
 libsynctex_la_SOURCES = \
 	synctexdir/synctex_parser.c \
 	synctexdir/synctex_parser_local.h \
@@ -17563,6 +17567,7 @@ uptexdir/updvitype.log: updvitype$(EXEEXT)
 uptexdir/uppltotf.log: uppltotf$(EXEEXT)
 uptexdir/uptftopl.log: uptftopl$(EXEEXT)
 uptexdir/yokotate.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
+uptexdir/newjfm.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
 uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
 	$(triptrap_diffs) $@
 .PHONY: uptrip-clean
diff --git a/source/texk/web2c/configure b/source/texk/web2c/configure
index 357d1a9f9..ce982e84f 100755
--- a/source/texk/web2c/configure
+++ b/source/texk/web2c/configure
@@ -19007,8 +19007,8 @@ if test "x$enable_xetex" = xyes \
    || test "x$enable_luatex" = xyes \
    || test "x$enable_luajittex" = xyes \
    || test "x$enable_luatex53" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: LuaTeX enabled" >&5
-$as_echo "$as_me: LuaTeX enabled" >&requiring C++11 support;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: LuaTeX enabled, requiring C++11 support" >&5
+$as_echo "$as_me: LuaTeX enabled, requiring C++11 support" >&6;}
     ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=true
   ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
diff --git a/source/texk/web2c/configure.ac b/source/texk/web2c/configure.ac
index 393fbc220..3a4b51598 100644
--- a/source/texk/web2c/configure.ac
+++ b/source/texk/web2c/configure.ac
@@ -1,4 +1,4 @@
-dnl $Id: configure.ac 46257 2018-01-09 18:53:05Z karl $
+dnl $Id: configure.ac 46407 2018-01-21 23:42:12Z karl $
 dnl Process this file with Autoconf to produce a configure script for Web2c.
 dnl
 dnl   Copyright 2018 Karl Berry <tex-live@tug.org>
@@ -51,7 +51,7 @@ if test "x$enable_xetex" = xyes \
    || test "x$enable_luatex" = xyes \
    || test "x$enable_luajittex" = xyes \
    || test "x$enable_luatex53" = xyes; then
-  AC_MSG_NOTICE(LuaTeX enabled, requiring C++11 support)
+  AC_MSG_NOTICE([LuaTeX enabled, requiring C++11 support])
   AX_CXX_COMPILE_STDCXX([11])
 fi
 
diff --git a/source/texk/web2c/cwebboot.cin b/source/texk/web2c/cwebboot.cin
index 2e9be01a8..38f65b8ef 100644
--- a/source/texk/web2c/cwebboot.cin
+++ b/source/texk/web2c/cwebboot.cin
@@ -1098,7 +1098,7 @@ void
  fatal(const char*s,const char*t)
 #line 1182 "cwebdir/common.w"
 {
-if(*s)printf(s);
+if(*s)printf("%s",s);
 err_print(t);
 history= fatal_message;exit(wrap_up());
 }
diff --git a/source/texk/web2c/cwebdir/ChangeLog b/source/texk/web2c/cwebdir/ChangeLog
index 095ee8262..8e71c0220 100644
--- a/source/texk/web2c/cwebdir/ChangeLog
+++ b/source/texk/web2c/cwebdir/ChangeLog
@@ -1,3 +1,11 @@
+2018-01-18  Karl Berry  <karl@tug.org>
+
+	* cweave.w,
+	* common.w,
+	* common.c,
+	* ../cwebboot.cin: printf %s instead of direct string (from Debian).
+	(Also sent to DEK.)
+
 2017-01-29  Karl Berry  <karl@tug.org>
 
 	* ../cwebboot.cin,
diff --git a/source/texk/web2c/cwebdir/common.c b/source/texk/web2c/cwebdir/common.c
index 2bf7a9d4a..25bd81007 100644
--- a/source/texk/web2c/cwebdir/common.c
+++ b/source/texk/web2c/cwebdir/common.c
@@ -1063,7 +1063,7 @@ void
 fatal(s,t)
 char*s,*t;
 {
-if(*s)printf(s);
+if(*s)printf("%s",s);
 err_print(t);
 history= fatal_message;exit(wrap_up());
 }
diff --git a/source/texk/web2c/cwebdir/common.w b/source/texk/web2c/cwebdir/common.w
index d8aacfb7b..da3df6d3b 100644
--- a/source/texk/web2c/cwebdir/common.w
+++ b/source/texk/web2c/cwebdir/common.w
@@ -1180,7 +1180,7 @@ concatenated to print the final error message.
 fatal(s,t)
   char *s,*t;
 {
-  if (*s) printf(s);
+  if (*s) printf("%s",s);
   err_print(t);
   history=fatal_message; exit(wrap_up());
 }
diff --git a/source/texk/web2c/cwebdir/cweave.w b/source/texk/web2c/cwebdir/cweave.w
index e06762b1f..38afa9344 100644
--- a/source/texk/web2c/cwebdir/cweave.w
+++ b/source/texk/web2c/cwebdir/cweave.w
@@ -1785,7 +1785,7 @@ void
 print_cat(c) /* symbolic printout of a category */
 eight_bits c;
 {
-  printf(cat_name[c]);
+  printf("%s",cat_name[c]);
 }
 
 @ The token lists for translated \TEX/ output contain some special control
diff --git a/source/texk/web2c/euptexdir/am/euptex.am b/source/texk/web2c/euptexdir/am/euptex.am
index 84c55e4b5..21ab6a9a7 100644
--- a/source/texk/web2c/euptexdir/am/euptex.am
+++ b/source/texk/web2c/euptexdir/am/euptex.am
@@ -59,8 +59,8 @@ euptex_ch_srcs = \
 	uptexdir/uptex-m.ch \
 	euptexdir/euptex.ch0 \
 	eptexdir/eptex.ech \
-	euptexdir/euptex.ch1 \
 	eptexdir/etex.ch1 \
+	euptexdir/euptex.ch1 \
 	$(euptex_ch_synctex) \
 	eptexdir/fam256.ch \
 	euptexdir/pdfstrcmp-eup-pre.ch \
diff --git a/source/texk/web2c/man/ChangeLog b/source/texk/web2c/man/ChangeLog
index f2fbe8e46..90fc42c79 100644
--- a/source/texk/web2c/man/ChangeLog
+++ b/source/texk/web2c/man/ChangeLog
@@ -1,3 +1,7 @@
+2018-01-18  Karl Berry  <karl@freefriends.org>
+
+	* mf.man: spacing, no openin, per Debian.
+
 2017-01-13  Karl Berry  <karl@tug.org>
 
 	* ofm2opl.man,
diff --git a/source/texk/web2c/man/mf.man b/source/texk/web2c/man/mf.man
index 8c092e17c..d43830621 100644
--- a/source/texk/web2c/man/mf.man
+++ b/source/texk/web2c/man/mf.man
@@ -1,4 +1,4 @@
-.TH MF 1 "16 June 2015" "Web2C @VERSION@"
+.TH MF 1 "17 January 2018" "Web2C @VERSION@"
 .\"=====================================================================
 .if n .ds MF Metafont
 .if t .ds MF Metafont
@@ -54,7 +54,7 @@ file.  When called as
 it will use the
 .I plain
 base.  When called under any other name, \*(MF will use that name as
-the name of the base to use.   For example, when called as
+the name of the base to use.  For example, when called as
 .B mf
 the
 .I mf
@@ -90,7 +90,7 @@ keep \*(MF from thinking that you want to produce a font called
 .IR mode .
 (Or you can just say
 .I mf
-and give the other stuff on the next line, without quotes.) Other
+and give the other stuff on the next line, without quotes.)  Other
 control sequences, such as
 .I batchmode
 (for silent operation) can also appear.
@@ -115,7 +115,7 @@ example is shown generically as <printengine>, a symbolic term for which
 the name of an actual device or, most commonly, the name
 .I localfont
 (see below) must
-be substituted. If the mode is not specified or is not valid for your
+be substituted.  If the mode is not specified or is not valid for your
 site, \*(MF will default to
 .I proof
 mode which produces
@@ -367,15 +367,13 @@ files in it, if they cannot be put in the current directory.  Again, see
 .B MFINPUTS
 Search path for
 .I input
-and
-.I openin
 files.
 .TP
 .B MFEDIT
 Command template for switching to editor.
 .TP
 .B MFTERM
-Determines the online graphics display. If MFTERM is not set,
+Determines the online graphics display.  If MFTERM is not set,
 and DISPLAY is set, the Metafont window support for X is used.
 (DISPLAY must be set to a valid X server specification, as usual.)
 If neither MFTERM nor DISPLAY is set, TERM is used to guess the window
@@ -434,7 +432,7 @@ documentation for this version of \*(MF can be found in the info manual
 .\"=====================================================================
 .SH BUGS
 On January 4, 1986 the ``final'' bug in \*(MF was discovered
-and removed. If an error still lurks in the code, Donald E. Knuth promises to
+and removed.  If an error still lurks in the code, Donald E. Knuth promises to
 pay a finder's fee which doubles every year to the first person who finds
 it.  Happy hunting.
 .\"=====================================================================
@@ -472,6 +470,7 @@ you see everywhere, especially those of your own design.''
 .BR gftodvi (1),
 .BR gftype (1),
 .BR mft (1),
+.BR mpost (1),
 .BR pltotf (1),
 .BR tftopl (1).
 .\"=====================================================================
diff --git a/source/texk/web2c/omegafonts/Makefile.in b/source/texk/web2c/omegafonts/Makefile.in
index 4c03b3a92..b4af0b04b 100644
--- a/source/texk/web2c/omegafonts/Makefile.in
+++ b/source/texk/web2c/omegafonts/Makefile.in
@@ -113,6 +113,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
 	$(top_srcdir)/../../m4/kpse-libpng-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
 	$(top_srcdir)/../../m4/kpse-lua52-flags.m4 \
+	$(top_srcdir)/../../m4/kpse-lua53-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-luajit-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
 	$(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \
@@ -542,6 +543,10 @@ LUA52_DEFINES = @LUA52_DEFINES@
 LUA52_DEPEND = @LUA52_DEPEND@
 LUA52_INCLUDES = @LUA52_INCLUDES@
 LUA52_LIBS = @LUA52_LIBS@
+LUA53_DEFINES = @LUA53_DEFINES@
+LUA53_DEPEND = @LUA53_DEPEND@
+LUA53_INCLUDES = @LUA53_INCLUDES@
+LUA53_LIBS = @LUA53_LIBS@
 LUAJIT_DEFINES = @LUAJIT_DEFINES@
 LUAJIT_DEPEND = @LUAJIT_DEPEND@
 LUAJIT_INCLUDES = @LUAJIT_INCLUDES@
diff --git a/source/texk/web2c/otps/Makefile.in b/source/texk/web2c/otps/Makefile.in
index f9dc26db6..f08b4d1b8 100644
--- a/source/texk/web2c/otps/Makefile.in
+++ b/source/texk/web2c/otps/Makefile.in
@@ -113,6 +113,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
 	$(top_srcdir)/../../m4/kpse-libpng-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
 	$(top_srcdir)/../../m4/kpse-lua52-flags.m4 \
+	$(top_srcdir)/../../m4/kpse-lua53-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-luajit-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
 	$(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \
@@ -582,6 +583,10 @@ LUA52_DEFINES = @LUA52_DEFINES@
 LUA52_DEPEND = @LUA52_DEPEND@
 LUA52_INCLUDES = @LUA52_INCLUDES@
 LUA52_LIBS = @LUA52_LIBS@
+LUA53_DEFINES = @LUA53_DEFINES@
+LUA53_DEPEND = @LUA53_DEPEND@
+LUA53_INCLUDES = @LUA53_INCLUDES@
+LUA53_LIBS = @LUA53_LIBS@
 LUAJIT_DEFINES = @LUAJIT_DEFINES@
 LUAJIT_DEPEND = @LUAJIT_DEPEND@
 LUAJIT_INCLUDES = @LUAJIT_INCLUDES@
diff --git a/source/texk/web2c/otps/win32/Makefile.in b/source/texk/web2c/otps/win32/Makefile.in
index de340f943..e380d1ee5 100644
--- a/source/texk/web2c/otps/win32/Makefile.in
+++ b/source/texk/web2c/otps/win32/Makefile.in
@@ -110,6 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
 	$(top_srcdir)/../../m4/kpse-libpng-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
 	$(top_srcdir)/../../m4/kpse-lua52-flags.m4 \
+	$(top_srcdir)/../../m4/kpse-lua53-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-luajit-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
 	$(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \
@@ -304,6 +305,10 @@ LUA52_DEFINES = @LUA52_DEFINES@
 LUA52_DEPEND = @LUA52_DEPEND@
 LUA52_INCLUDES = @LUA52_INCLUDES@
 LUA52_LIBS = @LUA52_LIBS@
+LUA53_DEFINES = @LUA53_DEFINES@
+LUA53_DEPEND = @LUA53_DEPEND@
+LUA53_INCLUDES = @LUA53_INCLUDES@
+LUA53_LIBS = @LUA53_LIBS@
 LUAJIT_DEFINES = @LUAJIT_DEFINES@
 LUAJIT_DEPEND = @LUAJIT_DEPEND@
 LUAJIT_INCLUDES = @LUAJIT_INCLUDES@
diff --git a/source/texk/web2c/pmpostdir/am/pmpost.am b/source/texk/web2c/pmpostdir/am/pmpost.am
index a70c1de2d..e9b10edea 100644
--- a/source/texk/web2c/pmpostdir/am/pmpost.am
+++ b/source/texk/web2c/pmpostdir/am/pmpost.am
@@ -182,6 +182,7 @@ TESTS += $(upmpost_tests)
 endif UPMP
 
 EXTRA_DIST += pmpostdir/tests/psample.mp
+EXTRA_DIST += README README.old.ja Changes.old.ja
 ## pmpostdir/pmpsamp.test
 DISTCLEANFILES += pmpsamp.*
 ## pmpostdir/upmpsamp.test
diff --git a/source/texk/web2c/synctexdir/ChangeLog b/source/texk/web2c/synctexdir/ChangeLog
index 56c57819b..83d1d483c 100644
--- a/source/texk/web2c/synctexdir/ChangeLog
+++ b/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,7 @@
+2018-01-18  Karl Berry  <karl@freefriends.org>
+
+	* man5/synctex.5: spacing, typos, per Debian.
+
 2017-07-18  Akira Kakuto  <kakuto@fuk.kindai.ac.jp>
 
 	* synctex_parser_utils.c: mingw32 also may not have syslog.h.
diff --git a/source/texk/web2c/tiedir/ChangeLog b/source/texk/web2c/tiedir/ChangeLog
index 8bc990c1a..28d2e6b46 100644
--- a/source/texk/web2c/tiedir/ChangeLog
+++ b/source/texk/web2c/tiedir/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-18  Karl Berry  <karl@tug.org>
+
+	* tie.w (print, print_ln): printf %s instead of direct string
+	(from Debian).
+
 2014-02-12  Peter Breitenlohner  <peb@mppmu.mpg.de>
 
 	* tie-w2c.ch: Handle input lines with CRLF.
diff --git a/source/texk/web2c/tiedir/tie.w b/source/texk/web2c/tiedir/tie.w
index 227328b72..e40d48735 100644
--- a/source/texk/web2c/tiedir/tie.w
+++ b/source/texk/web2c/tiedir/tie.w
@@ -25,7 +25,7 @@
 %		also repaired loop control for end of changes test (92-09-24)
 % Version 2.4 included <stdlib.h> instead of <malloc.h> when
 %		used with ANSI-C				   (92-12-17)
-%
+% See ChangeLog for further changes.
 
 % Here is TeX material that gets inserted after \input cwebmac
 
@@ -458,14 +458,14 @@ for terminating an output line and writing strings to the user.
 
 @^system dependencies@>
 @d term_out  stdout
-@d print(a)  fprintf(term_out,a) /* `|print|' means write on the terminal */
+@d print(a)  fprintf(term_out,"%s",a) /* `|print|' means write on the terminal */
 @d print2(a,b)  fprintf(term_out,a,b) /* same with two arguments */
 @d print3(a,b,c)  fprintf(term_out,a,b,c) /* same with three arguments */
 @d print_c(v)  fputc(v,term_out); /* print a single character */
 @d new_line(v)  fputc('\n',v) /* start new line */
 @d term_new_line  new_line(term_out)
 	/* start new line of the terminal */
-@d print_ln(v)  {fprintf(term_out,v);term_new_line;}
+@d print_ln(v)  {fprintf(term_out,"%s",v);term_new_line;}
 	/* `|print|' and then start new line */
 @d print2_ln(a,b)  {print2(a,b);term_new_line;} /* same with two arguments */
 @d print3_ln(a,b,c)  {print3(a,b,c);term_new_line;}
diff --git a/source/texk/web2c/uptexdir/am/uptex.am b/source/texk/web2c/uptexdir/am/uptex.am
index 40babfa59..594d2cc2c 100644
--- a/source/texk/web2c/uptexdir/am/uptex.am
+++ b/source/texk/web2c/uptexdir/am/uptex.am
@@ -163,12 +163,14 @@ upweb_tests = \
 	uptexdir/updvitype.test \
 	uptexdir/uppltotf.test \
 	uptexdir/uptftopl.test \
-	uptexdir/yokotate.test
+	uptexdir/yokotate.test \
+	uptexdir/newjfm.test
 uptexdir/upbibtex.log: upbibtex$(EXEEXT)
 uptexdir/updvitype.log: updvitype$(EXEEXT)
 uptexdir/uppltotf.log: uppltotf$(EXEEXT)
 uptexdir/uptftopl.log: uptftopl$(EXEEXT)
 uptexdir/yokotate.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
+uptexdir/newjfm.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
 
 EXTRA_DIST += $(uptex_tests) $(upweb_tests)
 DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \
@@ -194,9 +196,10 @@ DISTCLEANFILES += uptests/xcmr10.tfm
 ## uptexdir/uptftopl.test
 DISTCLEANFILES += uptests/xcmr10.pl
 ## uptexdir/yokotate.test
-EXTRA_DIST += uptexdir/tests/min10.pl uptexdir/tests/min10.tfm
-EXTRA_DIST += uptexdir/tests/tmin10.pl uptexdir/tests/tmin10.tfm
-DISTCLEANFILES += uptests/x*min10.*
+EXTRA_DIST += uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm
+EXTRA_DIST += uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm
+EXTRA_DIST += uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm
+DISTCLEANFILES += uptests/x*min10.* uptests/xtestnewu.*
 ## uptexdir/uptriptest
 EXTRA_DIST += uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf
 uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
diff --git a/source/texk/web2c/window/Makefile.in b/source/texk/web2c/window/Makefile.in
index 6948342d0..2eaac0f9b 100644
--- a/source/texk/web2c/window/Makefile.in
+++ b/source/texk/web2c/window/Makefile.in
@@ -110,6 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/web2c-disable.m4 \
 	$(top_srcdir)/../../m4/kpse-libpng-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-lt-hack.m4 \
 	$(top_srcdir)/../../m4/kpse-lua52-flags.m4 \
+	$(top_srcdir)/../../m4/kpse-lua53-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-luajit-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-macos-framework.m4 \
 	$(top_srcdir)/../../m4/kpse-mpfr-flags.m4 \
@@ -314,6 +315,10 @@ LUA52_DEFINES = @LUA52_DEFINES@
 LUA52_DEPEND = @LUA52_DEPEND@
 LUA52_INCLUDES = @LUA52_INCLUDES@
 LUA52_LIBS = @LUA52_LIBS@
+LUA53_DEFINES = @LUA53_DEFINES@
+LUA53_DEPEND = @LUA53_DEPEND@
+LUA53_INCLUDES = @LUA53_INCLUDES@
+LUA53_LIBS = @LUA53_LIBS@
 LUAJIT_DEFINES = @LUAJIT_DEFINES@
 LUAJIT_DEPEND = @LUAJIT_DEPEND@
 LUAJIT_INCLUDES = @LUAJIT_INCLUDES@
diff --git a/source/texk/web2c/xetexdir/am/xetex.am b/source/texk/web2c/xetexdir/am/xetex.am
index f6175bf93..1fc196da0 100644
--- a/source/texk/web2c/xetexdir/am/xetex.am
+++ b/source/texk/web2c/xetexdir/am/xetex.am
@@ -1,4 +1,4 @@
-## $Id: xetex.am 44086 2017-04-27 21:38:29Z karl $
+## $Id: xetex.am 46353 2018-01-17 22:54:13Z karl $
 ## texk/web2c/xetexdir/am/xetex.am: Makefile fragment for XeTeX.
 ##
 ## Copyright 2017 Karl Berry <tex-live@tug.org>
@@ -58,6 +58,7 @@ if XETEX_MACOSX
 
 xetex_cppflags += -DXETEX_MAC
 xetex_LDFLAGS = -framework ApplicationServices -framework Cocoa
+OBJCXXFLAGS += -std=c++11
 
 else !XETEX_MACOSX
 
diff --git a/source/utils/README b/source/utils/README
index 0f470d100..844838791 100644
--- a/source/utils/README
+++ b/source/utils/README
@@ -1,4 +1,4 @@
-$Id: README 46254 2018-01-09 03:41:12Z kakuto $
+$Id: README 46354 2018-01-17 22:59:48Z karl $
 Public domain.  Originally written 2005 by Karl Berry.
 
 Extra utilities we (optionally) compile for TeX Live.
@@ -65,7 +65,7 @@ mkdir $clisp_toolsdir
 
 wget=wget  # or "curl -O" or whatever
 
-libsigsegv_ver=libsigsegv-2.11
+libsigsegv_ver=libsigsegv-2.12
 cd $clisp_basedir
 $wget http://ftp.gnu.org/gnu/libsigsegv/$libsigsegv_ver.tar.gz
 gzip -dc $libsigsegv_ver.tar.gz | tar xf -
-- 
GitLab