comparison configure.in @ 2271:60b4c52a7906

Ported PulseAudio target from 1.2 to 1.3 interfaces, and added it to the trunk. Fixes Bugzilla #439.
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 20 Aug 2007 01:02:37 +0000
parents f7f80b822c1f
children 323a5af2924b
comparison
equal deleted inserted replaced
2270:d5a11262f067 2271:60b4c52a7906
642 have_audio=yes 642 have_audio=yes
643 fi 643 fi
644 fi 644 fi
645 } 645 }
646 646
647 dnl Find PulseAudio
648 CheckPulseAudio()
649 {
650 AC_ARG_ENABLE(pulseaudio,
651 AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
652 , enable_pulseaudio=yes)
653 if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
654 audio_pulseaudio=no
655
656 PULSEAUDIO_REQUIRED_VERSION=0.9
657
658 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
659 AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support)
660 if test x$PKG_CONFIG != xno; then
661 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
662 PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
663 PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
664 audio_pulseaudio=yes
665 fi
666 fi
667 AC_MSG_RESULT($audio_pulseaudio)
668
669 if test x$audio_pulseaudio = xyes; then
670 AC_ARG_ENABLE(pulseaudio-shared,
671 AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
672 , enable_pulseaudio_shared=yes)
673 if test "x`echo $PULSEAUDIO_LIBS | grep -- -L`" = "x"; then
674 if test "x`ls /lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then
675 PULSEAUDIO_LIBS="-L/lib $PULSEAUDIO_LIBS"
676 elif test "x`ls /usr/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then
677 PULSEAUDIO_LIBS="-L/usr/lib $PULSEAUDIO_LIBS"
678 elif test "x`ls /usr/local/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then
679 PULSEAUDIO_LIBS="-L/usr/local/lib $PULSEAUDIO_LIBS"
680 fi
681 fi
682 pulseaudio_lib_spec=`echo $PULSEAUDIO_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'`
683 pulseaudio_lib=`ls -- $pulseaudio_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
684 echo "-- $pulseaudio_lib_spec -> $pulseaudio_lib"
685
686 AC_DEFINE(SDL_AUDIO_DRIVER_PULSEAUDIO)
687 SOURCES="$SOURCES $srcdir/src/audio/pulseaudio/*.c"
688 EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSEAUDIO_CFLAGS"
689 if test x$have_loadso != xyes && \
690 test x$enable_pulseaudio_shared = xyes; then
691 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading])
692 fi
693 if test x$have_loadso = xyes && \
694 test x$enable_pulseaudio_shared = xyes && test x$pulseaudio_lib != x; then
695 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC, "$pulseaudio_lib")
696 else
697 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSEAUDIO_LIBS"
698 fi
699 have_audio=yes
700 fi
701 fi
702 }
703
647 CheckARTSC() 704 CheckARTSC()
648 { 705 {
649 AC_ARG_ENABLE(arts, 706 AC_ARG_ENABLE(arts,
650 AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]), 707 AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
651 , enable_arts=yes) 708 , enable_arts=yes)
2063 CheckDLOPEN 2120 CheckDLOPEN
2064 CheckOSS 2121 CheckOSS
2065 CheckDMEDIA 2122 CheckDMEDIA
2066 CheckMME 2123 CheckMME
2067 CheckALSA 2124 CheckALSA
2125 CheckPulseAudio
2068 CheckARTSC 2126 CheckARTSC
2069 CheckESD 2127 CheckESD
2070 CheckNAS 2128 CheckNAS
2071 CheckX11 2129 CheckX11
2072 CheckNANOX 2130 CheckNANOX