have = cc.compiles(code, name : 'using tzname[]')
conf.set('HAVE_TZNAME', have ? 1 : false)
+have = cc.sizeof('time_t', prefix : '#include <time.h>')
+if have < 8
+ add_global_arguments('-D_TIME_BITS=64', language : 'c')
+ have = cc.sizeof('time_t', args : '-D_TIME_BITS=64', prefix : '#include <time.h>')
+ if have < 8
+ if get_option('allow-32bit-time')
+ warning('Could not make time_t 64bits wide')
+ else
+ error('Could not make time_t 64bits wide')
+ endif
+ endif
+endif
+
socket_libs = []
if not cc.has_function('socket')
socket_libs += cc.find_library('socket', required : true)
description : 'should pg ring the bell on invalid keys?')
option('colors-default', type: 'boolean', value: true,
description: 'Enables colorized output from utils by default')
+option('allow-32bit-time', type: 'boolean', value: false,
+ description: 'Allow 32bit time_t type')
option('fs-search-path',
type : 'string',