From: Charles McGarvey Date: Wed, 11 Nov 2009 08:52:22 +0000 (-0700) Subject: small build system tweaks X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=31d52677b38d935297d132bdbd956c655cd3feee;p=chaz%2Fyoink small build system tweaks --- diff --git a/README b/README index a8cfd9d..3f99fc6 100644 --- 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) diff --git a/configure.ac b/configure.ac index 997a7f2..f75ce60 100644 --- a/configure.ac +++ b/configure.ac @@ -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" diff --git a/src/MainLayer.cc b/src/MainLayer.cc index c5a9386..2e68785 100644 --- a/src/MainLayer.cc +++ b/src/MainLayer.cc @@ -29,6 +29,7 @@ #include // atexit, getenv #include #include +#include // access #include #include @@ -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; } }