diff options
author | Nathan Walp <nwalp@pidgin.im> | 2003-02-09 01:55:35 +0000 |
---|---|---|
committer | Nathan Walp <nwalp@pidgin.im> | 2003-02-09 01:55:35 +0000 |
commit | 0007b430e3237804e06799f48f33283db943a566 (patch) | |
tree | 9bedb61def0de187be0aef0d1e11ffaf1fc8dedf /acinclude.m4 | |
parent | 074bf4793fdaa2600a11cb81bae17c8f44e1c0dd (diff) | |
download | pidgin-0007b430e3237804e06799f48f33283db943a566.tar.gz |
[gaim-migrate @ 4842]
This is the new sound subsystem
Lots of stuff got renamed, and everything sound-wise is documented.
Gaim now uses libaudiofile and libao to play sounds. Lots of ugly hacks
were removed, and now we support playing audio through anything that
libao will support.
If you need to (you shouldn't) you can force libao to use a specific
output driver, by putting a line into ~/.libao like:
default_driver=esd
You shouldn't need to do this, libao is pretty good at figuring out what
driver to use.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index aba9e15965..f12ef56572 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -798,3 +798,119 @@ main () AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) + +dnl This is XIPH_PATH_AO renamed to GAIM_PATH_AO to prevent conflicts. +dnl It's a long story. --elb + +# ao.m4 +# Configure paths for libao +# Jack Moffitt <jack@icecast.org> 10-21-2000 +# Shamelessly stolen from Owen Taylor and Manish Singh + +dnl GAIM_PATH_AO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl Test for libao, and define AO_CFLAGS and AO_LIBS +dnl +AC_DEFUN(GAIM_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 +]) |