configure.ac: rework gnu99 ext check to allow clang
authorAdrian Ratiu <adrian.ratiu@collabora.com>
Mon, 30 Aug 2021 15:43:13 +0000 (18:43 +0300)
committerMark Wielaard <mark@klomp.org>
Tue, 31 Aug 2021 11:38:55 +0000 (13:38 +0200)
commit6eb991a9ebc45cc468a049ef30a98a0f7cad4a0d
tree886491a01fe9107027d236a0f6864e17595da3dc
parent61554a292f753032490c349fedf47c4fb461e3ea
configure.ac: rework gnu99 ext check to allow clang

It is true that Clang does not support all gnu99 extensions [1],
but not all of them are used in the codebase and over time there
have been code cleanup efforts to improve Clang support.

For example after commit 779c57ea ("readelf: Pull advance_pc()
in file scope") there are no more nested function declarations
and elfutils now builds fine with Clang.

So in the interest of enabling Clang builds we remove the only
remaining blocker: the configure checks for nested functions and
variable length arrays which are also unused.

Considering mixed decls and code is also part of c99 standard,
the entire check becomes redundant and we can just replace
AC_PROG_CC -> AC_PROG_CC_C99.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
ChangeLog
configure.ac