Disable OSS by default and fix compilation with OSS disabled
authorAlexander Koenig <alex@lisas.de>
Tue, 18 Feb 2020 22:40:38 +0000 (23:40 +0100)
committerAlexander Koenig <alex@lisas.de>
Tue, 18 Feb 2020 22:40:38 +0000 (23:40 +0100)
configure.ac
src/tX_dialog.cc

index 8c99afbe10b47abd3d4c23d86254df3af3999d34..bbcd45f17fba71d24a639a338f59f7fecf49fcf1 100644 (file)
@@ -14,7 +14,7 @@ dnl AC_ARG_ENABLE(benchmark   [  --enable-benchmark      creates a non-functional
 AC_ARG_ENABLE(wav,             [  --enable-wav            enables the built-in wav-loader (default=yes) ])
 AC_ARG_ENABLE(alsa,            [  --enable-alsa           use ALSA for sound output (default=auto) ])
 AC_ARG_ENABLE(jack,            [  --enable-jack           use JACK for sound output (default=auto) ])
-AC_ARG_ENABLE(oss,             [  --enable-oss            use OSS for sound output (default=auto) ])
+AC_ARG_ENABLE(oss,             [  --enable-oss            use OSS for sound output (default=no) ])
 AC_ARG_ENABLE(pulse,           [  --enable-pulse          use PulseAudio for sound output (default=auto) ])
 AC_ARG_ENABLE(x11,    [  --enable-x11            include X11 specific code (default=auto) ])
 AC_ARG_ENABLE(libxml2,         [  --disable-libxml2       use libxml even if verion 2 detected (default=auto) ])
@@ -365,7 +365,7 @@ if test "$enable_pulse" != "no"; then
 fi
 
 
-if test "$enable_oss" != "no"; then
+if test "$enable_oss" = "yes"; then
        AC_CHECK_HEADERS(sys/ioctl.h sys/soundcard.h,oss=yes,oss=no)
        
        if test "$oss" = "yes"; then
@@ -600,8 +600,12 @@ AC_OUTPUT(Makefile
        terminatorX.spec 
        terminatorX.1)
 
-option_info() {
+option_info_min() {
        echo "$option support: $option_val"
+}
+
+option_info() {
+       option_info_min;
        if test "$option_val" != "yes"; then
                echo "  - If you want $option support get $option from"
                echo "  -       $option_url"
@@ -627,7 +631,7 @@ fi
 
 
 option=oss; option_val=$OPTION_OSS; option_url=http://www.kernel.org
-option_info;
+option_info_min; # nobody wants OSS anymore
 
 option=alsa; option_val=$OPTION_ALSA; option_url=http://www.alsa-project.org
 option_info;
index 33e24788b899f176bfd1ab4ae2b3530e440a89a8..dc1927e99ea58bd8222eec7cd11f97a303db908d 100644 (file)
@@ -249,7 +249,6 @@ void append_alsa_device_list(GtkComboBoxText *combo) {
 #endif
 
 
-#ifdef USE_OSS
 int oss_select_dsp_only(const struct dirent *entry){
        return (strstr(entry->d_name, "dsp")!=0);
 }
@@ -272,7 +271,7 @@ void append_oss_device_list(GtkComboBoxText *combo, char *current) {
                }
        }
 }
-#endif
+
 
 void append_sampling_rates_list(GtkComboBoxText *combo, int current) {
 
@@ -347,6 +346,7 @@ void init_tx_options(GtkWidget *dialog) {
        gtk_widget_set_sensitive(lookup_widget(dialog, "oss_audio_device"), 0);
        gtk_widget_set_sensitive(lookup_widget(dialog, "oss_buffers"), 0);
        gtk_widget_set_sensitive(lookup_widget(dialog, "oss_buffersize"), 0);
+       gtk_widget_set_sensitive(lookup_widget(dialog, "oss_samplerate"), 0);
 #endif
        
 #ifndef USE_ALSA