summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-10-26 11:23:07 +0000
committerJan Kneschke <jan@kneschke.de>2005-10-26 11:23:07 +0000
commite32c67cbc266b0dad4d12acbdb2f79daa6745c93 (patch)
tree405ac0d5e24a180f543b419729e8e9c6943bdaa2 /SConstruct
parentff0ec13761ccb9470f7afc5a11e4711f81edc4ff (diff)
downloadlighttpd-git-e32c67cbc266b0dad4d12acbdb2f79daa6745c93.tar.gz
added a check for gmt_off in struct tm
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@798 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct23
1 files changed, 21 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index c33abdb0..4ef7da5d 100644
--- a/SConstruct
+++ b/SConstruct
@@ -5,7 +5,7 @@ import string
from stat import *
package = 'lighttpd'
-version = '1.4.6'
+version = '1.4.7'
def checkCHeaders(autoconf, hdrs):
p = re.compile('[^A-Z0-9]')
@@ -54,6 +54,22 @@ def checkProgram(env, withname, progname):
return binpath
+def checkStructMember(context):
+ struct_member = """
+#include <time.h>
+int main() {
+ struct tm a;
+ a.tm_gmtoff = 0;
+ return 0;
+}
+"""
+ context.Message('Checking for tm_gmtoff in struct tm...')
+ result = context.TryLink(struct_member, '.c')
+ context.Result(result)
+
+ return result
+
+
BuildDir('build', 'src', duplicate = 0)
opts = Options('config.py')
@@ -84,7 +100,8 @@ env['version'] = version
# cache configure checks
if 1:
- autoconf = Configure(env)
+ autoconf = Configure(env, custom_tests = {'CheckStructMember': checkStructMember })
+ autoconf.headerfile = "foo.h"
checkCHeaders(autoconf, string.split("""
arpa/inet.h
fcntl.h
@@ -170,6 +187,8 @@ if 1:
if autoconf.CheckType('struct sockaddr_storage', '#include <sys/socket.h>\n'):
autoconf.env.Append(CPPFLAGS = [ '-DHAVE_STRUCT_SOCKADDR_STORAGE' ])
+ if autoconf.CheckStructMember():
+ autoconf.env.Append(CPPFLAGS = [ '-DHAVE_STRUCT_TM_GMTOFF' ])
env = autoconf.Finish()