[Freeciv-Dev] Re: (PR#8509) ALSA sound plugin for freeciv
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#8509) ALSA sound plugin for freeciv |
From: |
"Javier Pello" <jpello@xxxxxxxxxxxxx> |
Date: |
Mon, 19 Apr 2004 02:16:48 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8509 >
Per I. Mathisen wrote:
> > I have developed a sound plugin for freeciv to support ALSA,
> > and I would like to contribute it in case someone else finds
> > it useful.
>
> I've fixed a few bugs and cleaned up the style issues. The patch and the
> new files are attached. I cannot test it myself, since I cannot get ALSA
> working on this box, so if someone with working ALSA could test it, I
> would be very grateful.
>
> The two new files should go in client/, patch up, and then rerun
> ./autogen_sh.
I have tested the new patch against freeciv-cvs-Apr-18 and it works as
usual, although I had to manually re-add the file m4/alsa.m4 that I had
sent with my first patch (attached again) to get aclocal working.
Javier
dnl AM_ALSA_SUPPORT([ACTION-IF-SUPPORTS [, ACTION-IF-NOT-SUPPORTS]])
dnl Partially stolen from alsaplayer
dnl
AC_DEFUN(AM_ALSA_SUPPORT,
[dnl
AC_MSG_CHECKING(for ALSA version)
AC_EGREP_CPP([AP_maGiC_VALUE],
[
#include <sys/asoundlib.h>
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR)
#if SND_LIB_MAJOR>0 || (SND_LIB_MAJOR==0 && SND_LIB_MINOR>=6)
AP_maGiC_VALUE
#endif
#endif
],
AC_MSG_RESULT([>= 0.6])
AC_MSG_CHECKING(for Audio File version)
AC_EGREP_CPP([AP_maGiC_VALUE],
[
#include <audiofile.h>
#if defined(LIBAUDIOFILE_MAJOR_VERSION) && defined(LIBAUDIOFILE_MINOR_VERSION)
#if LIBAUDIOFILE_MAJOR_VERSION>0 || (LIBAUDIOFILE_MAJOR_VERSION==0 &&
LIBAUDIOFILE_MINOR_VERSION>=2)
AP_maGiC_VALUE
#endif
#endif
],
AC_MSG_RESULT([>= 0.2])
ALSA_CFLAGS=""
ALSA_LIB="-laudiofile -lasound"
ifelse([$1], , :, [$1]),
ifelse([$2], , :, [$2])
),
ifelse([$2], , :, [$2])
)
])
|
|