mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-09-22 10:43:39 -04:00
autoconf: update m4 macros and config/unconfig.h
(Does unconfig.h really need to be in the git tree?) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
dnl --------------------------------------------------------------------------
|
||||
dnl PA_ADD_FLAGS(flagvar, flags [, real-flags [, success [, failure]]])
|
||||
dnl PA_ADD_FLAGS(flagvar, flags)
|
||||
dnl
|
||||
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 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 --------------------------------------------------------------------------
|
||||
AC_DEFUN([PA_ADD_FLAGS],
|
||||
[
|
||||
|
@@ -15,6 +15,5 @@ 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])
|
||||
|
@@ -9,7 +9,5 @@ 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])])
|
||||
|
@@ -5,7 +5,4 @@ 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])
|
||||
AC_DEFINE([WITH_PROFILING], 1,
|
||||
[Define to 1 to include code specifically indended to help profiling.])
|
||||
])])
|
||||
[PA_ADD_LANGFLAGS([-pg])])])
|
||||
|
@@ -14,7 +14,23 @@ int main(void)
|
||||
return 0;
|
||||
}
|
||||
])],[pa_cv_variadic_macros=yes],[pa_cv_variadic_macros=no])])
|
||||
AS_IF([test "x$pa_cv_variadic_macros" = xyes],
|
||||
AS_IF([test "x$pa_cv_variadic_macros" = xyes],
|
||||
[AC_DEFINE([HAVE_VARIADIC_MACROS], 1,
|
||||
[define to 1 if your compiler supports C99 __VA_ARGS__ variadic macros.])])
|
||||
])
|
||||
[define to 1 if your compiler supports C99 __VA_ARGS__ variadic macros.])
|
||||
AC_CACHE_CHECK([if $CC supports varadic macro comma dropping],
|
||||
[pa_cv_varadic_macros_comma_hack],
|
||||
[AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
AC_INCLUDES_DEFAULT
|
||||
#define myprintf(f, ...) printf(f, ## __VA_ARGS__)
|
||||
int main(void)
|
||||
{
|
||||
myprintf("hello");
|
||||
return 0;
|
||||
}
|
||||
])])],
|
||||
[pa_cv_varadic_macros_comma_hack=yes],
|
||||
[pa_cv_varadic_macros_comma_hack=no])
|
||||
AS_IF([test "x$pa_cv_varadic_macros_comma_hack" = xyes],
|
||||
[AC_DEFINE([HAVE_VARADIC_MACROS_COMMA_HACK], 1,
|
||||
[define to 1 if your compiler supports the , ## __VA_ARGS__ hack.])])
|
||||
])])
|
||||
|
@@ -107,22 +107,6 @@
|
||||
# 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)
|
||||
|
Reference in New Issue
Block a user