[Stk] rtaudio / pulse & build

Tristan Matthews le.businessman at gmail.com
Sun Jul 22 20:34:03 PDT 2012


2012/7/22 Stephen Sinclair <sinclair at music.mcgill.ca>:
> In the pkg-config branch, I got an error when I ran "autoconf && make"
> on my system:
>
> checking for audio API... ./configure: line 4156: syntax error near
> unexpected token `PULSE,'
> ./configure: line 4156: `    PKG_CHECK_MODULES(PULSE, libpulse-simple,
> , as_fn_error $? "PulseAudio support requires the pulse-simple
> library!" "$LINENO" 5 )
>
> It seemed that it couldn't find the pkg-config-related m4 modules,
> which I can imagine will be a problem on some systems.  I fixed it by
> adding the following lines near the top of the file, making it ignore
> the pkg-config-related macros if they don't exist.  This is taken
> from,
> http://osdir.com/ml/automake-gnu/2011-03/msg00007.html
>
> dnl Check for pkg-config program, used for configuring some libraries.
> m4_define_default([PKG_PROG_PKG_CONFIG],
> [AC_MSG_CHECKING([pkg-config])
> AC_MSG_RESULT([no])])
>
> PKG_PROG_PKG_CONFIG
>
> dnl If the pkg-config autoconf support isn't installed, define its
> dnl autoconf macro to disable any packages depending on it.
> m4_define_default([PKG_CHECK_MODULES],
> [AC_MSG_CHECKING([$1])
> AC_MSG_RESULT([no])
> $4])
>
> After this, and being slightly confused since pkg.m4 was clearly in
> the right place on my system, I realized I had to run "aclocal" in the
> folder to get it to import the correct macros from pkg.m4.  Once I did
> that and re-ran autoconf, I can confirm that this branch compiles and
> tests fine for me.  It also complained nicely when I didn't have
> pulse-simple installed.  (Although, I had to guess that this
> corresponded with the libpulse-dev package.)
>
> I'd recommend adding the lines that make autoconf work even without
> pkg-config installed, since I think that will be a problem on OS X and
> Windows.

Thanks, I've pushed your patch.

>
> By the way it's weird that "configure" is in the repository.  I
> thought it was working all fine until I thought of running autoconf to
> re-generate configure, so I almost missed this.  I only did it because
> I happened to notice that librtaudio.pc wasn't being generated.
> (Which it now is.)

I agree, however, the "configure" script is also in the RtAudio
svn...maybe Gary can clarify why? I've seen this before for projects
that might be distributed on systems that lack autoconf, and therefore
can't generate their own configure files. I'll delete it in the
pkgconfig branch in any case.

>
> Looking at it.. it would be interesting maybe to add -L and -l and
> -framework flags to librtaudio.pc.in as necessary for whatever audio
> backend is compiled in.

This would be the case for just pulse, alsa, jack, oss and coreaudio I guess?

Best,
Tristan

> On Sun, Jul 22, 2012 at 9:36 PM, Tristan Matthews
> <le.businessman at gmail.com> wrote:
>> Hi,
>>
>> 2012/7/19 Peter Meerwald <pmeerw at pmeerw.net>:
>>> Hello,
>>>
>>>> > I plan to propose/submit patches for two things:
>>>> > - rework RTAUDIO_ALSA_USE_DEFAULT, goal is to use the default ALSA
>>>> > device but it seems some API calls such as GetDeviceCount(),
>>>> > GetDeviceInfo() do not work with default
>>>> > - provide a librtaudio.pc file for pkgconfig
>>>
>>>> Both of those would be helpful changes for GNU/Linux developers. I can
>>>> update the github repo today to be in sync with the latest RtAudio
>>>> release, otherwise sending patches is fine too.
>>>
>>> attached my proposed patch, some comments can be found on top of some
>>> patches; feedback is appreciated
>>>
>>> I think it would be good if Tristan could stage these patches on github
>>
>> I had to scrap the old github rtaudio repo, because it was imported
>> with an older version of svn2git, and as a result I wasn't able to
>> update it with the latest changes in rtaudio's svn.
>> So I've uploaded a new git mirror of the rtaudo subversion repository
>> to gitorious, the master branch is now in sync with the trunk of the
>> official RtAudio svn repo:
>>
>> https://gitorious.org/rtaudio/rtaudio/commits/master
>>
>> and the pkgconfig related patches have been applied in a branch
>> appropriately named "pkgconfig":
>>
>> I haven't applied the other two patches yet, as they are for different
>> features. It would be good if this initial set got some testing and
>> feedback first, and then hopefully they can be merged back into the
>> RtAudio trunk. To test, simply clone the repository and checkout the
>> pkgconfig branch:
>>
>> git clone https://gitorious.org/rtaudio/rtaudio/commits/master
>> git checkout pkgconfig
>>
>> Best,
>> Tristan
>>
>> --
>> Tristan Matthews
>> web: http://tristanswork.blogspot.com
>>
>> _______________________________________________
>> Stk mailing list
>> Stk at ccrma.stanford.edu
>> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>
>>
>
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>



-- 
Tristan Matthews
web: http://tristanswork.blogspot.com



More information about the Stk mailing list