comparison configure.ac @ 3308:34cfe24248f6

[xemacs-hg @ 2006-03-27 17:40:45 by james] Add support for sound using the ALSA library. See xemacs-patches message with ID <m3slp77hui.fsf@jerrypc.cs.usu.edu>.
author james
date Mon, 27 Mar 2006 17:40:59 +0000
parents d674024a8674
children ad7894a4ab41
comparison
equal deleted inserted replaced
3307:d81b1754aab1 3308:34cfe24248f6
789 [], []) 789 [], [])
790 dnl 790 dnl
791 XE_HELP_SUBSECTION([Sound options]) 791 XE_HELP_SUBSECTION([Sound options])
792 XE_COMPLEX_ARG([sound], 792 XE_COMPLEX_ARG([sound],
793 AC_HELP_STRING([--enable-sound=TYPE],[Compile with sound support. 793 AC_HELP_STRING([--enable-sound=TYPE],[Compile with sound support.
794 Valid types are `native', `nas' and `esd'. 794 Valid types are `native', `alsa', `nas' and `esd'.
795 Prefix a type with 'no' to disable. 795 Prefix a type with 'no' to disable.
796 The first type can be `none' or `all'. `none' means 796 The first type can be `none' or `all'. `none' means
797 `nonative,nonas,noesd'. `all' means `native,nas,esd'. 797 `nonative,noalsa,nonas,noesd'. `all' means
798 Later options override earlier ones for the same TYPE. 798 `native,alsa,nas,esd'. Later options override earlier
799 The default is to autodetect all sound support except 799 ones for the same TYPE. The default is to autodetect
800 for ESD which defaults to off.]), 800 all sound support except for ESD which defaults to
801 off.]),
801 [], 802 [],
802 [enable_sound_nas=""], 803 [enable_sound_nas=""],
803 [XE_COMPLEX_OPTION([native],[""]), 804 [XE_COMPLEX_OPTION([native],[""]),
805 XE_COMPLEX_OPTION([alsa],[""]),
804 XE_COMPLEX_OPTION([nas],[""]), 806 XE_COMPLEX_OPTION([nas],[""]),
805 XE_COMPLEX_OPTION([esd],[no])]) 807 XE_COMPLEX_OPTION([esd],[no])])
806 XE_MERGED_ARG([native-sound-lib], 808 XE_MERGED_ARG([native-sound-lib],
807 AC_HELP_STRING([--with-native-sound-lib],[Path to sound library (for systems with name conflicts).]), 809 AC_HELP_STRING([--with-native-sound-lib],[Path to sound library (for systems with name conflicts).]),
808 [], []) 810 [], [])
5004 5006
5005 dnl Check for nlist.h 5007 dnl Check for nlist.h
5006 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), ) 5008 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), )
5007 5009
5008 dnl Check for sound of various sorts. 5010 dnl Check for sound of various sorts.
5011 AC_CHECKING([for sound support])
5009 5012
5010 dnl Autodetect native sound 5013 dnl Autodetect native sound
5011 AC_CHECKING([for sound support])
5012 test -n "$with_native_sound_lib" && enable_sound_native=yes 5014 test -n "$with_native_sound_lib" && enable_sound_native=yes
5013 5015
5014 if test "$enable_sound_native" != "no"; then 5016 if test "$enable_sound_native" != "no"; then
5015 dnl Maybe sound is already on include path... 5017 dnl Maybe sound is already on include path...
5016 if test -n "$with_native_sound_lib"; then 5018 if test -n "$with_native_sound_lib"; then
5123 fi 5125 fi
5124 5126
5125 if test "$enable_sound_native" = "yes"; then 5127 if test "$enable_sound_native" = "yes"; then
5126 AC_DEFINE(HAVE_NATIVE_SOUND) 5128 AC_DEFINE(HAVE_NATIVE_SOUND)
5127 test -n "$with_native_sound_lib" && XE_PREPEND($with_native_sound_lib, LIBS) 5129 test -n "$with_native_sound_lib" && XE_PREPEND($with_native_sound_lib, LIBS)
5130 fi
5131
5132 dnl ALSA sound support
5133 if test "$enable_sound_alsa" != "no"; then
5134 AC_CHECK_HEADER([alsa/pcm.h], [
5135 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_sound=yes)])
5136 if test "$have_alsa_sound" = "yes"; then
5137 enable_sound_alsa=yes
5138 AC_DEFINE(HAVE_ALSA_SOUND)
5139 XE_ADD_OBJS(alsaplay.o)
5140 XE_PREPEND(-lasound, LIBS)
5141 else
5142 test "$enable_sound_alsa" = "yes" && \
5143 XE_DIE("Required ALSA sound support cannot be provided.")
5144 enable_sound_alsa=no
5145 fi
5128 fi 5146 fi
5129 5147
5130 dnl NAS Sound support 5148 dnl NAS Sound support
5131 if test "$enable_sound_nas" != "no"; then 5149 if test "$enable_sound_nas" != "no"; then
5132 AC_CHECK_HEADER(audio/audiolib.h, [ 5150 AC_CHECK_HEADER(audio/audiolib.h, [
6051 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." 6069 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
6052 6070
6053 echo " 6071 echo "
6054 Sound:" 6072 Sound:"
6055 test "$enable_sound_native" = yes && echo " Compiling in support for sound (native)." 6073 test "$enable_sound_native" = yes && echo " Compiling in support for sound (native)."
6074 test "$enable_sound_alsa" = yes && echo " Compiling in support for ALSA (Advanced Linux Sound Architecture)."
6056 test "$enable_sound_nas" = yes && echo " Compiling in support for NAS (network audio system)." 6075 test "$enable_sound_nas" = yes && echo " Compiling in support for NAS (network audio system)."
6057 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously." 6076 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously."
6058 test "$enable_sound_esd" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)." 6077 test "$enable_sound_esd" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)."
6059 6078
6060 echo " 6079 echo "