+if static_build
+ if get_option('doc').enabled()
+ error('Documentation enabled but not supported when building statically.')
+ endif
+
+ message('Building statically, can\'t build the documentation')
+ subdir_done()
+endif
+
+if not build_gir
+ if get_option('doc').enabled()
+ error('Documentation enabled but introspection not built.')
+ endif
+
+ message('Introspection not built, can\'t build the documentation')
+ subdir_done()
+endif
+