Commit Graph

22 Commits

Author SHA1 Message Date
H. Peter Anvin
5f0fb5647e autoconf: remove unnecessary hacks in PA_CROSS_COMPILE
The WINE-disabling hacks were a bit excessive.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-04-04 12:57:28 -07:00
H. Peter Anvin
a315659957 autoconf: more aggressively avoid cross-compilation problems
We could end up invoking WINE even when we didn't want to.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-01-04 23:21:44 -08:00
H. Peter Anvin
0e7eae99e8 autoconf: add detection of variadic macros support
Variadic macros are really useful, even if we can only use them
conditionally.

Unfortunately this means removing -Wc90-c99-compat, because apparently
-Wno-variadic-macros is broken in gcc 13.2. Fortunately it is 2023...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-10-11 13:32:52 -07:00
H. Peter Anvin
0e96487608 autoconf: modernize autoconf and update a lot of m4 macros 2023-10-11 10:47:09 -07:00
H. Peter Anvin
5a2d629501 autoconf: a much of macro fixes... not sure how this ever worked?
Exposed a bunch of problems with the autoconf m4 macro
library. Hopefulyy fix it, and tidy it up in the process.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-02-19 21:26:15 -08:00
H. Peter Anvin
49bbfed017 autoconf, doc: fix comment in header to pa_have_func.m4
Comment change only

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-12-21 18:19:19 -08:00
H. Peter Anvin
b18e870d90 Merge remote-tracking branch 'ElyesH/typos' 2022-11-07 12:39:44 -08:00
H. Peter Anvin
8453bcfa6c autoconf: update macros and helper scripts
Update the autoconf macros and helper scripts to the current versions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2022-10-05 12:03:33 -07:00
Elyes HAOUAS
cdf7ad02c2 Fix some typos
while on it, remove unneeded white spaces.

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2022-01-09 17:34:35 +01:00
H. Peter Anvin
36814f1fc8 autoconf: look for _Decltype as yet another alias for typeof().
If the past is any indication, the final standardization of typeof()
probably will be _Decltype().

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2020-07-16 20:28:35 -07:00
H. Peter Anvin (Intel)
1b9c8ec434 pa_c_typedef.m4: also test for __typeof and __decltype
Some vendors prefer to put underscores just at the beginning.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-09 19:28:12 -07:00
H. Peter Anvin (Intel)
89563d78b2 autoconf: add success/failure code options to PA_ADD_*FLAGS
Allow code to be executed in the success or failure scenatios of
PA_ADD_*FLAGS.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-09 19:25:41 -07:00
H. Peter Anvin (Intel)
abcdf8356a configure.ac: better tests for typeof, snprintf, vsnprintf
With some combinations of options tests for typeof, snprintf, and
vsnprintf end up with warnings promoted to errors, which then trigger
incorrect results for these tests. Move the typeof test to the end,
and write specific tests for snprintf and vsnprintf.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-09 19:04:28 -07:00
H. Peter Anvin (Intel)
30844a4c62 offsetin(): use typeof() if the compiler supports it
If the C compiler has typeof(), we can use a safer implementation of
the offsetin() macro by using typeof(). Since typeof() isn't standard
(yet?) autoconf has to test for it.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-06 12:39:14 -07:00
H. Peter Anvin (Intel)
e8599c655e pa_func_attributes.m4: better messages
It is a bit confusing when the alloc_size attribute is tested for more
than once, to include the arguments in the output message.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2020-07-06 11:09:03 -07:00
H. Peter Anvin (Intel)
16a3e8ddb9 autoconf: update check for gcc inlines
Old versions of gcc didn't define either __GNUC_STDC_INLINE__ or
__GNUC_GNU_INLINE__, but imply the latter.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-16 00:14:17 -07:00
H. Peter Anvin (Intel)
8b6e6bf04f config.h: separate function and function pointer attributes; automate
Separate out function and function pointer attributes, as not all
versions of all compilers support both.

Have macros related to function attributes auto-generated by
autoheader. As a result, rename config.h.in to unconfig.h, to make it
more obvious that it is really intended to be included from some C
programs.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-16 00:08:27 -07:00
Ozkan Sezer
287964d54b fix pa_add_headers.m4 for development versions of autoconf (bug 3392471)
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2019-08-07 17:22:10 -07:00
H. Peter Anvin
71bdc43087 autoconf: update helpers/config.{sub,guess}
Newer versions of these autoconf helpers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-08-07 01:14:42 -07:00
H. Peter Anvin
0bddd0f1b1 autoconf: move aux directory, define AC_CONFIG_AUX_DIR()
The name "aux" is reserved on Windows platforms, a legacy from CP/M
via MS-DOS. Rename it to "helpers".

Turns out that that directory wasn't actually used properly, because
AC_CONFIG_AUX_DIR was never defined, and there was a redundant copy of
install-sh checked into the base of the source tree.

Reported-by: Ehsan Alem Mohammad Ghasemlou <e.ghasemloo@gmail.com>
NASM-Bugzilla: https://bugzilla.nasm.us/show_bug.cgi?id=3392560
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-02-22 01:18:04 -08:00
Cyrill Gorcunov
8274623093 build: Add missing PA_ADD_LDFLAGS helper
Fixes b0121dc312

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-12-23 17:22:44 +03:00
H. Peter Anvin
b0121dc312 autoconf: use librarized autoconf setup
I have been setting up a cross-project librarized autoconf setup; use
it for NASM as well.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-12-22 18:17:16 -08:00