conditionally compile libuuid

This commit is contained in:
roberto@freebsd64
2011-04-19 20:46:31 +02:00
parent ef2f5879b6
commit a6bc778c25
2 changed files with 8 additions and 1 deletions
+2
View File
@@ -70,7 +70,9 @@
#include <math.h>
#include <netinet/in.h>
#ifdef UWSGI_UUID
#include <uuid/uuid.h>
#endif
#ifdef __sun__
#define _XPG4_2
+6 -1
View File
@@ -379,6 +379,11 @@ class uConf(object):
self.cflags.append("-DUWSGI_PCRE")
has_json = False
has_uuid = False
if os.path.exists('/usr/include/uuid/uuid.h') or os.path.exists('/usr/local/include/uuid/uuid.h'):
has_uuid = True
self.cflags.append("-DUWSGI_UUID")
if self.get('async'):
self.cflags.append("-DUWSGI_ASYNC")
@@ -430,7 +435,7 @@ class uConf(object):
self.gcc_list.append('ldap')
self.libs.append('-lldap')
if has_json and self.get('zeromq'):
if has_json and has_uuid and self.get('zeromq'):
if self.get('zeromq') == 'auto':
if os.path.exists('/usr/include/zmq.h') or os.path.exists('/usr/local/include/zmq.h'):
self.cflags.append("-DUWSGI_ZEROMQ")