aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index bb0016d5c..2100ba764 100755
--- a/configure.py
+++ b/configure.py
@@ -1554,6 +1554,15 @@ class OsInfo(InfoObject): # pylint: disable=too-many-instance-attributes
self.uses_pkg_config = (lex.uses_pkg_config == 'yes')
self.feature_macros = lex.feature_macros
+ self._validate_os_features(self.target_features, infofile)
+
+ @staticmethod
+ def _validate_os_features(features, infofile):
+ feature_re = re.compile('^[a-z][a-z0-9_]*[a-z0-9]$')
+ for feature in features:
+ if not feature_re.match(feature):
+ logging.error("Invalid OS feature %s in %s" % (feature, infofile))
+
def matches_name(self, nm):
if nm in self._aliases:
return True