+2004-04-13 URABE Shyouhei <shyouhei@ice.uec.ac.jp>
+
+ * autoconf/ao.m4: Add.
+ * configure.in: Change to use ao.m4
+ * autoconf/Makefile.am (EXTRA_DIST): ditto.
+
+2004-04-13 Iwata <b6330015@ipc.kit.jp>
+
+ * timidity/ao_a.c: Add.
+ * configure.in: Add libao support
+ * timidity/output.c: ditto.
+ * timidity/Makefile.am (EXTRA_timidity_SOURCES): ditto.
+ * timidity/timidity.c (parse_opt_h): ditto.
+
2004-04-12 Kentaro Sato <kentaro@ranvis.com>
* timidity/common.[ch], timidity/timidity.c:
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in autoconf/alsa.m4 autoconf/arts.m4 autoconf/esd.m4 autoconf/gtk.m4 autoconf/ogg.m4 autoconf/utils.m4 autoconf/vorbis.m4
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in autoconf/alsa.m4 autoconf/ao.m4 autoconf/arts.m4 autoconf/esd.m4 autoconf/gtk.m4 autoconf/ogg.m4 autoconf/utils.m4 autoconf/vorbis.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
)
])
+# ao.m4
+# Configure paths for libao
+# Jack Moffitt <jack@icecast.org> 10-21-2000
+# Shamelessly stolen from Owen Taylor and Manish Singh
+
+dnl XIPH_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for libao, and define AO_CFLAGS and AO_LIBS
+dnl
+AC_DEFUN(XIPH_PATH_AO,
+[dnl
+dnl Get the cflags and libraries
+dnl
+AC_ARG_WITH(ao,[ --with-ao=PFX Prefix where libao is installed (optional)], ao_prefix="$withval", ao_prefix="")
+AC_ARG_WITH(ao-libraries,[ --with-ao-libraries=DIR Directory where libao library is installed (optional)], ao_libraries="$withval", ao_libraries="")
+AC_ARG_WITH(ao-includes,[ --with-ao-includes=DIR Directory where libao header files are installed (optional)], ao_includes="$withval", ao_includes="")
+AC_ARG_ENABLE(aotest, [ --disable-aotest Do not try to compile and run a test ao program],, enable_aotest=yes)
+
+
+ if test "x$ao_libraries" != "x" ; then
+ AO_LIBS="-L$ao_libraries"
+ elif test "x$ao_prefix" != "x"; then
+ AO_LIBS="-L$ao_prefix/lib"
+ elif test "x$prefix" != "xNONE"; then
+ AO_LIBS="-L$prefix/lib"
+ fi
+
+ if test "x$ao_includes" != "x" ; then
+ AO_CFLAGS="-I$ao_includes"
+ elif test "x$ao_prefix" != "x"; then
+ AO_CFLAGS="-I$ao_prefix/include"
+ elif test "x$prefix" != "xNONE"; then
+ AO_CFLAGS="-I$prefix/include"
+ fi
+
+ # see where dl* and friends live
+ AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
+ AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
+ AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
+ your system may not be supported.])
+ ])
+ ])
+
+ AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
+
+ AC_MSG_CHECKING(for ao)
+ no_ao=""
+
+
+ if test "x$enable_aotest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $AO_CFLAGS"
+ LIBS="$LIBS $AO_LIBS"
+dnl
+dnl Now check if the installed ao is sufficiently new.
+dnl
+ rm -f conf.aotest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ao/ao.h>
+
+int main ()
+{
+ system("touch conf.aotest");
+ return 0;
+}
+
+],, no_ao=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ if test "x$no_ao" = "x" ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$1], , :, [$1])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.aotest ; then
+ :
+ else
+ echo "*** Could not run ao test program, checking why..."
+ CFLAGS="$CFLAGS $AO_CFLAGS"
+ LIBS="$LIBS $AO_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <ao/ao.h>
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding ao or finding the wrong"
+ echo "*** version of ao. If it is not finding ao, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means ao was incorrectly installed"
+ echo "*** or that you have moved ao since it was installed." ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ AO_CFLAGS=""
+ AO_LIBS=""
+ ifelse([$2], , :, [$2])
+ fi
+ AC_SUBST(AO_CFLAGS)
+ AC_SUBST(AO_LIBS)
+ rm -f conf.aotest
+])
+
# Configure paths for libogg
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
EXTRA_DIST = \
alsa.m4 \
+ ao.m4 \
arts.m4 \
esd.m4 \
gtk.m4 \
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
EXTRA_DIST = \
alsa.m4 \
+ ao.m4 \
arts.m4 \
esd.m4 \
gtk.m4 \
--- /dev/null
+# ao.m4
+# Configure paths for libao
+# Jack Moffitt <jack@icecast.org> 10-21-2000
+# Shamelessly stolen from Owen Taylor and Manish Singh
+
+dnl XIPH_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for libao, and define AO_CFLAGS and AO_LIBS
+dnl
+AC_DEFUN(XIPH_PATH_AO,
+[dnl
+dnl Get the cflags and libraries
+dnl
+AC_ARG_WITH(ao,[ --with-ao=PFX Prefix where libao is installed (optional)], ao_prefix="$withval", ao_prefix="")
+AC_ARG_WITH(ao-libraries,[ --with-ao-libraries=DIR Directory where libao library is installed (optional)], ao_libraries="$withval", ao_libraries="")
+AC_ARG_WITH(ao-includes,[ --with-ao-includes=DIR Directory where libao header files are installed (optional)], ao_includes="$withval", ao_includes="")
+AC_ARG_ENABLE(aotest, [ --disable-aotest Do not try to compile and run a test ao program],, enable_aotest=yes)
+
+
+ if test "x$ao_libraries" != "x" ; then
+ AO_LIBS="-L$ao_libraries"
+ elif test "x$ao_prefix" != "x"; then
+ AO_LIBS="-L$ao_prefix/lib"
+ elif test "x$prefix" != "xNONE"; then
+ AO_LIBS="-L$prefix/lib"
+ fi
+
+ if test "x$ao_includes" != "x" ; then
+ AO_CFLAGS="-I$ao_includes"
+ elif test "x$ao_prefix" != "x"; then
+ AO_CFLAGS="-I$ao_prefix/include"
+ elif test "x$prefix" != "xNONE"; then
+ AO_CFLAGS="-I$prefix/include"
+ fi
+
+ # see where dl* and friends live
+ AC_CHECK_FUNCS(dlopen, [AO_DL_LIBS=""], [
+ AC_CHECK_LIB(dl, dlopen, [AO_DL_LIBS="-ldl"], [
+ AC_MSG_WARN([could not find dlopen() needed by libao sound drivers
+ your system may not be supported.])
+ ])
+ ])
+
+ AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
+
+ AC_MSG_CHECKING(for ao)
+ no_ao=""
+
+
+ if test "x$enable_aotest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $AO_CFLAGS"
+ LIBS="$LIBS $AO_LIBS"
+dnl
+dnl Now check if the installed ao is sufficiently new.
+dnl
+ rm -f conf.aotest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ao/ao.h>
+
+int main ()
+{
+ system("touch conf.aotest");
+ return 0;
+}
+
+],, no_ao=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ if test "x$no_ao" = "x" ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$1], , :, [$1])
+ else
+ AC_MSG_RESULT(no)
+ if test -f conf.aotest ; then
+ :
+ else
+ echo "*** Could not run ao test program, checking why..."
+ CFLAGS="$CFLAGS $AO_CFLAGS"
+ LIBS="$LIBS $AO_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <ao/ao.h>
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding ao or finding the wrong"
+ echo "*** version of ao. If it is not finding ao, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means ao was incorrectly installed"
+ echo "*** or that you have moved ao since it was installed." ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ AO_CFLAGS=""
+ AO_LIBS=""
+ ifelse([$2], , :, [$2])
+ fi
+ AC_SUBST(AO_CFLAGS)
+ AC_SUBST(AO_LIBS)
+ rm -f conf.aotest
+])
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define to 1 if you have the `dlopen' function. */
+#undef HAVE_DLOPEN
+
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT EMACS lispdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP RANLIB ac_ct_RANLIB LN_S X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS NEEDGETOPT_TRUE NEEDGETOPT_FALSE ALSA_CFLAGS ALSA_LIBS ARTS_CONFIG ARTS_CFLAGS ARTS_LIBS ESD_CONFIG ESD_CFLAGS ESD_LIBS VORBIS_CFLAGS VORBIS_LIBS VORBISFILE_LIBS VORBISENC_LIBS OGG_CFLAGS OGG_LIBS NEEDDLOPEN_TRUE NEEDDLOPEN_FALSE ENABLE_NCURSES_TRUE ENABLE_NCURSES_FALSE n_so_libs ENABLE_SLANG_TRUE ENABLE_SLANG_FALSE s_so_libs ENABLE_MOTIF_TRUE ENABLE_MOTIF_FALSE m_so_libs ENABLE_TCLTK_TRUE ENABLE_TCLTK_FALSE k_so_libs ENABLE_DYNAMIC_TCLTK_TRUE ENABLE_DYNAMIC_TCLTK_FALSE ENABLE_EMACS_TRUE ENABLE_EMACS_FALSE e_so_libs ENABLE_VT100_TRUE ENABLE_VT100_FALSE T_so_libs ENABLE_XAW_TRUE ENABLE_XAW_FALSE a_so_libs ENABLE_DYNAMIC_XAW_TRUE ENABLE_DYNAMIC_XAW_FALSE ENABLE_XSKIN_TRUE ENABLE_XSKIN_FALSE i_so_libs ENABLE_GTK_TRUE ENABLE_GTK_FALSE GTK_CONFIG GTK_CFLAGS GTK_LIBS g_so_libs ENABLE_SERVER_TRUE ENABLE_SERVER_FALSE r_so_libs ENABLE_ALSASEQ_TRUE ENABLE_ALSASEQ_FALSE A_so_libs ENABLE_WINSYN_TRUE ENABLE_WINSYN_FALSE W_so_libs ENABLE_PORTMIDISYN_TRUE ENABLE_PORTMIDISYN_FALSE P_so_libs ENABLE_W32G_SYN_TRUE ENABLE_W32G_SYN_FALSE ENABLE_W32GUI_TRUE ENABLE_W32GUI_FALSE w_so_libs ENABLE_PLUGIN_TRUE ENABLE_PLUGIN_FALSE p_so_libs ENABLE_NETWORK_TRUE ENABLE_NETWORK_FALSE ENABLE_SOUND_SPEC_TRUE ENABLE_SOUND_SPEC_FALSE ENABLE_WRD_TRUE ENABLE_WRD_FALSE CYGNUS_TRUE CYGNUS_FALSE MINGW_TRUE MINGW_FALSE W32READDIR_TRUE W32READDIR_FALSE timidity_LDFLAGS SYSEXTRAS EXTRALIBS NETSRCS ELFILES SHLD SHCFLAGS dynamic_targets so WISH tcltk_dep INTERFACE_SRCS pkgdatadir pkglibdir LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT EMACS lispdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP RANLIB ac_ct_RANLIB LN_S X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBOBJS NEEDGETOPT_TRUE NEEDGETOPT_FALSE ALSA_CFLAGS ALSA_LIBS ARTS_CONFIG ARTS_CFLAGS ARTS_LIBS ESD_CONFIG ESD_CFLAGS ESD_LIBS AO_CFLAGS AO_LIBS VORBIS_CFLAGS VORBIS_LIBS VORBISFILE_LIBS VORBISENC_LIBS OGG_CFLAGS OGG_LIBS NEEDDLOPEN_TRUE NEEDDLOPEN_FALSE ENABLE_NCURSES_TRUE ENABLE_NCURSES_FALSE n_so_libs ENABLE_SLANG_TRUE ENABLE_SLANG_FALSE s_so_libs ENABLE_MOTIF_TRUE ENABLE_MOTIF_FALSE m_so_libs ENABLE_TCLTK_TRUE ENABLE_TCLTK_FALSE k_so_libs ENABLE_DYNAMIC_TCLTK_TRUE ENABLE_DYNAMIC_TCLTK_FALSE ENABLE_EMACS_TRUE ENABLE_EMACS_FALSE e_so_libs ENABLE_VT100_TRUE ENABLE_VT100_FALSE T_so_libs ENABLE_XAW_TRUE ENABLE_XAW_FALSE a_so_libs ENABLE_DYNAMIC_XAW_TRUE ENABLE_DYNAMIC_XAW_FALSE ENABLE_XSKIN_TRUE ENABLE_XSKIN_FALSE i_so_libs ENABLE_GTK_TRUE ENABLE_GTK_FALSE GTK_CONFIG GTK_CFLAGS GTK_LIBS g_so_libs ENABLE_SERVER_TRUE ENABLE_SERVER_FALSE r_so_libs ENABLE_ALSASEQ_TRUE ENABLE_ALSASEQ_FALSE A_so_libs ENABLE_WINSYN_TRUE ENABLE_WINSYN_FALSE W_so_libs ENABLE_PORTMIDISYN_TRUE ENABLE_PORTMIDISYN_FALSE P_so_libs ENABLE_W32G_SYN_TRUE ENABLE_W32G_SYN_FALSE ENABLE_W32GUI_TRUE ENABLE_W32GUI_FALSE w_so_libs ENABLE_PLUGIN_TRUE ENABLE_PLUGIN_FALSE p_so_libs ENABLE_NETWORK_TRUE ENABLE_NETWORK_FALSE ENABLE_SOUND_SPEC_TRUE ENABLE_SOUND_SPEC_FALSE ENABLE_WRD_TRUE ENABLE_WRD_FALSE CYGNUS_TRUE CYGNUS_FALSE MINGW_TRUE MINGW_FALSE W32READDIR_TRUE W32READDIR_FALSE timidity_LDFLAGS SYSEXTRAS EXTRALIBS NETSRCS ELFILES SHLD SHCFLAGS dynamic_targets so WISH tcltk_dep INTERFACE_SRCS pkgdatadir pkglibdir LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
esd: EsounD - Enlightened Sound Daemon
portaudio: PortAudio
jack: JACK
+ ao: Libao
vorbis: Ogg Vorbis
gogo: MP3 GOGO (Only Windows is supported)
--disable-alsatest Do not try to compile and run a test Alsa program
--disable-artstest Do not try to compile and run a test ARTS program
--disable-esdtest Do not try to compile and run a test ESD program
+ --disable-aotest Do not try to compile and run a test ao program
--disable-oggtest Do not try to compile and run a test Ogg program
--disable-vorbistest Do not try to compile and run a test Vorbis program
--enable-interface=interface_list
--with-default-output=<mode> Specify default output mode (optional):
(default|alsa|alib|arts|nas|
esd|wav|au|aiff|list|vorbis|
- gogo|portaudio|jack)
+ gogo|portaudio|jack|ao)
--with-alsa-prefix=PFX Prefix where Alsa library is installed(optional)
--with-alsa-inc-prefix=PFX Prefix where include libraries are (optional)
--with-arts-prefix=PFX Prefix where ARTS is installed (optional)
--with-esd-prefix=PFX Prefix where ESD is installed (optional)
--with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)
+ --with-ao=PFX Prefix where libao is installed (optional)
+ --with-ao-libraries=DIR Directory where libao library is installed (optional)
+ --with-ao-includes=DIR Directory where libao header files are installed (optional)
--with-ogg=PFX Prefix where libogg is installed (optional)
--with-ogg-libraries=DIR Directory where libogg library is installed (optional)
--with-ogg-includes=DIR Directory where libogg header files are installed (optional)
# audio section
#
-audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts esd vorbis gogo portaudio jack'
+audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts esd vorbis gogo portaudio jack ao'
# Check whether --with-nas-library or --without-nas-library was given.
echo "${ECHO_T}no" >&6
fi
+echo "$as_me:$LINENO: checking enable_audio=ao" >&5
+echo $ECHO_N "checking enable_audio=ao... $ECHO_C" >&6
+if test "x$au_enable_ao" = xyes; then
+ echo "$as_me:$LINENO: result: yes, configuring alsa" >&5
+echo "${ECHO_T}yes, configuring alsa" >&6
+ KEEPCFLAGS=$CFLAGS
+ KEEPLIBS=$LIBS
+ KEEPLDFLAGS=$LDFLAGS
+
+# Check whether --with-ao or --without-ao was given.
+if test "${with_ao+set}" = set; then
+ withval="$with_ao"
+ ao_prefix="$withval"
+else
+ ao_prefix=""
+fi;
+
+# Check whether --with-ao-libraries or --without-ao-libraries was given.
+if test "${with_ao_libraries+set}" = set; then
+ withval="$with_ao_libraries"
+ ao_libraries="$withval"
+else
+ ao_libraries=""
+fi;
+
+# Check whether --with-ao-includes or --without-ao-includes was given.
+if test "${with_ao_includes+set}" = set; then
+ withval="$with_ao_includes"
+ ao_includes="$withval"
+else
+ ao_includes=""
+fi;
+# Check whether --enable-aotest or --disable-aotest was given.
+if test "${enable_aotest+set}" = set; then
+ enableval="$enable_aotest"
+
+else
+ enable_aotest=yes
+fi;
+
+
+ if test "x$ao_libraries" != "x" ; then
+ AO_LIBS="-L$ao_libraries"
+ elif test "x$ao_prefix" != "x"; then
+ AO_LIBS="-L$ao_prefix/lib"
+ elif test "x$prefix" != "xNONE"; then
+ AO_LIBS="-L$prefix/lib"
+ fi
+
+ if test "x$ao_includes" != "x" ; then
+ AO_CFLAGS="-I$ao_includes"
+ elif test "x$ao_prefix" != "x"; then
+ AO_CFLAGS="-I$ao_prefix/include"
+ elif test "x$prefix" != "xNONE"; then
+ AO_CFLAGS="-I$prefix/include"
+ fi
+
+ # see where dl* and friends live
+
+for ac_func in dlopen
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ AO_DL_LIBS=""
+else
+
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ AO_DL_LIBS="-ldl"
+else
+
+ { echo "$as_me:$LINENO: WARNING: could not find dlopen() needed by libao sound drivers
+ your system may not be supported." >&5
+echo "$as_me: WARNING: could not find dlopen() needed by libao sound drivers
+ your system may not be supported." >&2;}
+
+fi
+
+
+fi
+done
+
+
+ AO_LIBS="$AO_LIBS -lao $AO_DL_LIBS"
+
+ echo "$as_me:$LINENO: checking for ao" >&5
+echo $ECHO_N "checking for ao... $ECHO_C" >&6
+ no_ao=""
+
+
+ if test "x$enable_aotest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $AO_CFLAGS"
+ LIBS="$LIBS $AO_LIBS"
+ rm -f conf.aotest
+ if test "$cross_compiling" = yes; then
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ao/ao.h>
+
+int main ()
+{
+ system("touch conf.aotest");
+ return 0;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+no_ao=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+
+ if test "x$no_ao" = "x" ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ :
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ if test -f conf.aotest ; then
+ :
+ else
+ echo "*** Could not run ao test program, checking why..."
+ CFLAGS="$CFLAGS $AO_CFLAGS"
+ LIBS="$LIBS $AO_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <ao/ao.h>
+
+int
+main ()
+{
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding ao or finding the wrong"
+ echo "*** version of ao. If it is not finding ao, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means ao was incorrectly installed"
+ echo "*** or that you have moved ao since it was installed."
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ AO_CFLAGS=""
+ AO_LIBS=""
+ :
+ fi
+
+
+ rm -f conf.aotest
+
+ if test "x$no_ao" = "x" ; then
+ EXTRADEFS="$EXTRADEFS -DAU_AO"
+ SYSEXTRAS="$SYSEXTRAS ao_a.c"
+ for f in $AO_CFLAGS; do
+ case ".$f" in
+ .-I?*|.-D?*) CPPFLAGS="$CPPFLAGS $f" ;;
+ *) CFLAGS="$CPPFLAGS $f" ;;
+ esac
+done
+
+ LIBS="$KEEPLIBS $AO_LIBS"
+
+for ac_func in snd_seq_port_info_set_timestamping
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+ { echo "$as_me:$LINENO: WARNING: Couldn't configure libao." >&5
+echo "$as_me: WARNING: Couldn't configure libao." >&2;}
+ CFLAGS=$KEEPCFLAGS
+ LIBS=$KEEPLIBS
+ LDFLAGS=$KEEPLDFLAGS
+ fi
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
echo "$as_me:$LINENO: checking enable_audio=vorbis" >&5
echo $ECHO_N "checking enable_audio=vorbis... $ECHO_C" >&6
if test "x$au_enable_vorbis" = xyes; then
s,@ESD_CONFIG@,$ESD_CONFIG,;t t
s,@ESD_CFLAGS@,$ESD_CFLAGS,;t t
s,@ESD_LIBS@,$ESD_LIBS,;t t
+s,@AO_CFLAGS@,$AO_CFLAGS,;t t
+s,@AO_LIBS@,$AO_LIBS,;t t
s,@VORBIS_CFLAGS@,$VORBIS_CFLAGS,;t t
s,@VORBIS_LIBS@,$VORBIS_LIBS,;t t
s,@VORBISFILE_LIBS@,$VORBISFILE_LIBS,;t t
dnl vorbis(v): Ogg Vorbis
dnl gogo(g): MP3 GOGO
dnl jack(j): JACK
+dnl ao(O): Libao
-audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts esd vorbis gogo portaudio jack'
+audio_targets='default oss alsa sun hpux irix mme sb_dsp w32 alib nas arts esd vorbis gogo portaudio jack ao'
AC_ARG_WITH(nas-library,
[ --with-nas-library=library NAS absolute library path(Don't use -laudio)])
esd: EsounD - Enlightened Sound Daemon
portaudio: PortAudio
jack: JACK
+ ao: Libao
vorbis: Ogg Vorbis
gogo: MP3 GOGO (Only Windows is supported)],
[ enable_audio=$enableval
[ --with-default-output=<mode> Specify default output mode (optional):
(default|alsa|alib|arts|nas|
esd|wav|au|aiff|list|vorbis|
- gogo|portaudio|jack)],
+ gogo|portaudio|jack|ao)],
[ if test "$enable_audio" != no; then
DEFAULT_PLAYMODE=$withval
eval "au_enable_$DEFAULT_PLAYMODE=yes"
AC_MSG_RESULT(no)
fi
+dnl AO
+AC_MSG_CHECKING(enable_audio=ao)
+if test "x$au_enable_ao" = xyes; then
+ AC_MSG_RESULT([yes, configuring alsa])
+ KEEPCFLAGS=$CFLAGS
+ KEEPLIBS=$LIBS
+ KEEPLDFLAGS=$LDFLAGS
+ XIPH_PATH_AO()
+ if test "x$no_ao" = "x" ; then
+ dnl AC_MSG_RESULT(yes)
+ EXTRADEFS="$EXTRADEFS -DAU_AO"
+ SYSEXTRAS="$SYSEXTRAS ao_a.c"
+ EXTRACT_CPPFLAGS(CPPFLAGS,CFLAGS,$AO_CFLAGS)
+ LIBS="$KEEPLIBS $AO_LIBS"
+ AC_CHECK_FUNCS(snd_seq_port_info_set_timestamping)
+ else
+ AC_MSG_WARN(Couldn't configure libao.)
+ CFLAGS=$KEEPCFLAGS
+ LIBS=$KEEPLIBS
+ LDFLAGS=$KEEPLDFLAGS
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl ogg's vorbis
AC_MSG_CHECKING(enable_audio=vorbis)
if test "x$au_enable_vorbis" = xyes; then
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
@ENABLE_SOUND_SPEC_TRUE@ soundspec.o
-@ENABLE_W32G_SYN_TRUE@W32GUI_DEPS = w32g_res.res
-
@ENABLE_W32GUI_TRUE@W32GUI_DEPS = w32g_res.res
+@ENABLE_W32G_SYN_TRUE@W32GUI_DEPS = w32g_res.res
+
INTERFACE_OBJS = $(INTERFACE_SRCS:.c=.o)
libinterface_a_LIBADD = \
interface_n.txt \
interface_s.txt
+@ENABLE_DYNAMIC_TCLTK_TRUE@install_tk = install.tk
@ENABLE_TCLTK_TRUE@install_tk = install.tk
-@ENABLE_DYNAMIC_TCLTK_TRUE@install_tk = install.tk
@ENABLE_DYNAMIC_XAW_TRUE@install_xaw = install.xaw
@ENABLE_XAW_TRUE@install_xaw = install.xaw
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
EXTRA_timidity_SOURCES = \
alsa_a.c \
+ ao_a.c \
aRts_a.c \
audriv.h \
audriv_a.c \
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
EXTRA_timidity_SOURCES = \
alsa_a.c \
+ ao_a.c \
aRts_a.c \
audriv.h \
audriv_a.c \
depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
am__depfiles_maybe = depfiles
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/aRts_a.Po ./$(DEPDIR)/aiff_a.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/alsa_a.Po ./$(DEPDIR)/aq.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/au_a.Po ./$(DEPDIR)/audio_cnv.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/audriv_a.Po ./$(DEPDIR)/audriv_al.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/audriv_mme.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/alsa_a.Po ./$(DEPDIR)/ao_a.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/aq.Po ./$(DEPDIR)/au_a.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/audio_cnv.Po ./$(DEPDIR)/audriv_a.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/audriv_al.Po ./$(DEPDIR)/audriv_mme.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/audriv_none.Po ./$(DEPDIR)/bsd20_a.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/calcnewt.Po ./$(DEPDIR)/common.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/controls.Po ./$(DEPDIR)/darwin_a.Po \
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aRts_a.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aiff_a.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsa_a.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ao_a.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aq.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/au_a.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio_cnv.Po@am__quote@
--- /dev/null
+/*
+ TiMidity++ -- MIDI to WAVE converter and player
+ Copyright (C) 1999-2002 Masanao Izumo <mo@goice.co.jp>
+ Copyright (C) 1995 Tuukka Toivonen <tt@cgs.fi>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ ao_a.c
+ Written by Iwata <b6330015@kit.jp>
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif /* HAVE_CONFIG_H */
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include <ao/ao.h>
+
+#include "timidity.h"
+#include "output.h"
+#include "controls.h"
+#include "timer.h"
+#include "instrum.h"
+#include "playmidi.h"
+#include "miditrace.h"
+
+static int open_output(void); /* 0=success, 1=warning, -1=fatal error */
+static void close_output(void);
+static int output_data(char *buf, int32 nbytes);
+static int acntl(int request, void *arg);
+
+/* export the playback mode */
+
+#define dpm ao_play_mode
+
+PlayMode dpm = {
+ DEFAULT_RATE, PE_SIGNED|PE_16BIT, PF_PCM_STREAM,
+ -1,
+ {0}, /* default: get all the buffer fragments you can */
+ "Libao mode", 'O',
+ NULL, /* edit your ~/.libao */
+ open_output,
+ close_output,
+ output_data,
+ acntl
+};
+
+static ao_device *ao_device_ctx;
+static ao_sample_format ao_sample_format_ctx;
+
+void show_ao_device_info(FILE *fp)
+{
+ int driver_count;
+ ao_info **devices;
+ int i;
+
+ ao_initialize();
+
+ fputs("Output device name (ao only):" NLS
+" -o device ", fp);
+
+ devices = ao_driver_info_list(&driver_count);
+ if (driver_count < 1) {
+ fputs("*no device found*" NLS, fp);
+ }
+ else {
+ fputs("[ ", fp);
+ for(i = 0; i < driver_count; i++) {
+ if (devices[i]->type == AO_TYPE_LIVE)
+ fprintf(fp, "%s ", devices[i]->short_name);
+ }
+ fputs("]", fp);
+ }
+ ao_shutdown();
+}
+
+
+static int open_output(void)
+{
+ int driver_id;
+
+ ao_initialize();
+
+ if (dpm.name == NULL) {
+ driver_id = ao_default_driver_id();
+ }
+ else {
+ ao_info *device;
+
+ driver_id = ao_driver_id(dpm.name);
+ if ((device = ao_driver_info(driver_id)) == NULL) {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: driver is not supported.",
+ dpm.name);
+ return -1;
+ }
+ if (device->type == AO_TYPE_FILE) {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: file output is not supported.",
+ dpm.name);
+ return -1;
+ }
+ }
+
+ if (driver_id == -1) {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",
+ dpm.name, strerror(errno));
+ return -1;
+ }
+
+ /* They can't mean these */
+ dpm.encoding &= ~(PE_ULAW|PE_ALAW|PE_BYTESWAP);
+
+ ao_sample_format_ctx.channels = (dpm.encoding & PE_MONO) ? 1 : 2;
+ ao_sample_format_ctx.rate = dpm.rate;
+ ao_sample_format_ctx.byte_format = AO_FMT_NATIVE;
+ ao_sample_format_ctx.bits = (dpm.encoding & PE_24BIT) ? 24 : 0;
+ ao_sample_format_ctx.bits = (dpm.encoding & PE_16BIT) ? 16 : 0;
+ if (ao_sample_format_ctx.bits == 0)
+ ao_sample_format_ctx.bits = 8;
+
+ if ((ao_device_ctx = ao_open_live(driver_id, &ao_sample_format_ctx, NULL /* no options */)) == NULL) {
+ ctl->cmsg(CMSG_ERROR, VERB_NORMAL, "%s: %s",
+ dpm.name, strerror(errno));
+ return -1;
+ }
+ return 0;
+}
+
+static int output_data(char *buf, int32 nbytes)
+{
+ if (ao_play(ao_device_ctx, buf, nbytes) == 0) {
+ ctl->cmsg(CMSG_WARNING, VERB_VERBOSE, "%s: %s",
+ dpm.name, strerror(errno));
+ return -1;
+ }
+ return 0;
+}
+
+static void close_output(void)
+{
+ if (ao_device_ctx != NULL) {
+ ao_close(ao_device_ctx);
+ ao_device_ctx = NULL;
+ ao_shutdown();
+ }
+}
+
+static int acntl(int request, void *arg)
+{
+ switch(request) {
+ case PM_REQ_DISCARD:
+ ;;
+ return 0;
+ }
+ return -1;
+}
extern PlayMode nas_play_mode;
#endif /* AU_NAS */
+#ifdef AU_AO
+extern PlayMode ao_play_mode;
+#endif /* AU_AO */
+
#ifndef __MACOS__
/* These are always compiled in. */
extern PlayMode raw_play_mode, wave_play_mode, au_play_mode, aiff_play_mode;
&nas_play_mode,
#endif /* AU_NAS */
+#if defined(AU_AO)
+ &ao_play_mode,
+#endif /* AU_PORTAUDIO */
+
#ifndef __MACOS__
&wave_play_mode,
&raw_play_mode,
for (wlpp = wrdt_list; (wlp = *wlpp) != NULL; wlpp++)
fprintf(fp, " -W%c %s" NLS, wlp->id, wlp->name);
fputs(NLS, fp);
+#ifdef AU_AO
+ show_ao_device_info(fp);
+#endif /* AU_AO */
close_pager(fp);
exit(EXIT_SUCCESS);
}
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AO_CFLAGS = @AO_CFLAGS@
+AO_LIBS = @AO_LIBS@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@