summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-28 16:42:22 +0000
committerKarl Berry <karl@freefriends.org>2024-04-28 16:42:22 +0000
commit1ef28d2e2d26bb5cf0fcd7903861fe2b8d620d5c (patch)
tree3c1c4bfac8ccf284e3b5ec6ced2c6640950aeb6e
parent7a84551791577c4b9913e2d6119e7745b3a97388 (diff)
AC_USE_SYSTEM_EXTENSIONS globally
git-svn-id: svn://tug.org/texlive/trunk@71106 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/m4/ChangeLog4
-rw-r--r--Build/source/m4/kpse-common.m423
-rw-r--r--Build/source/m4/kpse-setup.m424
-rwxr-xr-xBuild/source/reautoconf1
4 files changed, 45 insertions, 7 deletions
diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog
index e8251fb4e2e..9573af778b6 100644
--- a/Build/source/m4/ChangeLog
+++ b/Build/source/m4/ChangeLog
@@ -1,3 +1,7 @@
+2024-04-28 Karl Berry <karl@freefriends.org>
+
+ * kpse-common.m4 (KPSE_BASIC):
+
2024-04-18 Karl Berry <karl@freefriends.org>
* kpse-visibility.m4 (_KPSE_VISIBILITY_FLAGS): avoid testing or
diff --git a/Build/source/m4/kpse-common.m4 b/Build/source/m4/kpse-common.m4
index 491c648c5f2..f8706be25e7 100644
--- a/Build/source/m4/kpse-common.m4
+++ b/Build/source/m4/kpse-common.m4
@@ -1,6 +1,6 @@
# $Id$
# Public macros for the TeX Live (TL) tree.
-# Copyright 1995-2009, 2015-2023 Karl Berry <tex-live@tug.org>
+# Copyright 1995-2009, 2015-2024 Karl Berry <tex-live@tug.org>
# Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
#
# This file is free software; the copyright holders
@@ -217,23 +217,32 @@ eval LIBS=\"$[]AS_TR_CPP($1)_LIBS \$LIBS\"
AC_DEFUN([KPSE_BASIC], [dnl
echo 'tldbg:[$0] called (pkg=[$1], amopt=[$2])' >&AS_MESSAGE_LOG_FD
m4_define([Kpse_Package], [$1])
-dnl
+#
+# am_init_automake
AM_INIT_AUTOMAKE([foreign silent-rules subdir-objects]m4_ifval([$2], [ $2]))
+
+# am_maintainer_mode
AM_MAINTAINER_MODE
-dnl
-dnl Check whether prototypes work.
+
+# See comments in kpse-setup.m4 about system extensions.
+AC_USE_SYSTEM_EXTENSIONS
+
+# Check whether prototypes work.
AC_CACHE_CHECK([whether the compiler accepts prototypes],
[kb_cv_c_prototypes],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>]],
- [[extern void foo(int i,...);]])],
+ [[extern void foo(int i,...);]])],
[kb_cv_c_prototypes=yes],
[kb_cv_c_prototypes=no])])
if test "x$kb_cv_c_prototypes" = xno; then
AC_MSG_ERROR([Sorry, your compiler does not understand prototypes.])
fi
-dnl
-dnl Enable flags for compiler warnings
+
+# kpse_compiler_warnings options.
KPSE_COMPILER_WARNINGS
+
+# end of kpse_basic macro.
+echo 'tldbg:[$0] done (pkg=[$1], amopt=[$2])' >&AS_MESSAGE_LOG_FD
]) # KPSE_BASIC
# KPSE_COMMON(PACKAGE-NAME, [MORE-AUTOMAKE-OPTIONS])
diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4
index 8da68c573a0..7a1844d80f6 100644
--- a/Build/source/m4/kpse-setup.m4
+++ b/Build/source/m4/kpse-setup.m4
@@ -18,6 +18,7 @@
# additional program specific configure options (if any)
# library dependencies for programs and libraries
AC_DEFUN([KPSE_SETUP], [dnl
+echo 'tldbg:[$0] called (toplevel=[$1])' >&AS_MESSAGE_LOG_FD
AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
AC_REQUIRE([_KPSE_MSG_WARN_PREPARE])[]dnl
m4_define([kpse_TL], [$1])[]dnl
@@ -74,7 +75,27 @@ KPSE_ENABLE_LT_HACK
KPSE_LIBS_PREPARE
KPSE_MKTEX_PREPARE
KPSE_WEB2C_PREPARE
+
+# We must enable system extensions before any compiler call to avoid
+# (valid) autoconf warnings. Because different configure.ac's use
+# different kpse setup routines, we call the ac_use_system_extensions
+# macro both here and in kpse_basic (in kpse-common.m4).
+#
+# Fortunately, Autoconf defines the system_extensions macro to only have
+# any effect once (with ac_defun_once), so it's harmless to call it
+# multiple time.
+#
+# LuaTeX requires system extensions for socket support. Also, since
+# SyncTeX, some libraries, and others unconditionally #define
+# GNU_SOURCE, it seems more consistent to always use it.
+#
+AC_USE_SYSTEM_EXTENSIONS
+
+# this macro, kpse_check_win32, is the first compiler call for
+# configure.ac files that use this function (kpse setup).
KPSE_CHECK_WIN32
+# end call to kpse_check_win32.
+
AS_CASE([$with_x:$kpse_cv_have_win32],
[yes:no | no:*], [:],
[yes:*], [AC_MSG_ERROR([you can not use `--with-x' for Windows])],
@@ -96,6 +117,9 @@ KPSE_FOR_PKGS([utils], [m4_sinclude(kpse_TL[utils/]Kpse_Pkg[/ac/withenable.ac])]
KPSE_FOR_PKGS([texk], [m4_sinclude(kpse_TL[texk/]Kpse_Pkg[/ac/withenable.ac])])
KPSE_FOR_PKGS([libs], [m4_sinclude(kpse_TL[libs/]Kpse_Pkg[/ac/withenable.ac])])
KPSE_FOR_PKGS([texlibs], [m4_sinclude(kpse_TL[texk/]Kpse_Pkg[/ac/withenable.ac])])
+
+# end of kpse_setup macro.
+echo 'tldbg:[$0] done (toplevel=[$1])' >&AS_MESSAGE_LOG_FD
]) # KPSE_SETUP
# KPSE_ENABLE_PROG(PROG, REQUIRED-LIBS, OPTIONS, [COMMENT])
diff --git a/Build/source/reautoconf b/Build/source/reautoconf
index 6282ff55b68..971132623fc 100755
--- a/Build/source/reautoconf
+++ b/Build/source/reautoconf
@@ -97,6 +97,7 @@ do_it () {
$do_cmd "$@"
if test $? -ne 0; then
echo "$0: goodbye, exit status of $*: $?" >&2
+ echo "$0: directory: `/bin/pwd`" >&2
exit 1
fi
}