Automatically detect C99 flags for supported compilers.
[platform/upstream/iotivity.git] / build_common / SConscript
index 56a872b..22501f2 100644 (file)
@@ -243,9 +243,15 @@ from iotivityconfig import *
 
 conf = env.Configure(
         custom_tests = {
+                'CheckC99Flags' : iotivityconfig.check_c99_flags,
                 'CheckCXX11Flags' : iotivityconfig.check_cxx11_flags
         } )
 
+# IoTivity requires support for C99 for the C SDK.
+if not conf.CheckC99Flags():
+        print('C99 support is required!')
+        Exit(1)
+
 # IoTivity requires support for C++11 for the C++ SDK.
 #
 # However, some platforms, such as Arduino, only support the C SDK.