Skip to content
Snippets Groups Projects
Commit b98dcb49 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Merge branch 'patches/bug10058' into 8.0

* patches/bug10058:
  Configure: Improved support for C99 with autoconf 2.59 and earlier.
parents 9281e5fe a3d07eae
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ dnl autoconf-wrapper if it is used. dnl can't be used since the wrapper
dnl checks for it, so just store it in a dummy define.
define([require_autoconf_2_50],[AC_PREREQ(2.50)])
dnl major, minor, on_ge, on_lt
define([if_autoconf],
[ifelse(ifelse(index(AC_ACVERSION,.),-1,0,[m4_eval(
translit(substr(AC_ACVERSION, 0, index(AC_ACVERSION,.)),[A-Za-z])-0 >= $1 &&
......@@ -28,6 +29,21 @@ define([if_autoconf],
)
)]),1,$3,$4)])
dnl Autoconf 2.60 is the first version that supports C99.
dnl C99-compilers complain about implicit declarations.
dnl For autoconf 2.59 and earlier: Make sure at least
dnl exit(3C) is declared by always including <stdlib.h>.
if_autoconf(2,60,,[
m4_copy([AC_LANG_SOURCE(C)], [ORIG_AC_LANG_SOURCE_C])
m4_define([AC_LANG_SOURCE(C)], [
ORIG_AC_LANG_SOURCE_C([
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
]$1)
])
])
pushdef([AC_PROG_CC_WORKS],
[
popdef([AC_PROG_CC_WORKS])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment