diff --git a/config.features.h b/config.features.h new file mode 100644 index 0000000000..84b9641056 --- /dev/null +++ b/config.features.h @@ -0,0 +1,101 @@ +#ifndef __SSNES_FEATURES_H +#define __SSNES_FEATURES_H + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifdef HAVE_SDL +static const bool _sdl_supp = true; +#else +static const bool _sdl_supp = false; +#endif + +#ifdef HAVE_ALSA +static const bool _alsa_supp = true; +#else +static const bool _alsa_supp = false; +#endif + +#ifdef HAVE_OSS +static const bool _oss_supp = true; +#else +static const bool _oss_supp = false; +#endif + +#ifdef HAVE_AL +static const bool _al_supp = true; +#else +static const bool _al_supp = false; +#endif + +#ifdef HAVE_RSOUND +static const bool _rsound_supp = true; +#else +static const bool _rsound_supp = false; +#endif + +#ifdef HAVE_ROAR +static const bool _roar_supp = true; +#else +static const bool _roar_supp = false; +#endif + +#ifdef HAVE_JACK +static const bool _jack_supp = true; +#else +static const bool _jack_supp = false; +#endif + +#ifdef HAVE_FILTER +static const bool _filter_supp = true; +#else +static const bool _filter_supp = false; +#endif + +#ifdef HAVE_CG +static const bool _cg_supp = true; +#else +static const bool _cg_supp = false; +#endif + +#ifdef HAVE_XML +static const bool _xml_supp = true; +#else +static const bool _xml_supp = false; +#endif + +#ifdef HAVE_DYNAMIC +static const bool _dynamic_supp = true; +#else +static const bool _dynamic_supp = false; +#endif + +#ifdef HAVE_FFMPEG +static const bool _ffmpeg_supp = true; +#else +static const bool _ffmpeg_supp = false; +#endif + +#ifdef HAVE_SRC +static const bool _src_supp = true; +#else +static const bool _src_supp = false; +#endif + +#ifdef HAVE_CONFIGFILE +static const bool _configfile_supp = true; +#else +static const bool _configfile_supp = false; +#endif + +#ifdef HAVE_FREETYPE +static const bool _freetype_supp = true; +#else +static const bool _freetype_supp = false; +#endif + +#endif diff --git a/ssnes.c b/ssnes.c index 4f8451658b..d5956b3639 100644 --- a/ssnes.c +++ b/ssnes.c @@ -244,6 +244,31 @@ static void fill_pathname(char *out_path, char *in_path, const char *replace) #define PACKAGE_VERSION "0.2" #endif +#include "config.features.h" + +#define _PSUPP(var, name, desc) printf("\t%s:\n\t\t%s: %s\n", name, desc, _##var##_supp ? "yes" : "no") +static void print_features(void) +{ + puts(""); + puts("Features:"); + _PSUPP(sdl, "SDL", "SDL drivers"); + _PSUPP(alsa, "ALSA", "audio driver"); + _PSUPP(oss, "OSS", "audio driver"); + _PSUPP(jack, "Jack", "audio driver"); + _PSUPP(rsound, "RSound", "audio driver"); + _PSUPP(roar, "RoarAudio", "audio driver"); + _PSUPP(al, "OpenAL", "audio driver"); + _PSUPP(filter, "Filter", "CPU based video filters"); + _PSUPP(cg, "Cg", "Cg pixel shaders"); + _PSUPP(xml, "XML", "bSNES XML pixel shaders"); + _PSUPP(dynamic, "Dynamic", "Dynamic run-time loading of libsnes library"); + _PSUPP(ffmpeg, "FFmpeg", "On-the-fly recording of gameplay with libavcodec"); + _PSUPP(src, "SRC", "libsamplerate audio resampling"); + _PSUPP(configfile, "Config file", "Configuration file support"); + _PSUPP(freetype, "FreeType", "TTF font rendering with FreeType"); +} +#undef _PSUPP + static void print_help(void) { puts("============================================================="); @@ -272,6 +297,8 @@ static void print_help(void) puts("\t-r/--record: Path to record video file. Settings for video/audio codecs are found in config file."); #endif puts("\t-v/--verbose: Verbose logging"); + + print_features(); } static void parse_input(int argc, char *argv[])