/* Public domain */ /* * Output compile information for ag_core and ag_gui libraries. */ static void PrintUsage(char *); static void OutputCFLAGS(void); static void OutputLIBS(void); #include "agar-config-generic.h" #include #include #include #ifdef HAVE_SDL #include #include #endif #include #ifdef HAVE_OPENGL #include #include #endif #include #ifdef HAVE_FREETYPE #include #include #endif #include #ifdef HAVE_JPEG #include #include #endif #include #ifdef HAVE_MATH #include #include #endif #include #ifdef HAVE_PTHREADS #include #include #endif #include #ifdef ENABLE_NLS #include #include #endif #include #include #if defined(__APPLE__) || defined(__MACOSX__) # include #endif const struct config_string_opt stringOpts[] = { GENERIC_STRING_OPTS, #ifdef AG_THREADS { "--threads", "yes" }, #else { "--threads", "no" }, #endif #ifdef AG_NETWORK { "--network", "yes" }, #else { "--network", "no" }, #endif #ifdef HAVE_SDL { "--sdl", "yes" }, #else { "--sdl", "no" }, #endif #ifdef HAVE_OPENGL { "--opengl", "yes" }, #else { "--opengl", "no" }, #endif #ifdef HAVE_FREETYPE { "--freetype", "yes" }, #else { "--freetype", "no" }, #endif }; const int nStringOpts = sizeof(stringOpts) / sizeof(stringOpts[0]); static void PrintUsage(char *name) { fprintf(stderr, GENERIC_USAGE_STRING, name); fprintf(stderr, "[--threads] [--network] [--sdl] [--opengl] [--freetype]\n"); } static void OutputCFLAGS(void) { printf("-I%s ", INCLDIR); #ifdef SDL_CFLAGS printf("%s ", SDL_CFLAGS); #endif #ifdef FREETYPE_CFLAGS printf("%s ", FREETYPE_CFLAGS); #endif #ifdef OPENGL_CFLAGS printf("%s ", OPENGL_CFLAGS); #endif #ifdef MATH_CFLAGS printf("%s ", MATH_CFLAGS); #endif #ifdef JPEG_CFLAGS printf("%s ", JPEG_CFLAGS); #endif #ifdef HAVE_PTHREADS printf("%s ", PTHREADS_CFLAGS); #endif #ifdef ENABLE_NLS printf("%s ", GETTEXT_CFLAGS); #endif #ifdef DSO_CFLAGS printf("%s ", DSO_CFLAGS); #endif printf("\n"); } static void OutputLIBS(void) { printf("-L%s ", LIBDIR); printf("-lag_gui -lag_core "); #ifdef SDL_LIBS printf("%s ", SDL_LIBS); #endif #ifdef FREETYPE_LIBS printf("%s ", FREETYPE_LIBS); #endif #ifdef OPENGL_LIBS printf("%s ", OPENGL_LIBS); #endif #ifdef MATH_LIBS printf("%s ", MATH_LIBS); #endif #ifdef JPEG_LIBS printf("%s ", JPEG_LIBS); #endif #ifdef HAVE_PTHREADS printf("%s ", PTHREADS_LIBS); #endif #ifdef ENABLE_NLS printf("%s ", GETTEXT_LIBS); #endif #ifdef DSO_LIBS printf("%s ", DSO_LIBS); #endif #if (defined(__APPLE__) || defined(__MACOSX__)) && defined(MAC_OS_X_VERSION_10_5) printf("-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"); #endif printf("\n"); } int main(int argc, char *argv[]) { return GenericFooConfig(stringOpts, nStringOpts, argc, argv); }