]> Dogcows Code - chaz/yoink/commitdiff
small build system tweaks
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 11 Nov 2009 08:52:22 +0000 (01:52 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 11 Nov 2009 08:52:22 +0000 (01:52 -0700)
README
configure.ac
src/MainLayer.cc

diff --git a/README b/README
index a8cfd9d525eb310c87115526553c62b49fc1d972..3f99fc6cd9839d2414e9f4170ff2fb049fc96f7a 100644 (file)
--- a/README
+++ b/README
@@ -17,7 +17,7 @@ freealut
 libvorbis
 Lua
 OpenAL
-OpenGL (libGL, libGL or opengl32, glu32)
+OpenGL
 SDL
 SDL_image (with libpng support)
 
index 997a7f23b14d6228c12ad4fd7d3017dd90abbe1d..f75ce600c01e9e91031fce1641953c3cdc6d8648 100644 (file)
@@ -102,8 +102,8 @@ AC_ARG_WITH([log-level],
 
 if test x$debug = xyes
 then
-       CFLAGS="$CFLAGS -Wall -g -DDEBUG"
-       CXXFLAGS="$CXXFLAGS -Wall -g -DDEBUG"
+       CFLAGS="$CFLAGS -DDEBUG -Wall -Wno-uninitialized"
+       CXXFLAGS="$CXXFLAGS -DDEBUG -Wall -Wno-uninitialized"
 else
        CFLAGS="$CFLAGS -DNDEBUG"
        CXXFLAGS="$CXXFLAGS -DNDEBUG"
index c5a93864a57f24e34cbfa1df103409d10ae1864b..2e687855dd73d03a557bcf2108d9940d1706ed4c 100644 (file)
@@ -29,6 +29,7 @@
 #include <cstdlib>             // atexit, getenv
 #include <iostream>
 #include <string>
+#include <unistd.h>            // access
 
 #include <Moof/Dispatcher.hh>
 #include <Moof/Exception.hh>
@@ -189,14 +190,39 @@ void printUsage()
                          << "See documentation for more options." << std::endl;
 }
 
-void printInfo()
+void printInfo(int argc, char* argv[])
 {
-       std::cout << PACKAGE_STRING << std::endl
+       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
 #ifdef __DATE__
-                         << "When compiled: "__DATE__" "__TIME__ << std::endl
+                         << "        Built: "__DATE__" "__TIME__ << std::endl
 #endif
-                         << "Compiler: "COMPILER_STRING << std::endl
-                         << "Asset directory: "YOINK_DATADIR << std::endl
+                         << "     Compiler: "COMPILER_STRING << std::endl
+                         << "       Assets: " << assets << std::endl
                          << "Build options: "
 #ifdef NDEBUG
                          << "-"
@@ -213,11 +239,9 @@ void printInfo()
 #ifndef USE_THREADS
                          << "-"
 #endif
-                         << "threads "
-                         << std::endl;
-#if !defined (_WIN32) && !defined(__WIN32__)
-       system("uname -a");
-#endif
+                         << "threads" << std::endl
+                         << "      YOINKRC: " << config << std::endl
+                         << "YOINK_DATADIR: " << datadir << std::endl;
 }
 
 void goodbye()
@@ -239,7 +263,7 @@ int main(int argc, char* argv[])
                }
                else if (arg == "-i" || arg == "--info")
                {
-                       printInfo();
+                       printInfo(argc, argv);
                        return 0;
                }
        }
This page took 0.029554 seconds and 4 git commands to generate.