From d262a69dd78af45a648e1f973e16abb2803a0035 Mon Sep 17 00:00:00 2001 From: Andrew Riedi Date: Tue, 18 Dec 2007 01:11:53 -0800 Subject: [PATCH] loader: Add --compile-info option to Wine. --- loader/main.c | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++- loader/wine.man.in | 2 + 2 files changed, 222 insertions(+), 1 deletions(-) diff --git a/loader/main.c b/loader/main.c index 5e0f330..2dcb175 100644 --- a/loader/main.c +++ b/loader/main.c @@ -2,6 +2,7 @@ * Emulator initialisation code * * Copyright 2000 Alexandre Julliard + * Copyright 2007 Andrew Riedi * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,6 +28,18 @@ #include #endif +/* Determine if we have OSS. */ +#if HAVE_SYS_SOUNDCARD_H +# include +#elif HAVE_MACHINE_SOUNDCARD_H +# include +#elif HAVE_SOUNDCARD_H +# include +#endif +#ifdef SNDCTL_DSP_STEREO +# define HAVE_OSS 1 +#endif + #include "wine/library.h" #include "main.h" @@ -72,7 +85,8 @@ static void check_command_line( int argc, char *argv[] ) static const char usage[] = "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" " wine --help Display this help and exit\n" - " wine --version Output version information and exit"; + " wine --version Output version information and exit\n" + " wine --compile-info Output compile-time information and exit"; if (argc <= 1) { @@ -89,6 +103,211 @@ static void check_command_line( int argc, char *argv[] ) printf( "%s\n", wine_version ); exit(0); } + if (!strcmp( argv[1], "--compile-info" )) + { + printf( "%s\n", wine_version ); + + /* Compiler */ + printf( "\nCompiler:\n" ); +#ifdef __GNUC__ + printf( "\tGCC %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ ); +# if (__GNUC__ == 4 && (__GNUC_MINOR__ == 0 || __GNUC_MINOR__ == 1)) + printf( "\t**This GCC may cause problems with copy protection.**\n" ); +# endif +#endif + + /* Audio */ + printf( "\nAudio:\n" ); +#if HAVE_ALSA + printf( "\tALSA Support [Linux Only]: yes\n" ); +#else + printf( "\tALSA Support [Linux Only]: no\n" ); +#endif +#if HAVE_COREAUDIO_COREAUDIO_H + printf( "\tCoreAudio Support [Mac OS X Only]: yes\n" ); +#else + printf( "\tCoreAudio Support [Mac OS X Only]: no\n" ); +#endif +#if HAVE_ESD + printf( "\tEsounD Support: yes\n" ); +#else + printf( "\tEsounD Support: no\n" ); +#endif +#if HAVE_JACK_JACK_H + printf( "\tJACK Support [Linux / Mac OS X Only]: yes\n" ); +#else + printf( "\tJACK Support [Linux / Mac OS X Only]: no\n" ); +#endif +#if HAVE_AUDIO_AUDIOLIB_H || HAVE_AUDIO_SOUNDLIB_H + printf( "\tNAS Support: yes\n" ); +#else + printf( "\tNAS Support: no\n" ); +#endif +#if HAVE_OSS + printf( "\tOSS Support: yes\n" ); +#else + printf( "\tOSS Support: no\n" ); +#endif + + /* Graphics */ + printf( "\nGraphics:\n" ); +#if HAVE_CURSES_H +# if HAVE_NCURSES_H + printf( "\tCurses Support: ncurses\n" ); +# else + printf( "\tCurses Support: basic\n" ); +# endif +#else + printf( "\tCurses Support: no\n" ); +#endif +#if HAVE_GL_GL_H && HAVE_GL_GLX_H + printf( "\tDirect3D Support: yes\n" ); +#else + printf( "\tDirect3D Support: no\n" ); +#endif +#if HAVE_FREETYPE + printf( "\tFreeType Support: yes\n" ); +#else + printf( "\tFreeType Support: no\n" ); +#endif +#if HAVE_GL_GL_H + printf( "\tOpenGL Support: basic" ); +# if HAVE_GL_GLEXT_H + printf( ", glext" ); +# endif +# if HAVE_GL_GLU_H + printf( ", glu" ); +# endif +# if HAVE_GL_GLX_H + printf( ", glx" ); +# endif + printf( "\n" ); +#else + printf( "\tOpenGL Support: no\n" ); +#endif +#if HAVE_X11_XLIB_H + printf( "\tX11 Support: Xlib" ); +# if HAVE_X11_XCURSOR_XCURSOR_H + printf( ", Xcursor" ); +# endif +# if HAVE_X11_EXTENSIONS_XCOMPOSITE_H + printf( ", Xcomposite" ); +# endif +# if HAVE_X11_EXTENSIONS_XF86VMODE_H + printf( ", xf86vmode" ); +# endif +# if HAVE_X11_EXTENSIONS_XINERAMA_H + printf( ", Xinerama" ); +# endif +# if HAVE_X11_EXTENSIONS_XINPUT_H + printf( ", Xinput" ); +# endif +# if HAVE_X11_XKBLIB_H + printf( ", XKBlib" ); +# endif +# if HAVE_X11_EXTENSIONS_XRANDR_H + printf( ", Xrandr" ); +# endif +# if HAVE_X11_EXTENSIONS_XRENDER_H + printf( ", Xrender" ); +# endif +# if HAVE_X11_EXTENSIONS_SHAPE_H + printf( ", Xshape" ); +# endif +# if HAVE_X11_EXTENSIONS_XSHM_H + printf( ", Xshm" ); +# endif +# if HAVE_X11_XUTIL_H + printf( ", Xutil" ); +# endif + printf( "\n" ); +#else + printf( "\tX11 Support: no" ); +#endif + + /* Network */ + printf( "\nNetwork:\n" ); +#if HAVE_CAPI20_H + printf( "\tCapi20 (ISDN) Support: yes\n" ); +#else + printf( "\tCapi20 (ISDN) Support: no\n" ); +#endif +#if HAVE_NETIPX_IPX_H + printf( "\tIPX Support: yes\n" ); +#else + printf( "\tIPX Support: no\n" ); +#endif +#if HAVE_LDAP + printf( "\tLDAP Support: yes\n" ); +#else + printf( "\tLDAP Support: no\n" ); +#endif + + /* Other */ + printf( "\nOther:\n" ); +#if HAVE_CARBON_CARBON_H + printf( "\tCarbon Support [Mac OS X Only]: yes\n" ); +#else + printf( "\tCarbon Support [Mac OS X Only]: no\n" ); +#endif +#if HAVE_CUPS_CUPS_H + printf( "\tCUPS Support: yes\n" ); +#else + printf( "\tCUPS Support: no\n" ); +#endif +#if HAVE_DBUS_DBUS_H + printf( "\tDBUS Support: yes\n" ); +#else + printf( "\tDBUS Support: no\n" ); +#endif +#if HAVE_HAL_LIBHAL_H + printf( "\tHAL Support [Linux / FreeBSD Only]: yes\n" ); +#else + printf( "\tHAL Support [Linux / FreeBSD Only]: no\n" ); +#endif +#if HAVE_IOKIT_IOKITLIB_H + printf( "\tI/O Kit Support [Mac OS X Only]: yes\n" ); +#else + printf( "\tI/O Kit Support [Mac OS X Only]: no\n" ); +#endif +#if HAVE_OPENSSL_SSL_H + printf( "\tOpenSSL Support: basic" ); +# if HAVE_OPENSSL_SSL_H + printf( ", error" ); +# endif + printf( "\n" ); +#else + printf( "\tOpenSSL Support: no\n" ); +#endif +#if HAVE_PTHREAD_H + printf( "\tPOSIX Thread Support: basic" ); +# if HAVE_PTHREAD_RWLOCK_T + printf( ", rwlock" ); +# endif +# if HAVE_PTHREAD_RWLOCKATTR_T + printf( ", rwlockattr" ); +# endif + printf( "\n" ); +#else + printf( "\tPOSIX Thread Support: no\n" ); +#endif +#if HAVE_VALGRIND_MEMCHECK_H + printf( "\tValgrind Support [Linux Only]: memcheck\n" ); +#else + printf( "\tValgrind Support [Linux Only]: no\n" ); +#endif +#if HAVE_LIBXML2 + printf( "\tXML Support: libxml2" ); +# if HAVE_LIBXSLT + printf( ", libxslt" ); +# endif + printf( "\n" ); +#else + printf( "\tXML Support: no\n" ); +#endif + + exit(0); + } } diff --git a/loader/wine.man.in b/loader/wine.man.in index 1a551f0..4cef3ee 100644 --- a/loader/wine.man.in +++ b/loader/wine.man.in @@ -8,6 +8,8 @@ wine \- run Windows programs on Unix .B wine --help .br .B wine --version +.br +.B wine --compile-info .PP For instructions on passing arguments to Windows programs, please see the .B -- 1.4.4.2