Use the AC_PROG_CC_C99 macro in configure.ac to ensure that the
compiler can handle C99 features by putting it in C99 mode (e.g., by
using the -std=gnu99 argument to gcc).  If the compiler doesn't
support C99, exit with an error.

(We currently use some C99 features like inline functions,
intermingled declarations and code, long long int, compound literals,
variable-length arrays, // comments, snprintf(), variadic macros, etc.
Eventually we will want to use the restrict keyword.)
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 80adbb6..0b83849 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,7 +52,9 @@ AC_SUBST([MIN_PYTHON_VERSION])
 AM_MAINTAINER_MODE
 : ${CFLAGS=""}
 # Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_C99
+AS_IF([test "x${ac_cv_prog_cc_c99}" = xno],
+      [AC_MSG_ERROR([C99 compiler is required])])
 AC_PROG_RANLIB
 AC_PROG_SED
 AM_PATH_PYTHON([$MIN_PYTHON_VERSION])
-- 
2.4.5


------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
rpstir-devel mailing list
rpstir-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpstir-devel

Reply via email to