From e527cccb63339aa955c99eed3b8cc55c464ed993 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 27 Apr 2015 20:17:14 +0200 Subject: [PATCH] c99: Check for and require a C99-compatible compiler --- NEWS.txt | 6 ++++++ configure.ac | 7 +++++-- system.h | 17 +---------------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 154277f6b..46d2a3343 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -5,6 +5,12 @@ ccache news Unreleased 3.3 -------------- +Notes +~~~~~ + +- A C99-compatible compiler is now required to build ccache. + + New features and improvements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/configure.ac b/configure.ac index 988ac315f..a35fac08e 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,11 @@ AC_SUBST(include_dev_mk) AC_SUBST(test_suites) dnl Checks for programs. -AC_PROG_CC +AC_PROG_CC_C99 +if test "$ac_cv_prog_cc_c99" = no; then + AC_MSG_ERROR(cannot find a C99-compatible compiler) +fi + AC_PROG_CPP AC_PROG_INSTALL AC_PROG_RANLIB @@ -41,7 +45,6 @@ fi AC_HEADER_DIRENT AC_HEADER_TIME -AC_HEADER_STDBOOL AC_HEADER_SYS_WAIT AC_CHECK_TYPES(long long) diff --git a/system.h b/system.h index dd11f2e50..f22ece843 100644 --- a/system.h +++ b/system.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -72,20 +73,4 @@ extern char **environ; #define asprintf rpl_asprintf #endif -#ifdef HAVE_STDBOOL_H -# include -#else -# ifndef HAVE__BOOL -# ifdef __cplusplus -typedef bool _Bool; -# else -# define _Bool signed char -# endif -# endif -# define bool _Bool -# define false 0 -# define true 1 -# define __bool_true_false_are_defined 1 -#endif - #endif /* CCACHE_SYSTEM_H */ -- 2.47.2