1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#!/usr/bin/env python
from __future__ import generators
import user
import config.base
class Configure(config.base.Configure):
def __init__(self, framework):
config.base.Configure.__init__(self, framework)
self.headerPrefix = ''
self.substPrefix = ''
return
def __str__(self):
return ''
def setupHelp(self, help):
import nargs
return
def setupDependencies(self, framework):
config.base.Configure.setupDependencies(self, framework)
self.compilers = framework.require('config.compilers', self)
self.functions = framework.require('config.functions', self)
self.headers = framework.require('config.headers', self)
return
def configureFPTrap(self):
'''Checking the handling of floating point traps'''
if self.headers.check('sigfpe.h'):
if self.functions.check('handle_sigfpes', libraries = 'fpe'):
self.addDefine('HAVE_IRIX_STYLE_FPTRAP', 1)
self.compilers.LIBS = '-lfpe '+self.compilers.LIBS
elif self.headers.check('fpxcp.h') and self.headers.check('fptrap.h'):
if reduce(lambda x,y: x and y, map(self.functions.check, ['fp_sh_trap_info', 'fp_trap', 'fp_enable', 'fp_disable'])):
self.addDefine('HAVE_RS6000_STYLE_FPTRAP', 1)
elif self.headers.check('floatingpoint.h'):
if self.functions.check('ieee_flags') and self.functions.check('ieee_handler'):
if self.headers.check('sunmath.h'):
self.addDefine('HAVE_SOLARIS_STYLE_FPTRAP', 1)
else:
self.addDefine('HAVE_SUN4_STYLE_FPTRAP', 1)
return
def configure(self):
self.executeTest(self.configureFPTrap)
return
|