texlive[71106] Build/source: AC_USE_SYSTEM_EXTENSIONS globally

commits+karl at tug.org commits+karl at tug.org
Sun Apr 28 18:42:23 CEST 2024


Revision: 71106
          https://tug.org/svn/texlive?view=revision&revision=71106
Author:   karl
Date:     2024-04-28 18:42:22 +0200 (Sun, 28 Apr 2024)
Log Message:
-----------
AC_USE_SYSTEM_EXTENSIONS globally

Modified Paths:
--------------
    trunk/Build/source/m4/ChangeLog
    trunk/Build/source/m4/kpse-common.m4
    trunk/Build/source/m4/kpse-setup.m4
    trunk/Build/source/reautoconf

Modified: trunk/Build/source/m4/ChangeLog
===================================================================
--- trunk/Build/source/m4/ChangeLog	2024-04-28 16:42:00 UTC (rev 71105)
+++ trunk/Build/source/m4/ChangeLog	2024-04-28 16:42:22 UTC (rev 71106)
@@ -1,3 +1,7 @@
+2024-04-28  Karl Berry  <karl at freefriends.org>
+
+	* kpse-common.m4 (KPSE_BASIC): 
+
 2024-04-18  Karl Berry  <karl at freefriends.org>
 
 	* kpse-visibility.m4 (_KPSE_VISIBILITY_FLAGS): avoid testing or

Modified: trunk/Build/source/m4/kpse-common.m4
===================================================================
--- trunk/Build/source/m4/kpse-common.m4	2024-04-28 16:42:00 UTC (rev 71105)
+++ trunk/Build/source/m4/kpse-common.m4	2024-04-28 16:42:22 UTC (rev 71106)
@@ -1,6 +1,6 @@
 # $Id$
 # Public macros for the TeX Live (TL) tree.
-# Copyright 1995-2009, 2015-2023 Karl Berry <tex-live at tug.org>
+# Copyright 1995-2009, 2015-2024 Karl Berry <tex-live at tug.org>
 # Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 #
 # This file is free software; the copyright holders
@@ -217,23 +217,32 @@
 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])

Modified: trunk/Build/source/m4/kpse-setup.m4
===================================================================
--- trunk/Build/source/m4/kpse-setup.m4	2024-04-28 16:42:00 UTC (rev 71105)
+++ trunk/Build/source/m4/kpse-setup.m4	2024-04-28 16:42:22 UTC (rev 71106)
@@ -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_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([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])

Modified: trunk/Build/source/reautoconf
===================================================================
--- trunk/Build/source/reautoconf	2024-04-28 16:42:00 UTC (rev 71105)
+++ trunk/Build/source/reautoconf	2024-04-28 16:42:22 UTC (rev 71106)
@@ -97,6 +97,7 @@
   $do_cmd "$@"
   if test $? -ne 0; then
     echo "$0: goodbye, exit status of $*: $?" >&2
+    echo "$0: directory: `/bin/pwd`" >&2
     exit 1
   fi
 }



More information about the tex-live-commits mailing list.