autoconf: update some of the m4 library

Update some files in the m4 library. This also updates
config/unconfig.h to match.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2024-11-04 10:19:43 -08:00
parent ef5fd5391c
commit 25757f83c5
5 changed files with 28 additions and 5 deletions

View File

@ -1,9 +1,10 @@
dnl --------------------------------------------------------------------------
dnl PA_ADD_FLAGS(flagvar, flags)
dnl PA_ADD_FLAGS(flagvar, flags [, real-flags [, success [, failure]]])
dnl
dnl Add [flags] to the variable [flagvar] if and only if it is accepted
dnl by all languages affected by [flagvar], if those languages have
dnl been previously seen in the script.
dnl Add [real-flags] (default [flags]) to the variable [flagvar] if
dnl and only if [flags] are accepted by all languages affected by
dnl [flagvar], if those languages have been previously seen in the
dnl script.
dnl --------------------------------------------------------------------------
AC_DEFUN([PA_ADD_FLAGS],
[

View File

@ -15,5 +15,6 @@ AC_DEFUN([PA_COMMON_ATTRIBUTES],
PA_FUNC_ATTRIBUTE(const)
PA_FUNC_ATTRIBUTE(pure)
PA_FUNC_ATTRIBUTE(cold,,,,,unlikely_func)
PA_FUNC_ATTRIBUTE(used)
PA_FUNC_ATTRIBUTE(unused)
PA_FUNC_ATTRIBUTE_ERROR])

View File

@ -9,5 +9,7 @@ AC_DEFUN([PA_OPTION_DEBUG],
[PA_ADD_LANGFLAGS([-g3])], [PA_ADD_LANGFLAGS([-ggdb3 -g3])])
PA_ARG_ENABLED([debug], [optimize for debugging],
[PA_ADD_LANGFLAGS([-Og -O0])
AC_DEFINE([WITH_DEBUG], 1,
[Define to 1 to include code specifically indended to help debugging.])
$1],
[$2])])

View File

@ -5,4 +5,7 @@ dnl Try to enable profiling if --enable-profiling is set.
dnl --------------------------------------------------------------------------
AC_DEFUN([PA_OPTION_PROFILING],
[PA_ARG_ENABLED([profiling], [compile with profiling (-pg option)],
[PA_ADD_LANGFLAGS([-pg])])])
[PA_ADD_LANGFLAGS([-pg])
AC_DEFINE([WITH_PROFILING], 1,
[Define to 1 to include code specifically indended to help profiling.])
])])

View File

@ -107,6 +107,22 @@
# endif
#endif
#ifndef used_func
# ifdef HAVE_FUNC_ATTRIBUTE_USED
# define used_func ATTRIBUTE(used)
# else
# define used_func
# endif
#endif
#ifndef used_func_ptr
# ifdef HAVE_FUNC_PTR_ATTRIBUTE_USED
# define used_func_ptr ATTRIBUTE(used)
# else
# define used_func_ptr
# endif
#endif
#ifndef unused_func
# ifdef HAVE_FUNC_ATTRIBUTE_UNUSED
# define unused_func ATTRIBUTE(unused)