diff --git a/buildconf/base.ini b/buildconf/base.ini index ad487fb0..7c146bb5 100644 --- a/buildconf/base.ini +++ b/buildconf/base.ini @@ -6,6 +6,7 @@ zeromq = auto ssl = auto pcre = auto routing = auto +matheval = auto debug = false unbit = false xml_implementation = libxml2 diff --git a/buildconf/glusterfs.ini b/buildconf/glusterfs.ini index 4b4af1b8..23ffc707 100644 --- a/buildconf/glusterfs.ini +++ b/buildconf/glusterfs.ini @@ -1,3 +1,4 @@ [uwsgi] main_plugin = glusterfs inherit = base +matheval = false diff --git a/plugins/glusterfs/glusterfs.c b/plugins/glusterfs/glusterfs.c index 6ded22f7..cd4e5690 100644 --- a/plugins/glusterfs/glusterfs.c +++ b/plugins/glusterfs/glusterfs.c @@ -1,6 +1,10 @@ #include #include +#ifdef UWSGI_MATHEVAL +#error currently the glusterfs plugins is not compatible with uWSGI built with matheval support +#endif + extern struct uwsgi_server uwsgi; /* diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 44450e87..e7ab607f 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -918,10 +918,15 @@ class uConf(object): self.libs.append('-lcap') report['capabilities'] = True - if self.has_include('matheval.h'): - self.cflags.append("-DUWSGI_MATHEVAL") - self.libs.append('-lmatheval') - report['matheval'] = True + if self.get('matheval'): + if self.get('matheval') == 'auto' and self.has_include('matheval.h'): + self.cflags.append("-DUWSGI_MATHEVAL") + self.libs.append('-lmatheval') + report['matheval'] = True + else: + self.cflags.append("-DUWSGI_MATHEVAL") + self.libs.append('-lmatheval') + report['matheval'] = True has_json = False has_uuid = False