# -*- python -*-
from lsst.sconsUtils import scripts, env

# Backtrace depends on system headers which may not be
# available on all platform / compiler combinations.
# Check if headers exist and if not don't enable it
backtraceEnable = True
conf = Configure(env)
for header in ['cxxabi.h', 'execinfo.h']:
    if not conf.CheckCXXHeader(header):
        backtraceEnabled = False
        break

if backtraceEnable:
    env.Prepend(CCFLAGS=['-DLSST_CPPUTILS_BACKTRACE_ENABLE'])

env = conf.Finish()

scripts.BasicSConscript.lib()
