diff --git a/src/syncterm/CHANGES b/src/syncterm/CHANGES index 4e017afc852f6f4f67822b3d490d2aa1d528f60f..12df5e514984a309be1be1956fc131730f62753f 100644 --- a/src/syncterm/CHANGES +++ b/src/syncterm/CHANGES @@ -7,6 +7,7 @@ Fix some use-after-free bugs in RIP Fix reversed mouse wheel in GDI mode Have the X11 IC focus follow window focus Fix WM_SETCURSOR handling to allow crabbing resize points in GDI +Added "Build Options" menu item Version 1.2rc1 -------------- diff --git a/src/syncterm/Manual.txt b/src/syncterm/Manual.txt index ba0778a2fa9acbe3a9e12d1849b501ed4e957893..277d223f22566c23b474d67baacc610099ed8673 100644 --- a/src/syncterm/Manual.txt +++ b/src/syncterm/Manual.txt @@ -703,6 +703,9 @@ File Locations:: Shows the paths to the various files and directories that SyncTERM will access. +Build Options:: +Shows which optional components SyncTERM was built to support. + ==== Current Screen Mode diff --git a/src/syncterm/bbslist.c b/src/syncterm/bbslist.c index c0abc58744af8fcabe144e2f7e9a407f210f82f2..d32579c779fe1ba05d2640e7f2c42a8bd5566491 100644 --- a/src/syncterm/bbslist.c +++ b/src/syncterm/bbslist.c @@ -23,6 +23,20 @@ #include "vidmodes.h" #include "window.h" +#if defined(__unix__) && defined(SOUNDCARD_H_IN) && (SOUNDCARD_H_IN > 0) && !defined(_WIN32) + #if SOUNDCARD_H_IN==1 + #include <sys/soundcard.h> + #elif SOUNDCARD_H_IN==2 + #include <soundcard.h> + #elif SOUNDCARD_H_IN==3 + #include <linux/soundcard.h> + #else + #ifndef USE_ALSA_SOUND + #warning Cannot find soundcard.h + #endif + #endif +#endif + #ifdef _MSC_VER #pragma warning(disable : 4244 4267 4018) #endif @@ -2618,6 +2632,7 @@ show_bbslist(char *current, int connected) "Font Management", "Program Settings", "File Locations", + "Build Options", NULL }; char *connected_settings_menu[] = { @@ -2625,6 +2640,7 @@ show_bbslist(char *current, int connected) "Font Management", "Program Settings", "File Locations", + "Build Options", NULL }; int at_settings = 0; @@ -3164,6 +3180,8 @@ show_bbslist(char *current, int connected) " Modify hardware and screen/video settings\n\n" "~ File Locations ~\n" " Display location for config and directory files\n\n" + "~ Build Options ~\n" + " Display compile options selected at build time\n\n" "~ " ALT_KEY_NAMEP "-B ~\n" " View scrollback of last session\n"; if (oldopt != -2) @@ -3353,6 +3371,108 @@ show_bbslist(char *current, int connected) NULL, NULL); break; + case 5: // Build Options + asprintf(&p, + "`SyncTERM Build Options`\n\n" + "%s Cryptlib (ie: SSH and TLS)\n" + "%s Operation Overkill ][ Terminal\n\n" + "Video\n" + " %s SDL\n" + " %s X11 Support\n" + " %s Xinerama\n" + " %s XRandR\n" + " %s XRender\n" + " %s GDI\n\n" + "Audio\n" + " %s OSS\n" + " %s SDL\n" + " %s ALSA\n" + " %s PortAudio\n" + " %s PulseAudio\n" + " %s PC Speaker\n", +#ifdef WITHOUT_CRYPTLIB + "[ ]", +#else + "[`\xFB`]", +#endif +#ifdef WITHOUT_OOII + "[ ]", +#else + "[`\xFB`]", +#endif +#ifdef WITH_SDL + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef NO_X + "[ ]", +#else + "[`\xFB`]", +#endif +#ifdef WITH_XINERAMA + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef WITH_XRANDR + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef WITH_XRENDER + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef WITH_GDI + "[`\xFB`]", +#else + "[ ]", +#endif +#if (defined SOUNDCARD_H_IN) && (SOUNDCARD_H_IN > 0) && (defined AFMT_U8) + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef WITH_SDL_AUDIO + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef USE_ALSA_SOUND + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef WITH_PORTAUDIO + "[`\xFB`]", +#else + "[ ]", +#endif +#ifdef WITH_PULSEAUDIO + "[`\xFB`]", +#else + "[ ]", +#endif +#if (defined(__FreeBSD__) && defined(HAS_MACHINE_SPEAKER_H)) || ((defined(__OpenBSD__) || defined(__NetBSD__)) && defined(HAS_MACHINE_SPKR_H)) + "[`\xFB`]" +#elif !defined(__GNU__) && !defined(__QNX__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__HAIKU__) && !defined(__EMSCRIPTEN__) + "[`\xFB`]" +#else + "[ ]" +#endif + ); + uifc.showbuf(WIN_MID | WIN_SAV | WIN_HLP, + 0, + 0, + 60, + 21, + "Build Options", + p, + NULL, + NULL); + break; } } } diff --git a/src/xpdev/Common.gmake b/src/xpdev/Common.gmake index b5ad5288067591e7504daba0b9d508c9656840fc..e929101f7bf4188f67cc180d52f1de2225434d92 100644 --- a/src/xpdev/Common.gmake +++ b/src/xpdev/Common.gmake @@ -57,6 +57,7 @@ ifndef win XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPKR_H XPDEV_CFLAGS += -DHAS_MACHINE_SPKR_H endif + XPDEV-MT_CFLAGS += -DSOUNDCARD_H_IN=$(shell if [ -f /usr/include/sys/soundcard.h ] ; then echo 1 ; elif [ -f /usr/include/soundcard.h ] ; then echo 2 ; elif [ -f /usr/include/linux/soundcard.h ] ; then echo 3 ; else echo 0 ; fi) -I. $(XPDEV_CFLAGS) endif # FreeBSD, OpenBSD, NetBSD, Linux, SunOS, and Darwin all have random()/srandom() diff --git a/src/xpdev/GNUmakefile b/src/xpdev/GNUmakefile index 6ee81e95086fadd605faab2b9bba18b02a6fafa3..ae38daff5eec6faaf190f254b6a63e86a71d1295 100644 --- a/src/xpdev/GNUmakefile +++ b/src/xpdev/GNUmakefile @@ -15,7 +15,6 @@ ifndef NO_PULSEAUDIO endif endif -CFLAGS += -DSOUNDCARD_H_IN=$(shell if [ -f /usr/include/sys/soundcard.h ] ; then echo 1 ; elif [ -f /usr/include/soundcard.h ] ; then echo 2 ; elif [ -f /usr/include/linux/soundcard.h ] ; then echo 3 ; else echo 0 ; fi) -I. $(XPDEV_CFLAGS) ifndef WITHOUT_ALSA_SOUND ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES) CFLAGS += -DUSE_ALSA_SOUND diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c index 4e4cfd4207240aeb05114ea70f1c7249f53d1d95..c3f434f9d773ca97ecbf32b92d5e791d80261e59 100644 --- a/src/xpdev/xpbeep.c +++ b/src/xpdev/xpbeep.c @@ -15,15 +15,17 @@ #include <fcntl.h> #include <sys/ioctl.h> #ifndef __EMSCRIPTEN__ - #if SOUNDCARD_H_IN==1 - #include <sys/soundcard.h> - #elif SOUNDCARD_H_IN==2 - #include <soundcard.h> - #elif SOUNDCARD_H_IN==3 - #include <linux/soundcard.h> - #else - #ifndef USE_ALSA_SOUND - #warning Cannot find soundcard.h + #ifdef SOUNDCARD_H_IN + #if SOUNDCARD_H_IN==1 + #include <sys/soundcard.h> + #elif SOUNDCARD_H_IN==2 + #include <soundcard.h> + #elif SOUNDCARD_H_IN==3 + #include <linux/soundcard.h> + #else + #ifndef USE_ALSA_SOUND + #warning Cannot find soundcard.h + #endif #endif #endif #ifdef USE_ALSA_SOUND