#!/usr/bin/env python
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
    help.addArgument('PETSc', '-with-errorchecking=<bool>', nargs.ArgBool(None, 1, 'Specify error checking/exceptions in libraries'))
    return

  def setupDependencies(self, framework):
    config.base.Configure.setupDependencies(self, framework)
    self.compilerFlags = framework.require('config.compilerFlags', self)
    return

  def configureDebugging(self):
    # should do error checking
    if self.framework.argDB['with-errorchecking']:
      self.addDefine('USE_ERRORCHECKING',1)
    self.debugging = self.compilerFlags.debugging

  def configure(self):
    self.executeTest(self.configureDebugging)
    return
