Skip to content

Commit

Permalink
AC_USE_SYSTEM_EXTENSIONS globally
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@71106 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
kberry committed Apr 28, 2024
1 parent 8291466 commit 71e5764
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
4 changes: 4 additions & 0 deletions m4/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
23 changes: 16 additions & 7 deletions m4/kpse-common.m4
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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])
Expand Down
24 changes: 24 additions & 0 deletions m4/kpse-setup.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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])],
Expand All @@ -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])
Expand Down
1 change: 1 addition & 0 deletions reautoconf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 71e5764

Please sign in to comment.