+void printInfo(int argc, char* argv[])
+{
+ std::string assets;
+ std::string datadir;
+ std::string config;
+
+ assets.assign(YOINK_DATADIR);
+ int accessible = access(assets.c_str(), R_OK);
+ if (accessible != 0) assets += " (no access)";
+
+ char* temp = getenv("YOINK_DATADIR");
+ if (temp)
+ {
+ datadir = temp;
+ accessible = access(temp, R_OK);
+ if (accessible != 0) datadir += " (no access)";
+ }
+
+ temp = getenv("YOINKRC");
+ if (temp)
+ {
+ config = temp;
+ accessible = access(temp, R_OK);
+ if (accessible != 0) config += " (no access)";
+ }
+
+ std::cout << " Executable: " << argv[0] << std::endl
+ << " Version: "VERSION << std::endl
+#if defined(__DATE__) && defined(__TIME__)
+ << " Built: "__DATE__" "__TIME__ << std::endl
+#endif
+ << " Compiler: "COMPILER_STRING << std::endl
+ << " Assets: " << assets << std::endl
+ << "Build options: "
+#ifdef NDEBUG
+ << "-"
+#endif
+ << "debug "
+#ifndef USE_DOUBLE_PRECISION
+ << "-"
+#endif
+ << "double-precision "
+#ifndef USE_GTK
+ << "-"
+#endif
+ << "gtk "
+#ifndef PROFILING_ENABLED
+ << "-"
+#endif
+ << "profile "
+#ifndef USE_QT4
+ << "-"
+#endif
+ << "qt4 "
+#ifndef USE_THREADS
+ << "-"
+#endif
+ << "threads" << std::endl
+ << " YOINKRC: " << config << std::endl
+ << "YOINK_DATADIR: " << datadir << std::endl;
+}
+