import os

Import("env_etc")

if (    not env_etc.no_boost_python
    and getattr(env_etc, "ccp4io_has_cmaplib", False)):
      # XXX backward compatibility 2008-09-10
  Import("env_iotbx_boost_python_ext")
  env = env_iotbx_boost_python_ext.Clone()
  env.Append(CXXFLAGS=env_etc.ccp4io_defines)
  env.Append(SHCXXFLAGS=env_etc.ccp4io_defines)
  env.Prepend(LIBS=["cctbx", "ccp4io"])
  if (os.name == "nt") :
    env.Prepend(LIBS=["Advapi32"])
  env_etc.enable_more_warnings(env=env)
  env.SharedLibrary(
    target="#lib/iotbx_ccp4_map_ext",
    source=["ext.cpp"])
