summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-15 15:10:25 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-06-15 15:10:25 +0000
commit273ed9c5b194dca51ed972db8071522d60733284 (patch)
tree5756fca71150fed35117a3b02a8648a3ec5e367f /Build
parentca19ba96de1003493b769ea8b13d12ebc0c883ca (diff)
implement compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@13751 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/configure.ac7
-rw-r--r--Build/source/m4/kpse-common.m44
-rw-r--r--Build/source/m4/kpse-setup.m417
-rw-r--r--Build/source/m4/kpse-warnings.m4111
-rw-r--r--Build/source/texk/detex/configure.ac2
-rw-r--r--Build/source/texk/dvipdfmx/configure.ac7
-rw-r--r--Build/source/texk/dvipng/configure.ac109
-rw-r--r--Build/source/texk/dvipsk/configure.ac2
-rw-r--r--Build/source/texk/dvipsk/squeeze/configure.ac2
-rw-r--r--Build/source/texk/lacheck/configure.ac2
-rw-r--r--Build/source/texk/lcdf-typetools/configure.ac13
-rw-r--r--Build/source/texk/web2c/configure.ac2
-rw-r--r--Build/source/texk/xdvik/configure.ac2
-rw-r--r--Build/source/texk/xdvik/squeeze/configure.ac2
-rw-r--r--Build/source/texk/xdvipdfmx/configure.ac9
-rw-r--r--Build/source/utils/xindy/configure.ac9
16 files changed, 247 insertions, 53 deletions
diff --git a/Build/source/configure.ac b/Build/source/configure.ac
index 15e32ac9697..53e92aa737f 100644
--- a/Build/source/configure.ac
+++ b/Build/source/configure.ac
@@ -6,7 +6,7 @@ dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([TeX Live], [2009-05-29], [tex-k@tug.org])
+AC_INIT([TeX Live], [2009-06-12], [tex-k@tug.org])
AC_PREREQ([2.63])
AC_CONFIG_SRCDIR([m4/kpse-pkgs.m4])
AC_CONFIG_AUX_DIR([build-aux])
@@ -100,8 +100,10 @@ fi
dnl We check that all required system libraries are usable, and may
dnl reduce frustration if anything is wrong by doing this first.
+dnl A native TeX Live build must not use any system libraries.
KPSE_SAVE_FLAGS
syslib_status=yes
+syslib_used=no
KPSE_ALL_SYSTEM_FLAGS
KPSE_FOR_PKGS([syslib],
[m4_sinclude(m4_if(Kpse_Pkg, [kpathsea], [texk/],
@@ -109,6 +111,9 @@ KPSE_FOR_PKGS([syslib],
if test "x$syslib_status" = xno; then
AC_MSG_ERROR([some requested system libraries failed])
fi
+if test "x$syslib_used:$enable_native_texlive_build" = xyes:yes; then
+ AC_MSG_ERROR([you can not use system libraries for a native TeX Live build])
+fi
KPSE_RESTORE_FLAGS
AS_IF([test "x$cross_compiling:$enable_xetex" = xyes:yes],
diff --git a/Build/source/m4/kpse-common.m4 b/Build/source/m4/kpse-common.m4
index 2a0d0d66e0f..926d6cbef7c 100644
--- a/Build/source/m4/kpse-common.m4
+++ b/Build/source/m4/kpse-common.m4
@@ -260,6 +260,9 @@ if test "$kb_cv_var_program_inv_name" = yes; then
[Define to 1 if you are using GNU libc or otherwise have global variables
`program_invocation_name' and `program_invocation_short_name'.])
fi
+dnl
+dnl Enable flags for compiler warnings
+KPSE_COMPILER_WARNINGS
]) # KPSE_COMMON
# KPSE_MSG_ERROR(PACKAGE, ERROR, [EXIT-STATUS = 1])
@@ -285,3 +288,4 @@ AC_DEFUN([_KPSE_CHECK_PKG_CONFIG],
[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl
]) # _KPSE_CHECK_PKG_CONFIG
+
diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4
index 5b477196aec..9321f9a0a76 100644
--- a/Build/source/m4/kpse-setup.m4
+++ b/Build/source/m4/kpse-setup.m4
@@ -39,11 +39,19 @@ if test "x$enable_native_texlive_build" = xyes; then
[yes | no], [:],
[enable_cxx_runtime_hack=yes
ac_configure_args="$ac_configure_args '--enable-cxx-runtime-hack'"])
- AS_CASE([$enable_shared],
- [yes | no], [:],
- [enable_shared=no
- ac_configure_args="$ac_configure_args '--disable-shared'"])
fi
+AS_CASE([$enable_shared],
+ [no], [:],
+ [yes ], [AS_IF([test "x$enable_native_texlive_build" = xyes],
+ [AC_MSG_ERROR([you can not use a shared Kpathsea library for a native TeX Live build])])],
+ [enable_shared=no
+ ac_configure_args="$ac_configure_args '--disable-shared'"])
+dnl Automatically pass this option to all subdirectories.
+AS_CASE([$enable_texlive_build],
+ [yes], [:],
+ [no], [AC_MSG_ERROR([you can not configure the TeX Live tree with `--disable-texlive-build'])],
+ [enable_texlive_build=yes
+ ac_configure_args="$ac_configure_args '--enable-texlive-build'"])
KPSE_OPTIONS
KPSE_ENABLE_CXX_HACK
KPSE_LIBS_PREPARE
@@ -156,6 +164,7 @@ AC_DEFUN([KPSE_CHECK_LIB],
LIBS="$AS_TR_CPP($1)_LIBS $LIBS"
AC_CHECK_FUNCS([$2], , [syslib_status=no])
AC_CHECK_HEADERS([$3], , [syslib_status=no])
+ syslib_used=yes
fi
]) # KPSE_CHECK_LIB
diff --git a/Build/source/m4/kpse-warnings.m4 b/Build/source/m4/kpse-warnings.m4
new file mode 100644
index 00000000000..545bcb6d3af
--- /dev/null
+++ b/Build/source/m4/kpse-warnings.m4
@@ -0,0 +1,111 @@
+# Public macros for the TeX Live (TL) tree.
+# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holders
+# give unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 0
+
+# KPSE_COMPILER_WARNINGS
+# ----------------------
+# Set up compiler warnings for C and C++.
+# This macro determines and substitutes WARNING_CFLAGS for the C compiler
+# and, if applicable, WARNING_CXXFLAGS for the C++ compiler. To activate
+# them a Makefile.am must use them, e.g., in AM_CFLAGS or AM_CXXFLAGS.
+AC_DEFUN([KPSE_COMPILER_WARNINGS],
+[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
+KPSE_WARNING_CFLAGS
+dnl arrange that AC_PROG_CXX uses _KPSE_WARNING_CXXFLAGS.
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_KPSE_WARNING_CXXFLAGS],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_KPSE_WARNING_CXXFLAGS])])
+]) # KPSE_COMPILER_WARNINGS
+
+KPSE_WARNING_CFLAGS
+# -----------------
+# Determine and substitute WARNING_CFLAGS for C compiler.
+AC_DEFUN([KPSE_WARNING_CFLAGS],
+[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
+AC_REQUIRE([AC_PROG_CC])[]dnl
+AC_CACHE_CHECK([what warning flags to pass to the C compiler],
+ [kpse_cv_warning_cflags],
+ [dnl
+if test "x$enable_compiler_warnings" = xno; then
+ kpse_cv_warning_cflags=
+elif test "x$GCC" = xyes; then
+ kpse_cv_warning_cflags="-Wall -Wunused"
+ if test "x$enable_compiler_warnings" != xmin; then
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations"
+ AS_CASE([`$CC -dumpversion`],
+ [3.4.* | 4.*],
+ [kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement"])
+ if test "x$enable_compiler_warnings" != xyes; then
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wimplicit -Wparentheses -Wreturn-type"
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith"
+ kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings"
+ AS_CASE([`$CC -dumpversion`],
+ [3.4.* | 4.*],
+ [kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition"])
+ fi
+ fi
+else
+ : # FIXME: warning flags for non-gcc compilers
+fi])
+WARNING_CFLAGS=$kpse_cv_warning_cflags
+AC_SUBST([WARNING_CFLAGS])
+]) # KPSE_WARNING_CFLAGS
+
+# KPSE_WARNING_CXXFLAGS
+# ---------------------
+# Determine and substitute WARNING_CXXFLAGS for C++ compiler.
+AC_DEFUN([KPSE_WARNING_CXXFLAGS],
+[AC_REQUIRE([_KPSE_COMPILER_WARNINGS_OPTION])[]dnl
+AC_REQUIRE([AC_PROG_CXX])[]dnl
+_KPSE_WARNING_CXXFLAGS
+]) # KPSE_WARNING_CXXFLAGS
+
+# _KPSE_COMPILER_WARNINGS_OPTION
+# ------------------------------
+# Internal subroutine.
+# Provide configure option `--enable-compiler-warnings=[no|min|yes|max]'
+# to enable various degrees of compiler warnings.
+AC_DEFUN([_KPSE_COMPILER_WARNINGS_OPTION],
+[AC_ARG_ENABLE([compiler-warnings],
+ AS_HELP_STRING([--enable-compiler-warnings=@<:@no|min|yes|max@:>@],
+ [Turn on compiler warnings @<:@default: yes if maintainer-mode,
+ min otherwise@:>@]))[]dnl
+AS_CASE([$enable_compiler_warnings],
+ [no | min | yes | max], [],
+ [AS_IF([test "x$enable_maintainer_mode" = xyes],
+ [enable_compiler_warnings=yes],
+ [enable_compiler_warnings=min])])
+]) # _KPSE_COMPILER_WARNINGS_OPTION
+
+# _KPSE_WARNING_CXXFLAGS
+# ----------------------
+# Internal subroutine.
+# Determine and substitute WARNING_CXXFLAGS for C++ compiler.
+m4_define([_KPSE_WARNING_CXXFLAGS],
+[AC_CACHE_CHECK([what warning flags to pass to the C++ compiler],
+ [kpse_cv_warning_cxxflags],
+ [dnl
+if test "x$enable_compiler_warnings" = xno; then
+ kpse_cv_warning_cxxflags=
+elif test "x$GXX" = xyes; then
+ kpse_cv_warning_cxxflags="-Wall -Wunused"
+ if test "x$enable_compiler_warnings" != xmin; then
+ if test "x$enable_compiler_warnings" != xyes; then
+ kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wimplicit -Wparentheses -Wreturn-type"
+ kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wswitch -Wtrigraphs -Wshadow -Wpointer-arith"
+ kpse_cv_warning_cxxflags="$kpse_cv_warning_cxxflags -Wcast-qual -Wcast-align -Wwrite-strings"
+ fi
+ fi
+else
+ : # FIXME: warning flags for non-g++ compilers
+fi])
+WARNING_CXXFLAGS=$kpse_cv_warning_cxxflags
+AC_SUBST([WARNING_CXXFLAGS])
+]) # _KPSE_WARNING_CXXFLAGS
+
diff --git a/Build/source/texk/detex/configure.ac b/Build/source/texk/detex/configure.ac
index 2413e4c1c09..be222471249 100644
--- a/Build/source/texk/detex/configure.ac
+++ b/Build/source/texk/detex/configure.ac
@@ -15,7 +15,7 @@ AC_CONFIG_MACRO_DIR([../../m4])
dnl Common code for all programs using libkpathsea.
KPSE_COMMON([detex])
-KPSE_PROG_LEX
+AC_PROG_LEX
AC_HEADER_TIME
AC_CONFIG_HEADERS([c-auto.h:c-auto.in])
diff --git a/Build/source/texk/dvipdfmx/configure.ac b/Build/source/texk/dvipdfmx/configure.ac
index 113583e2d51..a7425d5c261 100644
--- a/Build/source/texk/dvipdfmx/configure.ac
+++ b/Build/source/texk/dvipdfmx/configure.ac
@@ -57,10 +57,9 @@ CHO_CHECK_LIBPNG
KPSE_RESTORE_FLAGS
-dnl We do not provide the configure option '--enable-tetex-build', but may
-dnl inherit enable_tetex_build when part of a teTeX / TeX Live installation.
-dnl If not, check for libpaper.
-if test "x$enable_tetex_build" != xyes || test ! -d $srdir/../kpathsea; then
+dnl Check for additional libraries.
+
+if test "x$enable_texlive_build" != xyes || test ! -d $srdir/../kpathsea; then
CHO_CHECK_LIBPAPER
fi
diff --git a/Build/source/texk/dvipng/configure.ac b/Build/source/texk/dvipng/configure.ac
index 153cb8538fa..76c9f6e5dca 100644
--- a/Build/source/texk/dvipng/configure.ac
+++ b/Build/source/texk/dvipng/configure.ac
@@ -40,9 +40,9 @@ AC_CONFIG_SRCDIR([dvipng.c])
AC_CONFIG_AUX_DIR([../../build-aux])
AC_CONFIG_MACRO_DIR([../../m4])
-dnl Common code for all programs using libkpathsea.
+# Common code for all programs using libkpathsea.
KPSE_COMMON([dvipng])
-
+# Configure options for dvipng also shown at the TeX Live top-level.
m4_include([ac/dvipng.ac])
if test "x$enable_debug" != xno; then
@@ -54,29 +54,38 @@ if test "x$enable_timing" = xyes; then
AC_DEFINE([TIMING], 1, [Define as 1 to get execution time output.])
fi
-dnl Checks for programs.
-dnl FIXME
-AC_DEFINE_UNQUOTED([GS_PATH], ["gs"], [Define as the path to GhostScript.])
+# Checks for programs.
+# For a native TeX Live build '--with-gs' is ignored.
+AS_IF([test "x$enable_native_texlive_build" = xyes],
+ [with_gs=])
+AS_CASE([$with_gs],
+ ["" | yes | no], [AC_CHECK_PROG([GS], [gs], [gs])],
+ [AC_PATH_PROG([GS], ["$with_gs"])])
+AS_IF([test -n "$GS"],
+ [GS_CHECK_DEVICES],
+ [AC_MSG_WARN([Cannot find GhostScript in your PATH])
+ GS=gs])
+AC_DEFINE_UNQUOTED([GS_PATH], ["$GS"], [Define as the path to GhostScript.])
-dnl Checks for libraries.
+# Checks for libraries.
AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([basename], [gen])
-dnl Checks for header files.
+# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h sys/time.h])
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_HEADER_STDBOOL
-dnl Checks for typedefs, structures, and compiler characteristics.
+# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
-dnl Checks for library functions.
+# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_FORK
AC_FUNC_MALLOC
@@ -89,11 +98,72 @@ if test "x$enable_timing" = xyes; then
AC_CHECK_FUNCS([ftime gettimeofday])
fi
-dnl Documentation-related checks.
+# Documentation-related checks.
AC_PATH_PROG([MAKEINFO], [makeinfo], [:])
MAKEINFO_CHECK_MACROS([acronym env option])
AC_PATH_PROG([INSTALL_INFO], [install-info], [:], [$PATH /usr/sbin /sbin])
+# SELFAUTO
+# When dvipng is built as part of the TeX Live tree, the option
+# '--enable-texlive-build' is automatically passed from the top-level.
+# In that case we silently assume '--disable-selfauto-set'.
+test "x$enable_texlive_build" = xyes && enable_selfauto_set=no
+AC_ARG_ENABLE([selfauto-set],
+ AC_HELP_STRING([--enable-selfauto-set],
+ [This option will make the final binary explicitly set the
+ $SELFAUTO... variables to make it look as dvipng is installed in the
+ main texmf tree, even if it isn't. This is necessary when texmf.cnf
+ only uses $SELFAUTO... variables and dvipng is not installed in the
+ texmf tree. Otherwise, dvipng may not be able to find virtual
+ fonts, or psfonts.map. To find out, first build the binary and do
+ 'make test'. If the test fails, you need this switch.]),
+ [ if test "$enableval" = yes ; then
+ AC_MSG_CHECKING([for \$SELFAUTOLOC])
+ SELFAUTOLOC=`kpsewhich -expand-var=\\\$SELFAUTOLOC`
+ AC_DEFINE_UNQUOTED([ENV_SELFAUTOLOC], ["SELFAUTOLOC=$SELFAUTOLOC"],
+ [The environment setting for $SELFAUTOLOC])
+ AC_MSG_RESULT([$SELFAUTOLOC])
+ AC_MSG_CHECKING([for \$SELFAUTODIR])
+ SELFAUTODIR=`kpsewhich -expand-var=\\\$SELFAUTODIR`
+ AC_DEFINE_UNQUOTED([ENV_SELFAUTODIR], ["SELFAUTODIR=$SELFAUTODIR"],
+ [The environment setting for $SELFAUTODIR])
+ AC_MSG_RESULT([$SELFAUTODIR])
+ AC_MSG_CHECKING([for \$SELFAUTOPARENT])
+ SELFAUTOPARENT=`kpsewhich -expand-var=\\\$SELFAUTOPARENT`
+ AC_DEFINE_UNQUOTED([ENV_SELFAUTOPARENT], ["SELFAUTOPARENT=$SELFAUTOPARENT"],
+ [The environment setting for $SELFAUTOPARENT])
+ AC_MSG_RESULT([$SELFAUTOPARENT])
+ fi ],
+ [AC_MSG_CHECKING([for texmf.cnf])
+ TEXMF_CNF=`kpsewhich texmf.cnf`
+ AC_MSG_RESULT([$TEXMF_CNF])
+ AC_PATH_PROG([KPSEWHICH], [kpsewhich])
+ AC_MSG_CHECKING([for psfonts.map])
+ cp $KPSEWHICH .
+ PSFONTS_MAP=`./kpsewhich psfonts.map`
+ rm -f ./kpsewhich
+ if test -n "$PSFONTS_MAP"; then
+ AC_MSG_RESULT([$PSFONTS_MAP])
+ else
+ AC_MSG_RESULT([not found from outside the texmf tree])
+ AC_MSG_CHECKING([for \$SELFAUTO in texmf.cnf])
+ if grep SELFAUTO "$TEXMF_CNF" > /dev/null 2> /dev/null; then
+ AC_MSG_RESULT([yes
+***************************************************************
+texmf.cnf is using \$SELFAUTO... variables. If you are going to
+install dvipng outside the texmf tree, you may need to use
+--enable-selfauto-set. To find out, do 'make ; make test'. If the test
+is unsuccessful, add the mentioned switch and rebuild.
+***************************************************************])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi])
+
+# We have to check properties of libraries, either installed (system)
+# libraries or unistalled (possibly libtool) ones from the TeX Live tree.
+# Thus we can not use, e.g., AC_CHECK_LIB(LIB, FUNCTION)
+
KPSE_KPATHSEA_FLAGS
KPSE_ZLIB_FLAGS
KPSE_LIBPNG_FLAGS
@@ -101,11 +171,7 @@ KPSE_T1LIB_FLAGS
KPSE_FREETYPE2_FLAGS
KPSE_GD_FLAGS
-dnl We have to check properties of libraries, either installed (system)
-dnl libraries or unistalled (possibly libtool) ones from the TL tree.
-dnl Thus we can not use, e.g., AC_CHECK_LIB(LIB, FUNCTION)
-
-dnl Checks for more libraries.
+# Checks for more libraries.
KPSE_ADD_FLAGS([zlib])
AC_CHECK_FUNC([deflate],
[AC_DEFINE([HAVE_LIBZ], 1,
@@ -131,8 +197,8 @@ AC_CHECK_FUNC([kpse_set_progname],
[Define to 1 if you have the `kpathsea' library (-lkpathsea).])],
[KPSE_MSG_ERROR([dvipng], [cannot find/use libkpathsea])])
-dnl We need enc, cmap, and sfd formats.
-dnl Introduced together with opentype format (Dec 2003).
+# We need enc, cmap, and sfd formats.
+# Introduced together with opentype format (Dec 2003).
KPSE_CHECK_KPSE_FORMAT([opentype],
[AC_DEFINE([HAVE_KPSE_ENC_FORMATS], 1,
[Define to 1 if your kpathsea has kpse_enc_format.])])
@@ -153,21 +219,18 @@ AC_CHECK_FUNC([FT_Init_FreeType],
AM_CONDITIONAL([have_ft2], [test "x$ac_cv_func_FT_Init_FreeType" = xyes])
AM_CONDITIONAL([have_ft2_or_t1], [test "x$have_ft2_or_t1" = xyes])
-dnl Checks for more header files.
+# Checks for more header files.
AC_CHECK_HEADERS([gd.h png.h kpathsea/kpathsea.h], ,
[KPSE_MSG_ERROR([dvipng], [cannot find/use $ac_header])])
AC_CHECK_HEADERS([t1lib.h])
-dnl Checks for library functions.
+# Checks for more library functions.
AC_CHECK_FUNCS([gdImageCreateTrueColor gdImageCreateFromJpeg gdImagePngEx gdImageCreateFromPngPtr gdImageGif FT_Library_Version])
AM_CONDITIONAL([have_gif], [test "x$ac_cv_func_gdImageGif" = xyes])
KPSE_RESTORE_FLAGS
-DVIPNG_VERSION=dvipng_version
-AC_SUBST([DVIPNG_VERSION])
-
AC_MSG_RESULT([
** Configuration summary for $PACKAGE_STRING:
@@ -193,6 +256,6 @@ AC_MSG_RESULT([
AC_CONFIG_HEADER([config.h])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile help/Makefile doc/Makefile])
AC_OUTPUT
diff --git a/Build/source/texk/dvipsk/configure.ac b/Build/source/texk/dvipsk/configure.ac
index 122f6acec88..3f1e204ceb9 100644
--- a/Build/source/texk/dvipsk/configure.ac
+++ b/Build/source/texk/dvipsk/configure.ac
@@ -28,7 +28,7 @@ AC_CONFIG_SUBDIRS([squeeze])
AC_CONFIG_FILES([Makefile])
dnl The subdirectory squeeze must be configured for the build system.
-dnl Can not share the cache file with the subdirectory!
+dnl When cross compiling, can not share the cache file with the subdirectory!
AC_CONFIG_COMMANDS_POST([AS_IF([test "x$cross_compiling" = xyes],
[cache_file=/dev/null
ac_configure_args="$ac_configure_args --host='$build' \
diff --git a/Build/source/texk/dvipsk/squeeze/configure.ac b/Build/source/texk/dvipsk/squeeze/configure.ac
index b7cc052fead..f4fdf66aa03 100644
--- a/Build/source/texk/dvipsk/squeeze/configure.ac
+++ b/Build/source/texk/dvipsk/squeeze/configure.ac
@@ -17,6 +17,8 @@ AM_MAINTAINER_MODE
AC_PROG_CC
+KPSE_COMPILER_WARNINGS
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/Build/source/texk/lacheck/configure.ac b/Build/source/texk/lacheck/configure.ac
index d9994b3fb27..b2f703c86bb 100644
--- a/Build/source/texk/lacheck/configure.ac
+++ b/Build/source/texk/lacheck/configure.ac
@@ -19,7 +19,7 @@ AC_SUBST([REV])
dnl Common code for all programs using libkpathsea.
KPSE_COMMON([lacheck])
-KPSE_PROG_LEX
+AC_PROG_LEX
AC_CONFIG_HEADERS([config.h])
diff --git a/Build/source/texk/lcdf-typetools/configure.ac b/Build/source/texk/lcdf-typetools/configure.ac
index e149f840280..cc988adfad7 100644
--- a/Build/source/texk/lcdf-typetools/configure.ac
+++ b/Build/source/texk/lcdf-typetools/configure.ac
@@ -47,12 +47,13 @@ dnl
dnl kpathsea
dnl
-AC_ARG_ENABLE(tetex-build, [ --enable-tetex-build build as part of a teTeX installation], :, enable_tetex_build=no)
+AC_ARG_ENABLE([texlive-build],
+ AS_HELP_STRING([--enable-texlive-build],
+ [build as part of a TeX Live installation]),
+ [:],
+ [enable_texlive_build=no])
-dnl FIXME:
-test -d $srcdir/../kpathsea && enable_tetex_build=yes
-
-AM_CONDITIONAL([tetex_build], [test "x$enable_tetex_build" = xyes])
+AM_CONDITIONAL([texlive_build], [test "x$enable_texlive_build" = xyes])
AC_ARG_WITH([kpathsea],
AS_HELP_STRING([--without-kpathsea],
@@ -90,7 +91,7 @@ KPSE_RESTORE_FLAGS
AC_ARG_ENABLE(selfauto-set, [ --disable-selfauto-set disable setting SELFAUTO variables from kpsewhich], :, enable_selfauto_set=yes)
-if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno -a "x$enable_tetex_build" != xyes; then
+if test "x$enable_selfauto_set" = xyes -a "x$kpathsea" != xno -a "x$enable_texlive_build" != xyes; then
kpsewhich='kpsewhich'
test "x$kpathsea" != xyes -a -x "$kpathsea/bin/kpsewhich" && kpsewhich="$kpathsea/bin/kpsewhich"
SELFAUTOLOC=`$kpsewhich --expand-var='$SELFAUTOLOC' 2>/dev/null`
diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac
index af1db20d367..2617229d7bc 100644
--- a/Build/source/texk/web2c/configure.ac
+++ b/Build/source/texk/web2c/configure.ac
@@ -356,7 +356,7 @@ AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile man/Makefile
omegafonts/Makefile otps/Makefile window/Makefile])
dnl The subdirectory web2c must be configured for the build system.
-dnl Can not share the cache file with the subdirectory!
+dnl When cross compiling, can not share the cache file with the subdirectory!
AC_CONFIG_COMMANDS_POST([AS_IF([test "x$cross_compiling" = xyes],
[cache_file=/dev/null
ac_configure_args="$ac_configure_args --host='$build' \
diff --git a/Build/source/texk/xdvik/configure.ac b/Build/source/texk/xdvik/configure.ac
index 17d8896571f..a00f2320ef3 100644
--- a/Build/source/texk/xdvik/configure.ac
+++ b/Build/source/texk/xdvik/configure.ac
@@ -299,7 +299,7 @@ AC_CONFIG_FILES([Makefile tests/Makefile])
AC_CONFIG_FILES([xdvi:xdvi-sh.in], [chmod +x xdvi])
dnl The subdirectory squeeze must be configured for the build system.
-dnl Can not share the cache file with the subdirectory!
+dnl When cross compiling, can not share the cache file with the subdirectory!
AC_CONFIG_COMMANDS_POST([AS_IF([test "x$cross_compiling" = xyes],
[cache_file=/dev/null
ac_configure_args="$ac_configure_args --host='$build' \
diff --git a/Build/source/texk/xdvik/squeeze/configure.ac b/Build/source/texk/xdvik/squeeze/configure.ac
index ed97b7d6845..a2df4779565 100644
--- a/Build/source/texk/xdvik/squeeze/configure.ac
+++ b/Build/source/texk/xdvik/squeeze/configure.ac
@@ -17,6 +17,8 @@ AM_MAINTAINER_MODE
AC_PROG_CC
+KPSE_COMPILER_WARNINGS
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/Build/source/texk/xdvipdfmx/configure.ac b/Build/source/texk/xdvipdfmx/configure.ac
index 42db8cd80ee..280c10f4089 100644
--- a/Build/source/texk/xdvipdfmx/configure.ac
+++ b/Build/source/texk/xdvipdfmx/configure.ac
@@ -61,15 +61,12 @@ CHO_CHECK_LIBFREETYPE([xdvipdfmx])
KPSE_RESTORE_FLAGS
-dnl We do not provide the configure option '--enable-tetex-build', but may
-dnl inherit enable_tetex_build when part of a teTeX / TeX Live installation.
-dnl If not, check for libpaper.
-if test "x$enable_tetex_build" != xyes || test ! -d $srdir/../kpathsea; then
+dnl Check for additional libraries.
+
+if test "x$enable_texlive_build" != xyes || test ! -d $srdir/../kpathsea; then
CHO_CHECK_LIBPAPER
fi
-dnl Check for additional libraries.
-
KPSE_CHECK_FRAMEWORK([ApplicationServices], [ATSFontRef fontRef])
KPSE_FONTCONFIG_FLAGS
if test "x$kpse_cv_have_ApplicationServices" = xyes; then
diff --git a/Build/source/utils/xindy/configure.ac b/Build/source/utils/xindy/configure.ac
index 5f8b7f8cf91..b9a05b81680 100644
--- a/Build/source/utils/xindy/configure.ac
+++ b/Build/source/utils/xindy/configure.ac
@@ -72,7 +72,9 @@ test "x$enable_xindy_docs" = xno || enable_xindy_docs=yes
# This option has been renamed --enable-native-texlive-build
# but should only be inherited and not specified here
-# AC_ARG_ENABLE(tetex-build, AS_HELP_STRING([--enable-tetex-build],[Build as part of a TeX Live installation]))
+AC_ARG_ENABLE([texlive-build],
+ AS_HELP_STRING([--enable-texlive-build],
+ [Build as part of a TeX Live installation]))
if test "x$with_xindy_recode" != xyes; then
CONVERT_FROM_UTF8="iconv -f UTF-8 -t "
@@ -84,14 +86,13 @@ else
fi
AC_SUBST(CONVERT_FROM_UTF8)
-## if test "x$enable_native_texlive_build" = xyes -a "x$datadir" = "x$prefix"; then
-if test "x$enable_native_texlive_build" = xyes; then
+if test "x$enable_texlive_build" = xyes; then
AC_MSG_NOTICE([Using installation layout for TeX Live])
datadir="$prefix/texmf"
docdir="$prefix/texmf/doc/$PACKAGE_NAME"
mandir="$prefix/texmf/doc/man"
fi
-AM_CONDITIONAL([TETEX_BUILD],[test "x$enable_native_texlive_build" = xyes])
+AM_CONDITIONAL([TETEX_BUILD],[test "x$enable_texlive_build" = xyes])
if test "x$enable_xindy_rules" != xno; then
if text "x$PERL" = xno; then