+Path get_sys_lib_dir()
+{
+ const char *argv0 = Application::get_argv0();
+ if(!argv0)
+ throw logic_error("no startup command");
+ return get_sys_lib_dir(argv0, Application::get_name());
+}
+
+Path path_lookup(const string &name, const list<Path> &paths)
+{
+ for(list<Path>::const_iterator i=paths.begin(); i!=paths.end(); ++i)
+ {
+ Path full = *i/name;
+ if(exists(full))
+ return realpath(full);
+ }
+
+ return Path();
+}
+
+Path path_lookup(const string &name)