check for matheval

This commit is contained in:
Unbit
2013-07-29 16:55:28 +02:00
parent 9f7db10582
commit 38147d50ff
4 changed files with 15 additions and 4 deletions
+1
View File
@@ -6,6 +6,7 @@ zeromq = auto
ssl = auto
pcre = auto
routing = auto
matheval = auto
debug = false
unbit = false
xml_implementation = libxml2
+1
View File
@@ -1,3 +1,4 @@
[uwsgi]
main_plugin = glusterfs
inherit = base
matheval = false
+4
View File
@@ -1,6 +1,10 @@
#include <uwsgi.h>
#include <api/glfs.h>
#ifdef UWSGI_MATHEVAL
#error currently the glusterfs plugins is not compatible with uWSGI built with matheval support
#endif
extern struct uwsgi_server uwsgi;
/*
+9 -4
View File
@@ -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