Mercurial > hg > xemacs-beta
comparison configure @ 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 |
---|---|
1088 | 1088 |
1089 Sound options | 1089 Sound options |
1090 ------------- | 1090 ------------- |
1091 | 1091 |
1092 --with-sound=TYPE Compile with sound support. Valid types are | 1092 --with-sound=TYPE Compile with sound support. Valid types are |
1093 `native', `nas' and `esd'. Prefix a type with 'no' | 1093 `native', `alsa', `nas' and `esd'. Prefix a type |
1094 to disable. The first type can be `none' or `all'. | 1094 with 'no' to disable. The first type can be `none' |
1095 `none' means `nonative,nonas,noesd'. `all' means | 1095 or `all'. `none' means |
1096 `native,nas,esd'. Later options override earlier | 1096 `nonative,noalsa,nonas,noesd'. `all' means |
1097 ones for the same TYPE. The default is to autodetect | 1097 `native,alsa,nas,esd'. Later options override |
1098 all sound support except for ESD which defaults to | 1098 earlier ones for the same TYPE. The default is to |
1099 off. | 1099 autodetect all sound support except for ESD which |
1100 defaults to off. | |
1100 --with-native-sound-lib Path to sound library (for systems with name | 1101 --with-native-sound-lib Path to sound library (for systems with name |
1101 conflicts). | 1102 conflicts). |
1102 | 1103 |
1103 Internationalization options | 1104 Internationalization options |
1104 ---------------------------- | 1105 ---------------------------- |
2924 | 2925 |
2925 fi; | 2926 fi; |
2926 | 2927 |
2927 _sound_notfirst="" | 2928 _sound_notfirst="" |
2928 _sound_native_default="" | 2929 _sound_native_default="" |
2930 _sound_alsa_default="" | |
2929 _sound_nas_default="" | 2931 _sound_nas_default="" |
2930 _sound_esd_default=no | 2932 _sound_esd_default=no |
2931 _sound_types="native nas esd" | 2933 _sound_types="native alsa nas esd" |
2932 _sound_default="native,nas,noesd" | 2934 _sound_default="native,alsa,nas,noesd" |
2933 | 2935 |
2934 # If --with-sound or --without-sound were given then copy the value to the | 2936 # If --with-sound or --without-sound were given then copy the value to the |
2935 # equivalent enable_sound variable. | 2937 # equivalent enable_sound variable. |
2936 if test "${with_sound+set}" = set; then | 2938 if test "${with_sound+set}" = set; then |
2937 enable_sound="$with_sound" | 2939 enable_sound="$with_sound" |
34966 | 34968 |
34967 fi | 34969 fi |
34968 | 34970 |
34969 | 34971 |
34970 | 34972 |
34971 | |
34972 { echo "$as_me:$LINENO: checking for sound support..." >&5 | 34973 { echo "$as_me:$LINENO: checking for sound support..." >&5 |
34973 echo "$as_me: checking for sound support..." >&6;} | 34974 echo "$as_me: checking for sound support..." >&6;} |
34975 | |
34974 test -n "$with_native_sound_lib" && enable_sound_native=yes | 34976 test -n "$with_native_sound_lib" && enable_sound_native=yes |
34975 | 34977 |
34976 if test "$enable_sound_native" != "no"; then | 34978 if test "$enable_sound_native" != "no"; then |
34977 if test -n "$with_native_sound_lib"; then | 34979 if test -n "$with_native_sound_lib"; then |
34978 if test "${ac_cv_header_multimedia_audio_device_h+set}" = set; then | 34980 if test "${ac_cv_header_multimedia_audio_device_h+set}" = set; then |
35579 _ACEOF | 35581 _ACEOF |
35580 | 35582 |
35581 test -n "$with_native_sound_lib" && LIBS="$with_native_sound_lib $LIBS" && if test "$verbose" = "yes"; then echo " Prepending \"$with_native_sound_lib\" to \$LIBS"; fi | 35583 test -n "$with_native_sound_lib" && LIBS="$with_native_sound_lib $LIBS" && if test "$verbose" = "yes"; then echo " Prepending \"$with_native_sound_lib\" to \$LIBS"; fi |
35582 fi | 35584 fi |
35583 | 35585 |
35586 if test "$enable_sound_alsa" != "no"; then | |
35587 if test "${ac_cv_header_alsa_pcm_h+set}" = set; then | |
35588 echo "$as_me:$LINENO: checking for alsa/pcm.h" >&5 | |
35589 echo $ECHO_N "checking for alsa/pcm.h... $ECHO_C" >&6 | |
35590 if test "${ac_cv_header_alsa_pcm_h+set}" = set; then | |
35591 echo $ECHO_N "(cached) $ECHO_C" >&6 | |
35592 fi | |
35593 echo "$as_me:$LINENO: result: $ac_cv_header_alsa_pcm_h" >&5 | |
35594 echo "${ECHO_T}$ac_cv_header_alsa_pcm_h" >&6 | |
35595 else | |
35596 # Is the header compilable? | |
35597 echo "$as_me:$LINENO: checking alsa/pcm.h usability" >&5 | |
35598 echo $ECHO_N "checking alsa/pcm.h usability... $ECHO_C" >&6 | |
35599 cat >conftest.$ac_ext <<_ACEOF | |
35600 /* confdefs.h. */ | |
35601 _ACEOF | |
35602 cat confdefs.h >>conftest.$ac_ext | |
35603 cat >>conftest.$ac_ext <<_ACEOF | |
35604 /* end confdefs.h. */ | |
35605 $ac_includes_default | |
35606 #include <alsa/pcm.h> | |
35607 _ACEOF | |
35608 rm -f conftest.$ac_objext | |
35609 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
35610 (eval $ac_compile) 2>conftest.er1 | |
35611 ac_status=$? | |
35612 grep -v '^ *+' conftest.er1 >conftest.err | |
35613 rm -f conftest.er1 | |
35614 cat conftest.err >&5 | |
35615 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35616 (exit $ac_status); } && | |
35617 { ac_try='test -z "$ac_c_werror_flag" | |
35618 || test ! -s conftest.err' | |
35619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
35620 (eval $ac_try) 2>&5 | |
35621 ac_status=$? | |
35622 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35623 (exit $ac_status); }; } && | |
35624 { ac_try='test -s conftest.$ac_objext' | |
35625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
35626 (eval $ac_try) 2>&5 | |
35627 ac_status=$? | |
35628 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35629 (exit $ac_status); }; }; then | |
35630 ac_header_compiler=yes | |
35631 else | |
35632 echo "$as_me: failed program was:" >&5 | |
35633 sed 's/^/| /' conftest.$ac_ext >&5 | |
35634 | |
35635 ac_header_compiler=no | |
35636 fi | |
35637 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
35638 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
35639 echo "${ECHO_T}$ac_header_compiler" >&6 | |
35640 | |
35641 # Is the header present? | |
35642 echo "$as_me:$LINENO: checking alsa/pcm.h presence" >&5 | |
35643 echo $ECHO_N "checking alsa/pcm.h presence... $ECHO_C" >&6 | |
35644 cat >conftest.$ac_ext <<_ACEOF | |
35645 /* confdefs.h. */ | |
35646 _ACEOF | |
35647 cat confdefs.h >>conftest.$ac_ext | |
35648 cat >>conftest.$ac_ext <<_ACEOF | |
35649 /* end confdefs.h. */ | |
35650 #include <alsa/pcm.h> | |
35651 _ACEOF | |
35652 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
35653 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
35654 ac_status=$? | |
35655 grep -v '^ *+' conftest.er1 >conftest.err | |
35656 rm -f conftest.er1 | |
35657 cat conftest.err >&5 | |
35658 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35659 (exit $ac_status); } >/dev/null; then | |
35660 if test -s conftest.err; then | |
35661 ac_cpp_err=$ac_c_preproc_warn_flag | |
35662 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
35663 else | |
35664 ac_cpp_err= | |
35665 fi | |
35666 else | |
35667 ac_cpp_err=yes | |
35668 fi | |
35669 if test -z "$ac_cpp_err"; then | |
35670 ac_header_preproc=yes | |
35671 else | |
35672 echo "$as_me: failed program was:" >&5 | |
35673 sed 's/^/| /' conftest.$ac_ext >&5 | |
35674 | |
35675 ac_header_preproc=no | |
35676 fi | |
35677 rm -f conftest.err conftest.$ac_ext | |
35678 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
35679 echo "${ECHO_T}$ac_header_preproc" >&6 | |
35680 | |
35681 # So? What about this header? | |
35682 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
35683 yes:no: ) | |
35684 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: accepted by the compiler, rejected by the preprocessor!" >&5 | |
35685 echo "$as_me: WARNING: alsa/pcm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
35686 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: proceeding with the compiler's result" >&5 | |
35687 echo "$as_me: WARNING: alsa/pcm.h: proceeding with the compiler's result" >&2;} | |
35688 ac_header_preproc=yes | |
35689 ;; | |
35690 no:yes:* ) | |
35691 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: present but cannot be compiled" >&5 | |
35692 echo "$as_me: WARNING: alsa/pcm.h: present but cannot be compiled" >&2;} | |
35693 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: check for missing prerequisite headers?" >&5 | |
35694 echo "$as_me: WARNING: alsa/pcm.h: check for missing prerequisite headers?" >&2;} | |
35695 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: see the Autoconf documentation" >&5 | |
35696 echo "$as_me: WARNING: alsa/pcm.h: see the Autoconf documentation" >&2;} | |
35697 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: section \"Present But Cannot Be Compiled\"" >&5 | |
35698 echo "$as_me: WARNING: alsa/pcm.h: section \"Present But Cannot Be Compiled\"" >&2;} | |
35699 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: proceeding with the preprocessor's result" >&5 | |
35700 echo "$as_me: WARNING: alsa/pcm.h: proceeding with the preprocessor's result" >&2;} | |
35701 { echo "$as_me:$LINENO: WARNING: alsa/pcm.h: in the future, the compiler will take precedence" >&5 | |
35702 echo "$as_me: WARNING: alsa/pcm.h: in the future, the compiler will take precedence" >&2;} | |
35703 ( | |
35704 cat <<\_ASBOX | |
35705 ## ------------------------------------- ## | |
35706 ## Report this to xemacs-beta@xemacs.org ## | |
35707 ## ------------------------------------- ## | |
35708 _ASBOX | |
35709 ) | | |
35710 sed "s/^/$as_me: WARNING: /" >&2 | |
35711 ;; | |
35712 esac | |
35713 echo "$as_me:$LINENO: checking for alsa/pcm.h" >&5 | |
35714 echo $ECHO_N "checking for alsa/pcm.h... $ECHO_C" >&6 | |
35715 if test "${ac_cv_header_alsa_pcm_h+set}" = set; then | |
35716 echo $ECHO_N "(cached) $ECHO_C" >&6 | |
35717 else | |
35718 ac_cv_header_alsa_pcm_h=$ac_header_preproc | |
35719 fi | |
35720 echo "$as_me:$LINENO: result: $ac_cv_header_alsa_pcm_h" >&5 | |
35721 echo "${ECHO_T}$ac_cv_header_alsa_pcm_h" >&6 | |
35722 | |
35723 fi | |
35724 if test $ac_cv_header_alsa_pcm_h = yes; then | |
35725 | |
35726 echo "$as_me:$LINENO: checking for snd_pcm_open in -lasound" >&5 | |
35727 echo $ECHO_N "checking for snd_pcm_open in -lasound... $ECHO_C" >&6 | |
35728 if test "${ac_cv_lib_asound_snd_pcm_open+set}" = set; then | |
35729 echo $ECHO_N "(cached) $ECHO_C" >&6 | |
35730 else | |
35731 ac_check_lib_save_LIBS=$LIBS | |
35732 LIBS="-lasound $LIBS" | |
35733 cat >conftest.$ac_ext <<_ACEOF | |
35734 /* confdefs.h. */ | |
35735 _ACEOF | |
35736 cat confdefs.h >>conftest.$ac_ext | |
35737 cat >>conftest.$ac_ext <<_ACEOF | |
35738 /* end confdefs.h. */ | |
35739 | |
35740 /* Override any gcc2 internal prototype to avoid an error. */ | |
35741 #ifdef __cplusplus | |
35742 extern "C" | |
35743 #endif | |
35744 /* We use char because int might match the return type of a gcc2 | |
35745 builtin and then its argument prototype would still apply. */ | |
35746 char snd_pcm_open (); | |
35747 int | |
35748 main () | |
35749 { | |
35750 snd_pcm_open (); | |
35751 ; | |
35752 return 0; | |
35753 } | |
35754 _ACEOF | |
35755 rm -f conftest.$ac_objext conftest$ac_exeext | |
35756 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
35757 (eval $ac_link) 2>conftest.er1 | |
35758 ac_status=$? | |
35759 grep -v '^ *+' conftest.er1 >conftest.err | |
35760 rm -f conftest.er1 | |
35761 cat conftest.err >&5 | |
35762 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35763 (exit $ac_status); } && | |
35764 { ac_try='test -z "$ac_c_werror_flag" | |
35765 || test ! -s conftest.err' | |
35766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
35767 (eval $ac_try) 2>&5 | |
35768 ac_status=$? | |
35769 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35770 (exit $ac_status); }; } && | |
35771 { ac_try='test -s conftest$ac_exeext' | |
35772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
35773 (eval $ac_try) 2>&5 | |
35774 ac_status=$? | |
35775 echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
35776 (exit $ac_status); }; }; then | |
35777 ac_cv_lib_asound_snd_pcm_open=yes | |
35778 else | |
35779 echo "$as_me: failed program was:" >&5 | |
35780 sed 's/^/| /' conftest.$ac_ext >&5 | |
35781 | |
35782 ac_cv_lib_asound_snd_pcm_open=no | |
35783 fi | |
35784 rm -f conftest.err conftest.$ac_objext \ | |
35785 conftest$ac_exeext conftest.$ac_ext | |
35786 LIBS=$ac_check_lib_save_LIBS | |
35787 fi | |
35788 echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_pcm_open" >&5 | |
35789 echo "${ECHO_T}$ac_cv_lib_asound_snd_pcm_open" >&6 | |
35790 if test $ac_cv_lib_asound_snd_pcm_open = yes; then | |
35791 have_alsa_sound=yes | |
35792 fi | |
35793 | |
35794 fi | |
35795 | |
35796 | |
35797 if test "$have_alsa_sound" = "yes"; then | |
35798 enable_sound_alsa=yes | |
35799 cat >>confdefs.h <<\_ACEOF | |
35800 #define HAVE_ALSA_SOUND 1 | |
35801 _ACEOF | |
35802 | |
35803 extra_objs="$extra_objs alsaplay.o" && if test "$verbose" = "yes"; then | |
35804 echo " xemacs will be linked with \"alsaplay.o\"" | |
35805 fi | |
35806 LIBS="-lasound $LIBS" && if test "$verbose" = "yes"; then echo " Prepending \"-lasound\" to \$LIBS"; fi | |
35807 else | |
35808 test "$enable_sound_alsa" = "yes" && \ | |
35809 { echo "Error:" "Required ALSA sound support cannot be provided." >&2; exit 1; } | |
35810 enable_sound_alsa=no | |
35811 fi | |
35812 fi | |
35813 | |
35584 if test "$enable_sound_nas" != "no"; then | 35814 if test "$enable_sound_nas" != "no"; then |
35585 if test "${ac_cv_header_audio_audiolib_h+set}" = set; then | 35815 if test "${ac_cv_header_audio_audiolib_h+set}" = set; then |
35586 echo "$as_me:$LINENO: checking for audio/audiolib.h" >&5 | 35816 echo "$as_me:$LINENO: checking for audio/audiolib.h" >&5 |
35587 echo $ECHO_N "checking for audio/audiolib.h... $ECHO_C" >&6 | 35817 echo $ECHO_N "checking for audio/audiolib.h... $ECHO_C" >&6 |
35588 if test "${ac_cv_header_audio_audiolib_h+set}" = set; then | 35818 if test "${ac_cv_header_audio_audiolib_h+set}" = set; then |
39399 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." | 39629 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." |
39400 | 39630 |
39401 echo " | 39631 echo " |
39402 Sound:" | 39632 Sound:" |
39403 test "$enable_sound_native" = yes && echo " Compiling in support for sound (native)." | 39633 test "$enable_sound_native" = yes && echo " Compiling in support for sound (native)." |
39634 test "$enable_sound_alsa" = yes && echo " Compiling in support for ALSA (Advanced Linux Sound Architecture)." | |
39404 test "$enable_sound_nas" = yes && echo " Compiling in support for NAS (network audio system)." | 39635 test "$enable_sound_nas" = yes && echo " Compiling in support for NAS (network audio system)." |
39405 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously." | 39636 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously." |
39406 test "$enable_sound_esd" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)." | 39637 test "$enable_sound_esd" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)." |
39407 | 39638 |
39408 echo " | 39639 echo " |