Applied the ogg123 patch and some minor fixes. Alex
[terminatorX.git] / configure.in
index 226b10e5e524f3458fce8652250f88b4ab1fae21..5a70d1189766cf9382b065786f86033659dfce89 100644 (file)
@@ -6,6 +6,7 @@ AM_CONFIG_HEADER(config.h)
 dnl AC_ARG_ENABLE(closedev, [  --enable-closedev       close audio device if not in use. [default=yes] ])
 AC_ARG_ENABLE(sox, [  --enable-sox            use sox as input converter. [default=yes] ])
 AC_ARG_ENABLE(mpg123, [  --enable-mpg123         use mpg123 as input converter. [default=yes] ])
+AC_ARG_ENABLE(ogg123, [  --enable-ogg123         use ogg123 as input converter. [default=yes] ])
 dnl AC_ARG_ENABLE(wavonly,  [  --enable-wavonly        enable the builtin wav routines. (no sox/mpg123) ])
 AC_ARG_ENABLE(scheduler,[  --enable-scheduler      enable rt-scheduling (req. root-priv). [default=yes] ])
 AC_ARG_ENABLE(debug,    [  --enable-debug          enable debug output. [default=no] ])
@@ -14,7 +15,7 @@ dnl AC_ARG_ENABLE(3dnow,    [  --enable-3dnow          enables 3DNow! support. [
 dnl AC_ARG_ENABLE(benchmark,[  --enable-benchmark      creates a non-functional test version [default=no] ])
 AC_ARG_ENABLE(wav,          [  --enable-wav            enables the builtin wav-loader [default=yes] ])
 AC_ARG_ENABLE(xsetpointer,  [  --enable-xsetpointer    enables executing of xsetpointer [default=auto] ])
-AC_ARG_ENABLE(alsa,         [  --enable-alsa           use ALSA for sound output [default=auto] ])
+dnl AC_ARG_ENABLE(alsa,         [  --enable-alsa           use ALSA for sound output [default=auto] ])
 AC_ARG_ENABLE(oss,          [  --enable-oss            use OSS for sound output [default=auto] ])
 
 dnl AC_ARG_ENABLE(dial,         [  --enable-dial           use dials instead of scales for effects [default=yes] ])
@@ -67,6 +68,13 @@ if test "$enable_mpg123" != "no"; then
        fi
 fi
 
+if test "$enable_ogg123" != "no"; then
+       AC_CHECK_PROG(OGG123_PROG, ogg123, yes)
+       if test "$OGG123_PROG" = "yes"; then
+               AC_DEFINE(USE_OGG123_INPUT)
+       fi
+fi
+
 if test "$enable_xsetpointer" != "no"; then
        AC_CHECK_PROG(XSETPOINTER_PROG, xsetpointer, yes)
        if test "$XSETPOINTER_PROG" = "yes"; then
@@ -81,25 +89,25 @@ fi
 using_alsa=no
 using_oss=no
 
-if test "$enable_alsa" != "no"; then
-       AC_CHECK_LIB(asound, snd_ctl_open,alsalib=yes,alsalib=no)
-       AC_CHECK_HEADERS(sys/asoundlib.h,alsaheader=yes,alsaheader=no)
-
-       if test "$alsalib" = "yes"; then
-               if test "$alsaheader" = "yes"; then
-                       AC_DEFINE(USE_ALSA)
-                       using_alsa=yes;
-               else 
-                       if test "$enable_alsa" = "yes"; then
-                               AC_MSG_ERROR([** Coulnd't find ALSA header file sys/asoundlib.h **])
-                       fi
-               fi
-       else
-               if test "$enable_alsa" = "yes"; then
-                       AC_MSG_ERROR([** Coulnd'f find ALSA library libasound. **])
-               fi
-       fi
-fi
+dnl if test "$enable_alsa" != "no"; then
+dnl    AC_CHECK_LIB(asound, snd_ctl_open,alsalib=yes,alsalib=no)
+dnl    AC_CHECK_HEADERS(sys/asoundlib.h,alsaheader=yes,alsaheader=no)
+dnl
+dnl    if test "$alsalib" = "yes"; then
+dnl            if test "$alsaheader" = "yes"; then
+dnl                    AC_DEFINE(USE_ALSA)
+dnl                    using_alsa=yes;
+dnl            else 
+dnl                    if test "$enable_alsa" = "yes"; then
+dnl                            AC_MSG_ERROR([** Coulnd't find ALSA header file sys/asoundlib.h **])
+dnl                    fi
+dnl            fi
+dnl    else
+dnl            if test "$enable_alsa" = "yes"; then
+dnl                    AC_MSG_ERROR([** Coulnd'f find ALSA library libasound. **])
+dnl            fi
+dnl    fi
+dnl fi
 
 if test "$enable_oss" != "no"; then
        AC_CHECK_HEADERS(sys/ioctl.h sys/soundcard.h,oss=yes,oss=no)
@@ -114,9 +122,9 @@ if test "$enable_oss" != "no"; then
        fi
 fi
 
-if test "$using_alsa" = "yes"; then
-       AC_MSG_RESULT([termnatorX audiodevice: using ALSA.])
-fi
+dnl if test "$using_alsa" = "yes"; then
+dnl    AC_MSG_RESULT([termnatorX audiodevice: using ALSA.])
+dnl fi
 
 if test "$using_oss" = "yes"; then
        AC_MSG_RESULT([termnatorX audiodevice: using OSS.])