#include <iostream>
#include <cstdlib>
+#include <string>
#ifdef PLATFORM_WINDOWS
#include <fcntl.h>
}
+void
+set_debug_options_from_env ()
+{
+ bool set;
+ std::string options;
+
+ options = Glib::getenv ("PBD_DEBUG", set);
+ if (set) {
+ std::cerr << "PBD_DEBUG=" << options << std::endl;
+ PBD::parse_debug_options (options.c_str());
+ }
+}
+
bool
PBD::init ()
{
setup_libpbd_enums ();
+ set_debug_options_from_env ();
+
libpbd_initialized = true;
return true;
}