[pulseaudio-discuss] pulseaudio on cygwin patch
Adam Smith
adam-nospam at servfire.net
Sun Dec 17 09:26:17 PST 2006
Hey list,
I spent the last half a day or so learning the autoconf/automake toolset
and going through the build system of pulseaudio to get it to compile
under cygwin rather then native. (I wanted module-x11-publish with
Cygwin/X).
The patch is against the 0.9.5 tree rather then SVN as I didn't know if
I would get it done when I started, but I figured I'll share it anyway
to see if it gets any use.
The pulseaudio patch moves the win32api header detection up into the
determine build environment section, this can be relocated back down to
the other part but the cygwin test needs to stay for this to work. (The
alternative is to go through every source file and modify where the
winsock.h header file gets included from, it needs to go before the
cygwin includes so that the cygwin headers can ifdef around the already
defined functions from win32api. This was beyond the scope of what I
wanted to do, which was to just get it compiled and running.) I also
added the --disable-cygwin option for building which should revert the
behavior under the cygwin compiler back to the mingw settings.
I had to add in another conditional for automake, OS_IS_CYGWIN. Mostly
setting OS_IS_WIN32 under Cygwin compiles the right things, however it
was breaking the PG_DEFAULT_CONFIG_DIR, but mostly everything else was
fine. I added the other conditional at first to fix this, but then I
noticed that if I did it, I could clean up some of the other things in
the automake file as well. (Rather specific Win32 compiler options that
Cygwin doesn't really use) These fixes can look rather nasty but
automake only supports checking one variable at a time in a conditional
branch as far as I can tell from the manual.
I also made a fix which may or may not have already been fixed in SVN
with the module_x11_publish_la_LIBADD line where it was missing the
include of libpulsecore.la, that's about the only thing in the
pulseaudio patch that I can see that might already be done (unless I've
gone and reinvented the wheel (again) and cygwin build support was
already added).
I also sent a patch off to the liboil list to fix a small compile bug
with it which I'll attach here too.
Short list of steps for compiling it under Cygwin:
Download and install the IPv6 extension to Cygwin from
http://win6.jp/Cygwin/index.html
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig (I've got this one in my
/etc/bash.bashrc)
Download libsndfile from http://www.mega-nerd.com/libsndfile/, if you
have all the Cygwin devel prereq packages it should just be a
./configure && make && make install for this one
Download libsamplerate from http://www.mega-nerd.com/SRC/, this one
needs to be configured like: LDFLAGS='-no-undefined' ./configure && make
&& make install
Download liboil from http://liboil.freedesktop.org/, apply the liboiltmp
stub patch (patch -p1 -i liboil-0.3.10-liboiltmp-stub-cygwin-fix.patch
from in the liboil folder), then ./configure && make && make install
Download pulseaudio from http://pulseaudio.org/, apply the
pulseaudio-0.9.5-cygwin-fix.patch (patch -p1 -i
pulseaudio-0.9.5-cygwin-fix.patch from in the pulseaudio folder),
./configure && make && make install
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pulseaudio-0.9.5-cygwin-fix.patch
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20061218/407b0358/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: liboil-0.3.10-liboiltmp-stub-cygwin-fix.patch
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20061218/407b0358/attachment.txt>
More information about the pulseaudio-discuss
mailing list