Skip to content
Snippets Groups Projects
Commit 6c616fd2 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Add a "Build Options" menu item.

Useful to check if SyncTERM was built with or without specific
features.
parent 643cbf9f
No related branches found
No related tags found
No related merge requests found
Pipeline #6737 failed
...@@ -7,6 +7,7 @@ Fix some use-after-free bugs in RIP ...@@ -7,6 +7,7 @@ Fix some use-after-free bugs in RIP
Fix reversed mouse wheel in GDI mode Fix reversed mouse wheel in GDI mode
Have the X11 IC focus follow window focus Have the X11 IC focus follow window focus
Fix WM_SETCURSOR handling to allow crabbing resize points in GDI Fix WM_SETCURSOR handling to allow crabbing resize points in GDI
Added "Build Options" menu item
Version 1.2rc1 Version 1.2rc1
-------------- --------------
......
...@@ -703,6 +703,9 @@ File Locations:: ...@@ -703,6 +703,9 @@ File Locations::
Shows the paths to the various files and directories Shows the paths to the various files and directories
that SyncTERM will access. that SyncTERM will access.
Build Options::
Shows which optional components SyncTERM was built to support.
==== Current Screen Mode ==== Current Screen Mode
......
...@@ -23,6 +23,20 @@ ...@@ -23,6 +23,20 @@
#include "vidmodes.h" #include "vidmodes.h"
#include "window.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 #ifdef _MSC_VER
#pragma warning(disable : 4244 4267 4018) #pragma warning(disable : 4244 4267 4018)
#endif #endif
...@@ -2618,6 +2632,7 @@ show_bbslist(char *current, int connected) ...@@ -2618,6 +2632,7 @@ show_bbslist(char *current, int connected)
"Font Management", "Font Management",
"Program Settings", "Program Settings",
"File Locations", "File Locations",
"Build Options",
NULL NULL
}; };
char *connected_settings_menu[] = { char *connected_settings_menu[] = {
...@@ -2625,6 +2640,7 @@ show_bbslist(char *current, int connected) ...@@ -2625,6 +2640,7 @@ show_bbslist(char *current, int connected)
"Font Management", "Font Management",
"Program Settings", "Program Settings",
"File Locations", "File Locations",
"Build Options",
NULL NULL
}; };
int at_settings = 0; int at_settings = 0;
...@@ -3164,6 +3180,8 @@ show_bbslist(char *current, int connected) ...@@ -3164,6 +3180,8 @@ show_bbslist(char *current, int connected)
" Modify hardware and screen/video settings\n\n" " Modify hardware and screen/video settings\n\n"
"~ File Locations ~\n" "~ File Locations ~\n"
" Display location for config and directory files\n\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" "~ " ALT_KEY_NAMEP "-B ~\n"
" View scrollback of last session\n"; " View scrollback of last session\n";
if (oldopt != -2) if (oldopt != -2)
...@@ -3353,6 +3371,108 @@ show_bbslist(char *current, int connected) ...@@ -3353,6 +3371,108 @@ show_bbslist(char *current, int connected)
NULL, NULL,
NULL); NULL);
break; 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;
} }
} }
} }
......
...@@ -57,6 +57,7 @@ ifndef win ...@@ -57,6 +57,7 @@ ifndef win
XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPKR_H XPDEV-MT_CFLAGS += -DHAS_MACHINE_SPKR_H
XPDEV_CFLAGS += -DHAS_MACHINE_SPKR_H XPDEV_CFLAGS += -DHAS_MACHINE_SPKR_H
endif 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 endif
# FreeBSD, OpenBSD, NetBSD, Linux, SunOS, and Darwin all have random()/srandom() # FreeBSD, OpenBSD, NetBSD, Linux, SunOS, and Darwin all have random()/srandom()
......
...@@ -15,7 +15,6 @@ ifndef NO_PULSEAUDIO ...@@ -15,7 +15,6 @@ ifndef NO_PULSEAUDIO
endif endif
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 ifndef WITHOUT_ALSA_SOUND
ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES) ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES)
CFLAGS += -DUSE_ALSA_SOUND CFLAGS += -DUSE_ALSA_SOUND
......
...@@ -15,15 +15,17 @@ ...@@ -15,15 +15,17 @@
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifndef __EMSCRIPTEN__ #ifndef __EMSCRIPTEN__
#if SOUNDCARD_H_IN==1 #ifdef SOUNDCARD_H_IN
#include <sys/soundcard.h> #if SOUNDCARD_H_IN==1
#elif SOUNDCARD_H_IN==2 #include <sys/soundcard.h>
#include <soundcard.h> #elif SOUNDCARD_H_IN==2
#elif SOUNDCARD_H_IN==3 #include <soundcard.h>
#include <linux/soundcard.h> #elif SOUNDCARD_H_IN==3
#else #include <linux/soundcard.h>
#ifndef USE_ALSA_SOUND #else
#warning Cannot find soundcard.h #ifndef USE_ALSA_SOUND
#warning Cannot find soundcard.h
#endif
#endif #endif
#endif #endif
#ifdef USE_ALSA_SOUND #ifdef USE_ALSA_SOUND
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment