3
2

More than 3 years have passed since last update.

WSLtty と Libsixel と PulseAudio でコンソールからマルチメディアを楽しむ / Cygwin で PulseAudio 13.0 をビルドする

Last updated at Posted at 2019-11-20

 無 保 証 で す

当方執筆の技術情報に関するライセンス、免責事項、禁止事項

概要

X サーバを介さなくてもけっこう楽しめます。息抜き、箸休めにどうぞ。

2019-11-11 (2).png
※ かわええ (*´꒳`*)
Spring — A poetic fantasy film written and directed by Andy Goralczyk — Blender Cloud

image.png
サンプル音源ダウンロード - SONY
ハイレゾ音源のお試し用に。無料サンプル配信サイトのご紹介 | ハイレゾまるわかり大辞典
※ ハイレゾも良いけど、駅の待合室でダルマストーブに当たりながら窓の外の雪を眺めている時に爺様婆様方のモノラルラジオから流れてくる AM ラジオの音が好きです。

img2sixel.jpg
Arch Linux JP Project
File:Archlogo.png - Wikimedia Commons

WSL環境

プラットフォーム:
WSL1

OS:
ArchWSL

ソフトウェア環境

Windows 10 側:

  • Windows 版 PulseAudio 及びその導入スクリプト
  • WSLtty

WSL 側:

  • base-devel 相当の基本的な開発パッケージ群
  • yay
  • unzip
  • pulseaudio-alsa 及びその依存パッケージ
  • libsixel

※ 今回の用途では、WSL 上で PulseAudio を .bashrc で呼び出す、デーモンとして動かしておくといった必要はありませんでした。WSL 側で行った事は export PULSE_SERVER=tcp:localhost を .bashrc に記述する一点のみ。/etc/pulse 以下のファイルはイエスロリータノータッチです 1

環境構築

WSL 側

unzip の導入

ArchWSLで以下を実行
sudo pacman -Syu
sudo pacman -S unzip

MAN/INFOPAGE

base-devel 相当の基本的な開発パッケージ群の導入

ArchWSLで以下を実行
sudo pacman -Syu
sudo pacman -S autoconf automake binutils bison file findutils flex gawk gcc gettext grep groff gzip libtool m4 make pacman patch pkgconf sed sudo texinfo util-linux which

MAN/INFOPAGE

yay の導入

ArchWSLで以下を実行
sudo pacman -Syu
sudo pacman -S git
cd
test -d Downloads || mkdir Downloads
cd Downloads
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si

MAN/INFOPAGE

pulseaudio-alsa 及び libsixel の導入

ArchWSLで以下を実行
yay
yay -S pulseaudio-alsa libsixel

MAN/INFOPAGE

 
yay
https://github.com/Jguer/yay/blob/master/doc/yay.8
または、WSL から

curl -L https://raw.githubusercontent.com/Jguer/yay/master/doc/yay.8 | man -l -


環境変数の設定

ArchWSLで以下を実行
echo "export PULSE_SERVER=tcp:localhost" >>$HOME/.bashrc

MAN/INFOPAGE

Windows 10 側

WSLtty の導入

公式よりダウンロード&インストール

GitHub - mintty/wsltty: Mintty as a terminal for Bash on Ubuntu on Windows / WSL
https://github.com/mintty/wsltty

Releases · mintty/wsltty · GitHub
https://github.com/mintty/wsltty/releases

もしくは Chocolatey でインストール

Chocorateyによるインストール例
choco install wsltty

MAN/INFOPAGE

 
Chocolatey Software | Commandsreference
https://chocolatey.org/docs/commandsreference

参考とした文献

参考とした文献

 
WSLのコンソールを便利で高機能な「wsltty」に置き換える:Tech TIPS - @IT
https://www.atmarkit.co.jp/ait/articles/1812/13/news031.html

PulseAudio 1.1 の導入

trzecieu 氏の freedesktop.org 版 PulseAudio version 1.1 導入バッチファイル

バッチファイル本体
https://gist.github.com/trzecieu/b46829b2b24c3896c63d4d1b05e2df80

氏による解説:Configure graphic and sound on WSL | trzeci
https://trzeci.eu/configure-graphic-and-sound-on-wsl/

PulseAudio on Windows - PulseAudio - freedesktop.org
https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/

バッチファイルの実行

ダウンロードしたinstall_pulseaudio.batをコマンドプロンプトから実行します。

動作確認

WSL から以下を実行。スピーカーから「ぽべー」と聞こえれば成功。

ArchWSLで以下を実行
paplay /mnt/c/Windows/Media/tada.wav

MAN/INFOPAGE

 
paplay(1) - Linux man page
https://linux.die.net/man/1/paplay

参考とした文献

参考とした文献

 
PulseAudio doesn't work. · Issue #486 · microsoft/WSL · GitHub
https://github.com/microsoft/WSL/issues/486

ハマりどころ

WSLtty & libsixel

フォントの種類やサイズによって画像や動画を表示出来たり出来なかったり。比較的 Noto Mono との相性が良さそうです。

PulseAudio

Windows 10 側のサウンドデバイスの管理でハマりどころがありました。

2019-11-05 (2).png

入力デバイスを全て無効化してあると、何故か Windows 側の PulseAudio が以下のようなエラーで死にます。その一方 Cygwin 版 PulseAudio は似たようなエラーこそ吐きはするものの落ちません。

コマンドプロンプトにおける実行例
.\pulseaudio.exe
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core.c: failed to allocate shared memory pool. Falling back to a normal memory pool.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.
W: [(null)] modules/module-waveout.c: Sample spec not supported by WaveIn, falling back to default sample rate.
E: [(null)] modules/module-waveout.c: Failed to open WaveIn.
E: [(null)] modules/module-waveout.c: Error: A device ID has been used that is out of range for your system.
E: [(null)] pulsecore/module.c: Failed to load module "module-waveout" (argument: "sink_name=output source_name=input"): initialization failed.
E: [(null)] daemon/main.c: Failed to load directory.
E: [(null)] daemon/main.c: Module load failed.
E: [(null)] daemon/main.c: Failed to initialize daemon.
W: [(null)] pulsecore/core-util.c: Secure directory creation not supported on Win32.

MAN/INFOPAGE

 
pulseaudio(1): PulseAudio Sound System - Linux man page
https://linux.die.net/man/1/pulseaudio

画像再生

image.png

※ マルチメディア対応ファイラー。画像の低解像度プレビューはコマンドプロンプトから起動した WSL でも可能でした。

image.png

※ 画像はw3m -sixel https://www.aozora.gr.jpを実行した場合。フォントは Noto Mono 10pt。描画が乱れる場合は一度ターミナルを閉じて再度開きます。

image.png

※ libsixel 付属の画像ビューア。GIFアニメも再生出来ます。

音楽再生

  • extra/moc
    • プレイヤー起動コマンドはmocpmocではありません。
  • aur/moc-pulse
    • こちらは pulseaudio-alsa 無しでも動作すると思われます。

image.png

動画再生

※ youtube-dl をパーサーではなくダウンローダーとして用いる場合、YouTube の利用規約、及び対象動画の使用許諾を一読下さい。

Sixel 動画+音声同時再生サンプル

ArchWSLにおける実行例
youtube-dl -q https://www.youtube.com/watch?v=WhWc3b3KhnY -o - | ffmpeg -v 0 -i - -vn -acodec pcm_s16le -f wav - | paplay & youtube-dl -q https://www.youtube.com/watch?v=WhWc3b3KhnY -o - | ffmpeg -v 0 -i - -f sixel -r 3 -pix_fmt rgb24 -s 480x200 -

MAN/INFOPAGE

 
youtube-dl/README.md at master · ytdl-org/youtube-dl · GitHub
https://github.com/ytdl-org/youtube-dl/blob/master/README.md
 
ffmpeg Documentation
https://ffmpeg.org/ffmpeg.html
 
|, &
https://linuxjm.osdn.jp/html/GNU_bash/man1/bash.1.html

とりあえずの音声と動画の同時再生コマンドです。もっと良い組み立て方があるはず。

画像サイズは環境に合わせて色々お試し下さい。今回の動画は元サイズが「1280x536」でした。アスペクト比は 2.35:1 辺りでしょうか。

フレームレートについては PC の処理能力に応じて。手元の PC では -r 3 で 3fps に落としてみました。もしくは動画の再生速度を基準として音声の再生速度を落としても良いかもしれません。

再生サンプルとして使用

Spring - Blender Open Movie - YouTube
https://www.youtube.com/watch?v=WhWc3b3KhnY

参考とした文献

参考とした文献

 
16:9一覧表 - Fake H'Imagine
http://himagine.s20.xrea.com/pc/hdtable.html
 
16:9 aspect ratio - Wikipedia
https://en.wikipedia.org/wiki/16:9_aspect_ratio

FFmpeg-SIXEL のビルド

ArchWSLにおけるFFmpeg-SIXELのビルド&インストール例
yay
yay yasm libsixel pulseaudio-alsa
test -d $HOME/Downloads || mkdir $HOME/Downloads
cd $HOME/Downloads
git clone https://github.com/saitoha/FFmpeg-SIXEL.git
cd FFmpeg-SIXEL
mkdir build && cd build
../configure --enable-libsixel --enable-libpulse --prefix=/usr/local
make -j$(grep processor /proc/cpuinfo | wc -l)
make install

MAN/INFOPAGE

参考とした文献

参考とした文献

 
物理 CPU、CPU コア、および論理 CPU の数を確認する - Red Hat Customer Portal
https://access.redhat.com/ja/solutions/2159401

WSL2 における PulseAudio:ArchLinux の場合

以下のサイトで WSL1 と WSL2 の使い勝手の変化に伴う PULSE_SERVER に与える値の ArchWSL における変更例が記載されていました。localhostで繋げなくなるのは大きな変更点であるように思います。

引用元:利用WSL打造Arch开发环境 - 知乎
https://zhuanlan.zhihu.com/p/51270874

修改文件~/.bashrc,加入以下几行,初始化环境变量:

export LC_CTYPE=zh_CN.UTF-8
export LANG="zh_CN.UTF-8" 
export LC_ALL="zh_CN.UTF-8" 
export DISPLAY=localhost:0
export PULSE_SERVER=tcp:127.0.0.1

WSL2:WSL2 是使用虚拟机实现的,和 Win32 系统有不同的ip了,export DISPLAY和PULSE_SERVER中的 IP 地址需要进行修改,格式如下:

export DISPLAY=`cat /etc/resolv.conf | grep nameserver | awk '{print $2}'`:0
export PULSE_SERVER=`cat /etc/resolv.conf | grep nameserver | awk '{print $2}'`

PULSE_SERVER一句是关于 PulseAudio 声音支持的,不需要可以删掉。

引用元:UX Changes between WSL 1 and WSL 2 | Microsoft Docs
https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes#accessing-windows-applications-from-linux

Accessing Windows applications from Linux

To access a Windows network application you'll need to use the IP address of your host machine. You can do so with these steps:

  • Obtain the IP address of your host machine by running the command cat /etc/resolv.conf and copying the IP address following the term nameserver.
  • Connect to any Windows server using the copied IP address.

Cygwin 版 PulseAudio 11.1 を入れる

Cygwinインストール時に入れる

Cygwin の setup-x86_64.exe 実行時に PulseAudio を選択。

image.png

※ パッケージ pulseaudio には pulseaudio.exe が、パッケージ pulseaudio-utils には pacat.exe, pacmd.exe, pactl.exe, padsp, pamon, paplay, parec, parecord, pasuspender.exe pax11publish.exe が含まれます。

※ サーバ動作のみを期待するなら、Cygwin に入れるのは pulseaudio パッケージのみで良さそう。

※ Cygwin のコマンドラインから使えるミキサープログラムとして pamixer があります。

後からapt-cyg installもしくはapt-cyg setupで入れる

apt-cyg のインストール

kou1okada 氏版 apt-cyg
https://github.com/kou1okada/apt-cyg

事前に wget, tar, gawk, ca-certificates, gnupg(1 または 2), git をインストールしておくこと。

Cygwin64Terminalから以下を実行
cd $DIR # Change working directory where you want to install apt-cyg
git clone https://github.com/kou1okada/apt-cyg.git
ln -s "$(realpath apt-cyg/apt-cyg)" /usr/local/bin/

MAN/INFOPAGE

$DIR は自分の環境に合わせて読み替えて下さい(/usr/local/share等)

※ Cygwin のインストール先ディレクトリツリーの所有者が自分以外のユーザーの場合、書き込み権限の問題で apt-cyg が正常動作しませんでした。

※ インストール済み Cygwin パッケージ全体の更新はapt-cyg dist-upgradeで行えます。

※ apt-cyg 自身の更新はapt-cyg upgrade-selfで行えます。

apt-cyg setupによってダウンロードした setup-x86_64.exe の更新はapt-cyg update-setupで行えます。

参考とした文献

参考とした文献

 
Cygwinのapt-cyg開発者が完全に開発終了を宣言
https://rcmdnk.com/blog/2017/01/31/computer-windows-cygwin/
 
apt-cyg/README.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/README.md
 
apt-cyg/other_forks.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/other_forks.md

apt-cyg による PulseAudio のインストール

Cygwin64Terminalから以下を実行
apt-cyg install pulseaudio

MAN/INFOPAGE

 
apt-cyg/README.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/README.md

もしくはapt-cyg setupで setup-x86_64.exe を呼び出し GUI でインストール作業を行います。

Cygwin64Terminalから以下を実行
apt-cyg setup

MAN/INFOPAGE

 
apt-cyg/README.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/README.md

スタートアップへの登録

ログイン時に自動起動させるにはコマンドプロンプトから以下の 2 行を実行します(PulseAudio の インストール先が C:\cygwin64\bin\pulseaudio.exe の場合)。

コマンドプロンプトから以下を実行
echo set ws=wscript.createobject("wscript.shell") > "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\start_pulseaudio_cygwin.vbe"
echo ws.run "C:\cygwin64\bin\pulseaudio.exe --load=""module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1"" --exit-idle-time=-1",0 >> "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\start_pulseaudio_cygwin.vbe"

※ 同じIPアドレスを割り当てている場合、FreeDesktop 版の PulseAudio 1.1 と並列起動させない方が良さそう。

※ Cygwin 版 PulseAudio は RTP 行けるかな?
→ダメでした。ビルドを通すためにパッチによって RTP 関連機能が切られています。

E: [(null)] ltdl-bind-now.c: Failed to open module module-rtp-recv.dll: No such file or directory
E: [(null)] module.c: Failed to open module "module-rtp-recv".
E: [(null)] main.c: Module load failed.
E: [(null)] main.c: Module load failed.
E: [(null)] main.c: Failed to initialize daemon.

参考とした文献

参考とした文献

 
Configure graphic and sound on WSL | trzeci
https://trzeci.eu/configure-graphic-and-sound-on-wsl/
 
How can use my Windows box to play the sound from my Linux box? - Frequently Asked Questions - PulseAudio - freedesktop.org
https://www.freedesktop.org/wiki/Software/PulseAudio/FAQ/#index33h3
 
VBScriptで文字列中の二重引用符のエスケープの仕方が何処に書いてあるか。: Windows Script Programming
http://scripting.cocolog-nifty.com/blog/2006/10/vbscript_9c47.html
 
Visual Basic における文字列の基本 | Microsoft Docs
https://docs.microsoft.com/ja-jp/dotnet/visual-basic/programming-guide/language-features/strings/string-basics
 
escaping - Adding quotes to a string in VBScript - Stack Overflow
https://stackoverflow.com/questions/2942554/adding-quotes-to-a-string-in-vbscript
 
About using Double quotes in Vbscript - Stack Overflow
https://stackoverflow.com/questions/15770599/about-using-double-quotes-in-vbscript

関連する文献

関連する文献

 
Visual Basic のプログラミング ガイド | Microsoft Docs
https://docs.microsoft.com/ja-jp/dotnet/visual-basic/programming-guide/
 
Visual Basic の名前付け規則 | Microsoft Docs
https://docs.microsoft.com/ja-jp/dotnet/visual-basic/programming-guide/program-structure/naming-conventions
 
キーワード (Visual Basic) | Microsoft Docs
https://docs.microsoft.com/ja-jp/dotnet/visual-basic/language-reference/keywords/
 
Set - VBScript - SS64.com
https://ss64.com/vb/set.html
 
CreateObject - VBScript - SS64.com
https://ss64.com/vb/createobject.html
 
WSH/外部コマンドを実行する方法・Runメソッド - Windowsと暮らす
※ WScript/Windows Script Host/WSH。コマンドは C:\Windows\System32\wscript.exe に存在します。
 
[Windows] バッチファイル(.bat)を非表示・最小化した状態で起動する
https://uguisu.skr.jp/Windows/bat_nowindow.html
 
バッチファイルを実行する時に黒いコマンドプロンプト画面を表示しない方法 | パソコンが便利で楽になるものを紹介しています
https://amaotolog.com/pc-benri/33
 
.Run - VBScript - SS64.com
https://ss64.com/vb/run.html
 
Shell 関数 (Visual Basic for Applications) | Microsoft Docs
https://docs.microsoft.com/ja-jp/office/vba/language/reference/user-interface-help/shell-function
 
オブジェクト (object)とは|「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典
https://wa3.i-3-i.info/word1119.html
 
メソッド (method)とは|「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典
https://wa3.i-3-i.info/word1906.html
 
関数 (function)とは|「分かりそう」で「分からない」でも「分かった」気になれるIT用語辞典
https://wa3.i-3-i.info/word1905.html
 
cmd /?
cmd /?
Windows コマンド インタープリターの新しいインスタンスを開始します。

CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]

    [[/S] [/C | /K] 文字列]

/C      "文字列" に指定されたコマンドを実行した後、終了します。
/K      "文字列" に指定されたコマンドを実行しますが、終了しません。
/S      /C または /K の後の文字列の扱いを変更します
        (以下の説明を参照してください)。
/Q      エコーをオフにします。
/D      レジストリからの AutoRun コマンドの実行を無効にします
        (下記を参照してください)。
/A      内部コマンドの出力結果を ANSI でパイプまたはファイルに出力します。
/U      内部コマンドの出力結果を Unicode でパイプまたはファイルに出力します。
/T:fg   前景色および背景色を設定します (詳細は COLOR /? を参照してください)。
/E:ON   コマンド拡張機能を有効にします (以下の説明を参照してください)。
/E:OFF  コマンド拡張機能を無効にします (以下の説明を参照してください)。
/F:ON   ファイル名およびディレクトリ名補完文字を有効にします
        (以下の説明を参照してください)。
/F:OFF  ファイルおよびディレクトリ名補完文字を無効にします
        (以下の説明を参照してください)。
/V:ON   区切り文字として ! を使って遅延環境変数の展開を有効にします。
        たとえば、/V:ON とすると、!var! は、実行時に変数 var を展開します。
        var 構文は、FOR ループ中とは違い、入力時に変数を展開します。
/V:OFF  遅延環境展開を無効にします。

コマンド セパレーター '&&' で区切られた複数のコマンドが引用符で囲まれている場合
は、"文字列" として指定されます。また互換性の理由から /X と /E:ON、/Y と
/E:OFF、および /R と /C は同じです。その他のスイッチは無視されます。

/C または /K が指定されている場合、スイッチの後の残りのコマンド ラインが
コマンド ラインとして処理されます。次のルールが引用符 (") の処理に使われます:

    1.  次のすべての条件に一致する場合、コマンド ラインの引用符が有効になり
        ます:

        - /S スイッチがない
        - 引用符が 1 組ある
        - 引用符の中に特殊文字がない
          (特殊文字は &<>()@^| です)
        - 引用符の中に 1 つ以上のスペースがある
        - 引用符の中の文字列が、実行可能ファイルの名前である

    2.  最初の文字が引用符であるにも関わらず上の条件に一致しない場合は、最初
        の引用符とコマンド ラインの最後の引用符が削除され、最後の引用符の後
        のテキストが有効になります。

コマンド ラインで /D が指定されなかった場合は、CMD.EXE の開始時に次の REG_SZ
または REG_EXPAND_SZ レジストリ変数が検索されます。次のレジストリ変数の両方
またはどちらかが存在する場合、それらを最初に実行します。

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun

        および/または

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

既定では、コマンド拡張機能は有効です。拡張機能を無効にして CMD.EXE を
起動するには、/E:OFF スイッチを使用します。コンピューターまたは
ユーザー ログオン セッションで起動される CMD.EXE コマンド
すべてに対して拡張機能を有効または無効にするには、REGEDIT.EXE を使って
レジストリにある次の REG_DWORD 値を設定します。コンピューターに対しては、

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions

に 0x1 を設定すると有効になり、0x0 を設定すると無効になります。
ログオン セッションに対しては、

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions

に 0x1 を設定すると有効になり、0x0 を設定すると無効になります。
ユーザー固有の設定は、コンピューターの設定より優先されます。
コマンド ライン スイッチは、レジストリの設定より優先されます。

バッチ ファイルでは、SETLOCAL ENABLEEXTENSIONS または DISABLEEXTENSIONS 引数は
/E:ON または /E:OFF スイッチよりも優先されます。詳細については SETLOCAL /? を
参照してください。

コマンド拡張機能には、次のコマンドに対する変更または追加が含まれています。

    DEL または ERASE
    COLOR
    CD または CHDIR
    MD または MKDIR
    PROMPT
    PUSHD
    POPD
    SET
    SETLOCAL
    ENDLOCAL
    IF
    FOR
    CALL
    SHIFT
    GOTO
    START (外部コマンドの起動の変更を含みます)
    ASSOC
    FTYPE

詳細は、コマンド名の後に「/?」と入力すると表示されるヘルプを参照してください。
レジストリにある次の
REG_DWORD 値を設定します。コンピューターに対しては、

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions

に 0x1 を設定すると有効になり、0x0 を設定すると無効になります。
ログオン セッションに対しては、

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions

に 0x1 を設定すると有効になり、0x0 を設定すると無効になります。
ユーザー固有の設定は、コンピューターの設定より優先されます。
コマンド ライン スイッチは、レジストリの設定より優先されます。

バッチ ファイルでは、SETLOCAL ENABLEEXTENSIONS または DISABLEEXTENSIONS 引数は
/E:ON または /E:OFF スイッチよりも優先されます。詳細については SETLOCAL /? を
参照してください。

コマンド拡張機能には、次のコマンドに対する変更または追加が含まれています。

    DEL または ERASE
    COLOR
    CD または CHDIR
    MD または MKDIR
    PROMPT
    PUSHD
    POPD
    SET
    SETLOCAL
    ENDLOCAL
    IF
    FOR
    CALL
    SHIFT
    GOTO
    START (外部コマンドの起動の変更を含みます)
    ASSOC
    FTYPE

詳細は、コマンド名の後に「/?」と入力すると表示されるヘルプを参照してください。

既定では、遅延環境変数の展開は有効ではありません。遅延環境変数の展開を有効また
は無効にして CMD.EXE を起動するには、/V:ON または /V:OFF スイッチを使います。
コンピューターまたはログオン セッションで起動される CMD.EXE コマンドすべてに対
して遅延の展開を有効または無効にするには、REGEDIT.EXE を使ってレジストリにある
次の REG_DWORD 値を設定します。コンピューターに対しては、

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion

に 0x1 を設定すると有効になり、0x0 を設定すると無効になります。
ユーザー ログオン セッションに対しては、

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion

に 0x1 を設定すると有効になり、0x0 を設定すると無効になります。
ユーザー固有の設定は、コンピューターの設定より優先されます。
コマンド ライン スイッチは、レジストリの設定より優先されます。

バッチ ファイルでは、SETLOCAL ENABLEEXTENSIONS または DISABLEEXTENSIONS
引数は /V:ON または /V:OFF スイッチよりも優先されます。
詳細については SETLOCAL /? を参照してください。

遅延環境変数の展開が有効になっている場合、感嘆符を使うと実行時に環境変数の
値を置き換えることができます。

CMD.EXE の特定の起動のファイル名補完機能を有効または無効にするには、/F:ON
または /F:OFF スイッチを使用します。コンピューターとユーザー ログオン セッション
またはそのいずれかで起動される CMD.EXE コマンドすべてに対して補完機能を有効
または無効にするには、REGEDIT.EXE を使ってレジストリにある次の REG_DWORD 値を
設定します。コンピューターに対しては、

    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
    HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

に特定の機能に使う 16 進の制御文字を設定します (例 0x4 は Ctrl-D、0x6 は
Ctrl-F)。ユーザー ログオン セッションに対しては、

    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
    HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar

に特定の機能に使う 16 進の制御文字を指定します (例: 0x4 は Ctrl-D、0x6 は
Ctrl-F)。
ユーザー固有の設定は、コンピューターの設定より優先されます。
コマンド ライン スイッチは、レジストリの設定より優先されます。

/F:ON スイッチで補完機能を有効にした場合、2 つの制御文字 (Ctrl-D はディレ
クトリ名補完機能、Ctrl-F はファイル名補完機能) が使用されます。
レジストリで特定の補完文字を無効にするには、制御文字として有効でないスペース
(0x20) の値を使用します。

2 つの制御文字のどちらかを入力すると、補完機能が起動されます。
パスが存在しない場合、プログラムはカーソルの左側のパス文字列にワイルド
カード文字を付加し、一致するパスの一覧を作成します。その後一致する最初の
パスを表示します。パスが一致しない場合、音を鳴らします。同じ制御文字を押し
続けると一致するパスの一覧を順に表示します。Shift キーを押しながら制御文字
を押すと一覧を逆回り表示します。行を編集して制御文字をもう一度押すと、保存
されていた一致したパスの一覧は破棄され、新しい一覧が作成されます。
ファイル名補完機能とディレクトリ名補完機能を切り替えたときも同様です。
2 つの制御文字の違いは、ディレクトリ補完文字がディレクトリ名だけを照合する
のに対し、ファイル名補完文字はファイルとディレクトリ名の両方を照合する点です。
ファイル補完機能が内部ディレクトリ コマンド (CD、MD または RD) に使用され
た場合、ディレクトリ補完機能と見なされます。

一致するパスの前後に引用符を付けると、補完機能コードでスペースまたは他の
特別な文字を含むファイル名が使用できるようになります。また、行の前に戻って
補完機能を起動した場合、補完機能が呼び出された時点でカーソルの右側に
あったテキストは破棄されます。

引用符が必要な特別な文字は次のとおりです:
     <スペース>
     &()[]{}^=;!'+,`~


 
wscript /?

WSH_HELP.jpg

Version 13.0 のソースから Cygwin 版 PulseAudio 13.0 をビルド&インストールする

Download - PulseAudio - freedesktop.org
https://www.freedesktop.org/wiki/Software/PulseAudio/Download/

PulseAudio 13.0 release notes - freedesktop.org
https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/13.0/

Cygwin 用 Patch

GitHub - cygwinports/pulseaudio: Cygwin pulseaudio packaging
https://github.com/cygwinports/pulseaudio

Tree - rpms/pulseaudio - src.fedoraproject.org
https://src.fedoraproject.org/rpms/pulseaudio/tree/master

0084-sink-source-Don-t-finish-move-if-unlink-happens-afte.patch - Tree - rpms/pulseaudio - src.fedoraproject.org
https://src.fedoraproject.org/rpms/pulseaudio/blob/f26/f/0084-sink-source-Don-t-finish-move-if-unlink-happens-afte.patch

pulseaudio/pulseaudio.cygport at master · cygwinports/pulseaudio · GitHub
https://github.com/cygwinports/pulseaudio/blob/master/pulseaudio.cygport
※ Patch の適用順はこちらにならいました。

上のパッチを小改変し freedesktop.org の PulseAudio Current(version 13.0)に当て、ビルドを通します。改変の詳細は後ろの節で解説します。

既存の PulseAudio の削除

Cygwin64Terminalから以下を実行
apt-cyg remove libpulse-devel libpulse-doc libpulse-mainloop-glib0 libpulse-simple0 libpulse0 pulseaudio pulseaudio-debuginfo pulseaudio-equalizer pulseaudio-esound-compat pulseaudio-module-gconf pulseaudio-module-x11 pulseaudio-module-zeroconf pulseaudio-utils vala-libpulse

MAN/INFOPAGE

 
apt-cyg/README.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/README.md

参考とした文献

参考とした文献

 
pulseaudio/pulseaudio.cygport at master · cygwinports/pulseaudio · GitHub
https://github.com/cygwinports/pulseaudio/blob/master/pulseaudio.cygport
※ Cygwin 版の削除の為、PulseAudio 11.1 のソースから構築される一連のパッケージを確認しました。

基本的なビルド環境の構築

Cygwin64Terminalから以下を実行
apt-cyg install autoconf automake binutils bison file file-devel findutils flex gawk gcc-ada gcc-fortran gcc-g++ gcc-objc gcc-objc++ gettext gettext-devel grep groff gzip libtool m4 make patch pkgconf libpkgconf-devel sed texinfo util-linux which

MAN/INFOPAGE

 
apt-cyg/README.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/README.md

apt-cyg install cygportで cygport が依存する開発パッケージ群を一括インストールするのが簡単かもしれません。

参考とした文献

参考とした文献

 
[cygwin] w3m 0.5.3-2のコンパイル
http://serian.hatenablog.com/entry/20121213/p1
※ コマンド autopoint はパッケージ gettext-devel に含まれているそうです。これがないと bootstrap.sh や autogen.sh の実行に失敗するようです。
 
Arch Linux - base-devel (x86_64) - Group Details
https://www.archlinux.org/groups/x86_64/base-devel/
 
cygport/README at master · cygwinports/cygport · GitHub
https://github.com/cygwinports/cygport/blob/master/README

構築依存のインストール

Cygwin64Terminalから以下を実行
apt-cyg install libogg-devel flac-devel libvorbis-devel libsndfile-devel xmltoman

MAN/INFOPAGE

 
apt-cyg/README.md at master · kou1okada/apt-cyg · GitHub
https://github.com/kou1okada/apt-cyg/blob/master/README.md

ソースのダウンロード

Cygwin64Terminalから以下を実行
cd
test -d $HOME/Downloads || mkdir Downloads
cd $HOME/Downloads/
git clone git://anongit.freedesktop.org/pulseaudio/pulseaudio

MAN/INFOPAGE

Patch の編集と適用

Patch のダウンロード

Cygwin64Terminalから以下を実行
mkdir -p $HOME/Downloads/pulseaudio-cygwin-patch
cd $HOME/Downloads/pulseaudio-cygwin-patch
git clone https://github.com/cygwinports/pulseaudio.git
cd pulseaudio
curl -LO http://pkgs.fedoraproject.org/cgit/rpms/pulseaudio.git/plain/pulseaudio-autostart.patch
curl -LO http://pkgs.fedoraproject.org/cgit/rpms/pulseaudio.git/plain/pulseaudio-9.0-disable_flat_volumes.patch
curl -LO https://src.fedoraproject.org/rpms/pulseaudio/raw/f26/f/0084-sink-source-Don-t-finish-move-if-unlink-happens-afte.patch
chmod -x *.patch

MAN/INFOPAGE

Patch の編集

Patch 編集の詳細を例に nanovi 等で2.1-cygwin-pulsedsp.patch及び7.1-cygwin-proc.patchを修正します。

Patch の適用

Cygwin64Terminalから以下を実行
cd $HOME/Downloads/pulseaudio
patch -p1 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/pulseaudio-autostart.patch
#patch -p1 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/pulseaudio-9.0-disable_flat_volumes.patch # 上流で修正済みにつき不要
#patch -p1 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/0084-sink-source-Don-t-finish-move-if-unlink-happens-afte.patch # 上流で修正済みにつき不要
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/4.0-no-undefined.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/5.0-soext.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/5.0-cygwin-compile.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/1.1-cygwin-mutex.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/1.1-cygwin-no-consolekit.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/7.1-cygwin-no-rtp.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/1.1-cygwin-waveout.patch
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/2.1-cygwin-pulsedsp.patch # 要修正
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/7.1-cygwin-proc.patch # 要修正
#patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/5.0-intltool-gettext.patch # 上流で修正済みにつき不要
patch -p2 <$HOME/Downloads/pulseaudio-cygwin-patch/pulseaudio/7.1-cygwin-config.patch

MAN/INFOPAGE

bootstrap.sh と configure の実行(最小構成)

動作に必要な最低限のみ有効化する場合のビルドオプションの例。

Cygwin64Terminalから以下を実行
./bootstrap.sh
make distclean
mkdir build && cd build
../configure --without-caps --disable-rpath --disable-memfd --disable-x11 --disable-oss-output --disable-oss-wrapper --disable-esound --disable-alsa --disable-coreaudio-output --disable-solaris --enable-waveout --disable-glib2 --disable-gtk3 --disable-gconf --disable-gsettings --disable-avahi --disable-jack --disable-asyncns --disable-lirc --disable-dbus --disable-bluez5 --disable-bluez5-ofono-headset --disable-bluez5-native-headset --disable-udev --disable-hal-compat --disable-systemd-daemon --disable-systemd-login --disable-systemd-journal --disable-tcpwrap --disable-samplerate --disable-ipv6 --disable-openssl --without-fftw --disable-orc --enable-adrian-aec --without-speex --without-soxr --disable-webrtc-aec --disable-gstreamer --disable-gcov --disable-tests --with-database=simple --disable-per-user-esound-socket --disable-legacy-database-entry-format ac_cv_header_windows_h=no ac_cv_header_winsock2_h=no ac_cv_header_ws2tcpip_h=no --prefix=/usr/local

MAN/INFOPAGE

configure --help
../configure --help
`configure' configures pulseaudio 13.0-28-ga17c-dirty to adapt to many kinds of systems.

Usage: ../configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/pulseaudio]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --disable-maintainer-mode
                          disable make rules and dependencies not useful (and
                          sometimes confusing) to the casual installer
  --enable-dependency-tracking
                          do not reject slow dependency extractors
  --disable-dependency-tracking
                          speeds up one-time build
  --disable-nls           do not use Native Language Support
  --disable-rpath         do not hardcode runtime library paths
  --disable-atomic-arm-linux-helpers
                          use inline asm or libatomic_ops instead
  --enable-atomic-arm-memory-barrier
                          only really needed in SMP arm systems
  --enable-neon-opt       Enable NEON optimisations on ARM CPUs that support
                          it
  --enable-static[=PKGS]  build static libraries [default=no]
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --disable-largefile     omit support for large files
  --disable-memfd         Disable Linux memfd shared memory
  --disable-x11           Disable optional X11 support
  --disable-tests         Disable unit tests
  --enable-samplerate     Enable optional libsamplerate support (DEPRECATED)
  --disable-oss-output    Disable optional OSS output support
  --disable-oss-wrapper   Disable optional OSS wrapper support
  --disable-coreaudio-output
                          Disable optional CoreAudio output support
  --disable-alsa          Disable optional ALSA support
  --disable-esound        Disable optional EsounD support
  --disable-solaris       Disable optional Solaris audio support
  --disable-waveout       Disable optional WaveOut audio support
  --disable-glib2         Disable optional GLib 2 support
  --disable-gtk3          Disable optional Gtk+ 3 support
  --disable-gsettings     Disable optional GSettings support
  --disable-gconf         Disable optional GConf support
  --disable-avahi         Disable optional Avahi support
  --disable-jack          Disable optional JACK support
  --disable-asyncns       Disable optional Async DNS support
  --disable-running-from-build-tree
                          Disable running from build tree
  --disable-tcpwrap       Disable optional TCP wrappers support
  --disable-lirc          Disable optional LIRC support
  --disable-dbus          Disable optional D-Bus support
  --disable-bluez5        Disable optional BlueZ 5 support
  --disable-bluez5-ofono-headset
                          Disable optional ofono headset backend support
                          (Bluez 5)
  --disable-bluez5-native-headset
                          Disable optional native headset backend support
                          (Bluez 5)
  --disable-udev          Disable optional UDEV support
  --disable-hal-compat    Disable optional HAL->udev transition compatibility
                          support
  --disable-ipv6          Disable optional IPv6 support
  --disable-openssl       Disable OpenSSL support (used for Airtunes/RAOP)
  --enable-gcov           Enable optional gcov coverage analysis
  --enable-orc            use Orc if installed
  --disable-systemd-daemon
                          Disable optional systemd daemon (socket activation)
                          support
  --disable-systemd-login Disable optional systemd login support
  --disable-systemd-journal
                          Disable optional systemd journal support
  --disable-gstreamer     Disable optional GStreamer-based RTP support
  --disable-manpages      Disable building and installation of man pages
  --disable-per-user-esound-socket
                          Use global esound socket directory /tmp/.esd/socket.
  --enable-mac-universal  Build Mac universal binaries
  --enable-webrtc-aec     Enable the optional WebRTC-based echo canceller
  --enable-adrian-aec     Enable Adrian's optional echo canceller
  --disable-default-build-tests
                          Build test programs only during make check
  --disable-legacy-database-entry-format
                          Try to load legacy (< 1.0) database files (card,
                          device and volume restore).
  --enable-static-bins    Statically link executables.
  --enable-force-preopen  Preopen modules, even when dlopen() is supported.

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
  --without-libiconv-prefix     don't search for libiconv in includedir and libdir
  --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
  --without-libintl-prefix     don't search for libintl in includedir and libdir
  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                          both]
  --with-aix-soname=aix|svr4|both
                          shared library versioning (aka "SONAME") variant to
                          provide on AIX, [default=aix].
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
                          compiler's sysroot if not specified).
  --without-caps          Omit support for dropping capabilities.
  --with-database=auto|tdb|gdbm|simple
                          Choose database backend.
  --with-pulsedsp-location
                          Specify location where OSS wrapper will be installed
  --without-fftw          Omit FFTW-using modules (equalizer)
  --without-speex         Omit speex (resampling, AEC)
  --without-soxr          Omit soxr (resampling)
  --with-systemduserunitdir=DIR
                          Directory for systemd user service files
  --with-system-user=<user>
                          User for running the PulseAudio daemon as a
                          system-wide instance (pulse)
  --with-system-group=<group>
                          Group for running the PulseAudio daemon as a
                          system-wide instance (pulse)
  --with-access-group=<group>
                          Group which is allowed access to a system-wide
                          PulseAudio daemon (pulse-access)
  --with-mac-version-min=<version>
                          Defines the earliest version of MacOS X that the
                          executables will run on.
  --with-mac-sysroot=<path>
                          SDK basedir to use as the logical root directory for
                          headers and libraries.
  --with-preopen-mods     Modules to preopen in daemon (default: all).
  --with-module-dir       Directory where to install the modules to (defaults
                          to ${libdir}/pulse-${PA_MAJORMINOR}/modules
  --with-udev-rules-dir   Directory where to install udev rules to (defaults
                          to /lib/udev/rules.d)
  --with-bash-completion-dir=DIR
                          Directory for bash completion files
  --with-zsh-completion-dir
                          Zsh completions directory (defaults to
                          ${datadir}/zsh/site-functions)

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CPP         C preprocessor
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  LT_SYS_LIBRARY_PATH
              User-defined run-time library search path.
  CXXCPP      C++ preprocessor
  X11_CFLAGS  C compiler flags for X11, overriding pkg-config
  X11_LIBS    linker flags for X11, overriding pkg-config
  LIBCHECK_CFLAGS
              C compiler flags for LIBCHECK, overriding pkg-config
  LIBCHECK_LIBS
              linker flags for LIBCHECK, overriding pkg-config
  LIBSNDFILE_CFLAGS
              C compiler flags for LIBSNDFILE, overriding pkg-config
  LIBSNDFILE_LIBS
              linker flags for LIBSNDFILE, overriding pkg-config
  LIBSAMPLERATE_CFLAGS
              C compiler flags for LIBSAMPLERATE, overriding pkg-config
  LIBSAMPLERATE_LIBS
              linker flags for LIBSAMPLERATE, overriding pkg-config
  TDB_CFLAGS  C compiler flags for TDB, overriding pkg-config
  TDB_LIBS    linker flags for TDB, overriding pkg-config
  ASOUNDLIB_CFLAGS
              C compiler flags for ASOUNDLIB, overriding pkg-config
  ASOUNDLIB_LIBS
              linker flags for ASOUNDLIB, overriding pkg-config
  GLIB20_CFLAGS
              C compiler flags for GLIB20, overriding pkg-config
  GLIB20_LIBS linker flags for GLIB20, overriding pkg-config
  GTK30_CFLAGS
              C compiler flags for GTK30, overriding pkg-config
  GTK30_LIBS  linker flags for GTK30, overriding pkg-config
  GSETTINGS_CFLAGS
              C compiler flags for GSETTINGS, overriding pkg-config
  GSETTINGS_LIBS
              linker flags for GSETTINGS, overriding pkg-config
  GCONF_CFLAGS
              C compiler flags for GCONF, overriding pkg-config
  GCONF_LIBS  linker flags for GCONF, overriding pkg-config
  AVAHI_CFLAGS
              C compiler flags for AVAHI, overriding pkg-config
  AVAHI_LIBS  linker flags for AVAHI, overriding pkg-config
  JACK_CFLAGS C compiler flags for JACK, overriding pkg-config
  JACK_LIBS   linker flags for JACK, overriding pkg-config
  LIBASYNCNS_CFLAGS
              C compiler flags for LIBASYNCNS, overriding pkg-config
  LIBASYNCNS_LIBS
              linker flags for LIBASYNCNS, overriding pkg-config
  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
  SBC_CFLAGS  C compiler flags for SBC, overriding pkg-config
  SBC_LIBS    linker flags for SBC, overriding pkg-config
  BLUEZ_CFLAGS
              C compiler flags for BLUEZ, overriding pkg-config
  BLUEZ_LIBS  linker flags for BLUEZ, overriding pkg-config
  UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config
  UDEV_LIBS   linker flags for UDEV, overriding pkg-config
  OPENSSL_CFLAGS
              C compiler flags for OPENSSL, overriding pkg-config
  OPENSSL_LIBS
              linker flags for OPENSSL, overriding pkg-config
  FFTW_CFLAGS C compiler flags for FFTW, overriding pkg-config
  FFTW_LIBS   linker flags for FFTW, overriding pkg-config
  LIBSPEEX_CFLAGS
              C compiler flags for LIBSPEEX, overriding pkg-config
  LIBSPEEX_LIBS
              linker flags for LIBSPEEX, overriding pkg-config
  LIBSOXR_CFLAGS
              C compiler flags for LIBSOXR, overriding pkg-config
  LIBSOXR_LIBS
              linker flags for LIBSOXR, overriding pkg-config
  ORC_CFLAGS  C compiler flags for ORC, overriding pkg-config
  ORC_LIBS    linker flags for ORC, overriding pkg-config
  SYSTEMD_CFLAGS
              C compiler flags for SYSTEMD, overriding pkg-config
  SYSTEMD_LIBS
              linker flags for SYSTEMD, overriding pkg-config
  SYSTEMDDAEMON_CFLAGS
              C compiler flags for SYSTEMDDAEMON, overriding pkg-config
  SYSTEMDDAEMON_LIBS
              linker flags for SYSTEMDDAEMON, overriding pkg-config
  SYSTEMDLOGIN_CFLAGS
              C compiler flags for SYSTEMDLOGIN, overriding pkg-config
  SYSTEMDLOGIN_LIBS
              linker flags for SYSTEMDLOGIN, overriding pkg-config
  SYSTEMDJOURNAL_CFLAGS
              C compiler flags for SYSTEMDJOURNAL, overriding pkg-config
  SYSTEMDJOURNAL_LIBS
              linker flags for SYSTEMDJOURNAL, overriding pkg-config
  GSTREAMER_CFLAGS
              C compiler flags for GSTREAMER, overriding pkg-config
  GSTREAMER_LIBS
              linker flags for GSTREAMER, overriding pkg-config
  WEBRTC_CFLAGS
              C compiler flags for WEBRTC, overriding pkg-config
  WEBRTC_LIBS linker flags for WEBRTC, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <pulseaudio-discuss (at) lists (dot) freedesktop (dot) org>.
pulseaudio home page: <http://pulseaudio.org/>.

configure 実行結果
$ ../configure --without-caps --disable-rpath --disable-memfd --disable-x11 --disable-oss-output --disable-oss-wrapper --disable-esound --disable-alsa --disable-coreaudio-output --disable-solaris --enable-waveout --disable-glib2 --disable-gtk3 --disable-gconf --disable-gsettings --disable-avahi --disable-jack --disable-asyncns --disable-lirc --disable-dbus --disable-bluez5 --disable-bluez5-ofono-headset --disable-bluez5-native-headset --disable-udev --disable-hal-compat --disable-systemd-daemon --disable-systemd-login --disable-systemd-journal --disable-tcpwrap --disable-samplerate --disable-ipv6 --disable-openssl --without-fftw --disable-orc --enable-adrian-aec --without-speex --without-soxr --disable-webrtc-aec --disable-gstreamer --disable-gcov --disable-tests --with-database=simple --disable-per-user-esound-socket --disable-legacy-database-entry-format ac_cv_header_windows_h=no ac_cv_header_winsock2_h=no ac_cv_header_ws2tcpip_h=no --prefix=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '197609' is supported by ustar format... yes
checking whether GID '197121' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-pc-cygwin
checking for stow... no
checking whether make supports nested variables... (cached) yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether g++ supports C++11 features by default... yes
checking for gm4... no
checking for m4... m4
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
checking for iconv... no, consider installing GNU libiconv
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl
checking host operating system... unknown
checking whether C compiler accepts -std=gnu11... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -W... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -pipe... yes
checking whether C compiler accepts -Wno-long-long... yes
checking whether C compiler accepts -Wno-overlength-strings... yes
checking whether C compiler accepts -Wunsafe-loop-optimizations... yes
checking whether C compiler accepts -Wundef... yes
checking whether C compiler accepts -Wformat=2... yes
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wsign-compare... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wmissing-include-dirs... yes
checking whether C compiler accepts -Wformat-nonliteral... yes
checking whether C compiler accepts -Wold-style-definition... no
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wdeclaration-after-statement... yes
checking whether C compiler accepts -Wfloat-equal... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wstrict-prototypes... no
checking whether C compiler accepts -Wredundant-decls... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wmissing-noreturn... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wendif-labels... yes
checking whether C compiler accepts -Wcast-align... yes
checking whether C compiler accepts -Wstrict-aliasing... yes
checking whether C compiler accepts -Wwrite-strings... yes
checking whether C compiler accepts -Wno-unused-parameter... yes
checking whether C compiler accepts -fno-common... yes
checking whether C compiler accepts -fdiagnostics-show-option... yes
checking whether C compiler accepts -fdiagnostics-color=auto... yes
checking whether the linker accepts "-Wl,-version-script=../src/map-file"... yes
checking whether the linker accepts -Wl,-z,now... no
checking whether the linker accepts -Wl,-z,nodelete... no
checking whether the linker accepts -Wl,--no-undefined... yes
checking whether gcc knows __atomic_store_n()... yes
checking whether gcc knows __sync_bool_compare_and_swap()... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-pc-cygwin file names to x86_64-pc-cygwin format... func_convert_file_noop
checking how to convert x86_64-pc-cygwin file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-pc-cygwin/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/x86_64-pc-cygwin/bin/ld.exe
checking if the linker (/usr/x86_64-pc-cygwin/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/x86_64-pc-cygwin/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking ltdl.h usability... yes
checking ltdl.h presence... yes
checking for ltdl.h... yes
checking for lt_dladvise_init in -lltdl... yes
checking for ANSI C header files... (cached) yes
checking for arpa/inet.h... yes
checking for cpuid.h... yes
checking for glob.h... yes
checking for grp.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/tcp.h... yes
checking for poll.h... yes
checking for pwd.h... yes
checking for sched.h... yes
checking for sys/mman.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/wait.h... yes
checking for sys/uio.h... yes
checking for syslog.h... yes
checking for sys/dl.h... no
checking for dlfcn.h... (cached) yes
checking for linux/sockios.h... no
checking for sys/prctl.h... no
checking for sys/conf.h... no
checking for sys/filio.h... no
checking for windows.h... (cached) no
checking for winsock2.h... (cached) no
checking for ws2tcpip.h... (cached) no
checking for sys/atomic.h... no
checking for sys/ioctl.h... yes
checking for byteswap.h... yes
checking for sys/syscall.h... no
checking for sys/eventfd.h... no
checking for execinfo.h... no
checking for langinfo.h... yes
checking for regex.h... yes
checking for pcreposix.h... no
checking for locale.h... yes
checking for xlocale.h... yes
checking for valgrind/memcheck.h... no
checking for netinet/ip.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking linux/input.h usability... no
checking linux/input.h presence... no
checking for linux/input.h... no
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for off_t... yes
checking for uid_t in sys/types.h... yes
checking whether environ is declared... yes
checking size of void*... 8
checking whether __x86_64__ is declared... yes
checking for SIGXCPU defined in signal.h... yes
checking for INADDR_NONE defined in netinet/in.h... yes
checking whether gcc knows _Bool... yes
checking for library containing pow... none required
checking for library containing sched_setscheduler... none required
checking for library containing dlopen... none required
checking for library containing shm_open... none required
checking for library containing inet_ntop... none required
checking for library containing timer_create... none required
checking for library containing pthread_setaffinity_np... no
checking for library containing pthread_getname_np... none required
checking for library containing pthread_setname_np... none required
checking for library containing connect... none required
checking for library containing backtrace... no
checking for library containing regexec... none required
checking for getopt_long... yes
checking for lrintf... yes
checking for strtof... yes
checking for chmod... yes
checking for chown... yes
checking for fstat... yes
checking for fchown... yes
checking for fchmod... yes
checking for clock_gettime... yes
checking for getaddrinfo... yes
checking for getgrgid_r... yes
checking for getgrnam_r... yes
checking for getpwnam_r... yes
checking for getpwuid_r... yes
checking for gettimeofday... yes
checking for getuid... yes
checking for mlock... yes
checking for nanosleep... yes
checking for pipe... yes
checking for posix_fadvise... yes
checking for posix_madvise... yes
checking for posix_memalign... yes
checking for setpgid... yes
checking for setsid... yes
checking for shm_open... yes
checking for sigaction... yes
checking for sleep... yes
checking for symlink... yes
checking for sysconf... yes
checking for uname... yes
checking for pthread_setaffinity_np... no
checking for pthread_getname_np... yes
checking for pthread_setname_np... yes
checking for readlink... yes
checking for ctime_r... yes
checking for usleep... yes
checking for strerror_r... yes
checking for lstat... yes
checking for paccept... no
checking for setresuid... no
checking for setresgid... no
checking for setreuid... yes
checking for setregid... yes
checking for seteuid... yes
checking for setegid... yes
checking for ppoll... yes
checking for strsignal... yes
checking for sig2str... no
checking for strtod_l... yes
checking for pipe2... yes
checking for accept4... yes
checking for open64... no
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking type of array argument to getgroups... gid_t
checking for getgroups... yes
checking for working getgroups... yes
checking for mkfifo... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for regexec... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for library containing dladdr... none required
checking for iconv... (cached) no, consider installing GNU libiconv
checking for LIBSNDFILE... yes
checking whether we need libatomic_ops... no
checking for mmsystem.h... yes
checking for thread local storage (TLS) class... __thread
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating libpulse.pc
config.status: creating libpulse-simple.pc
config.status: creating libpulse-mainloop-glib.pc
config.status: creating doxygen/Makefile
config.status: creating doxygen/doxygen.conf
config.status: creating src/pulse/version.h
config.status: creating po/Makefile.in
config.status: creating man/pulseaudio.1.xml
config.status: creating man/pax11publish.1.xml
config.status: creating man/pacat.1.xml
config.status: creating man/pacmd.1.xml
config.status: creating man/pactl.1.xml
config.status: creating man/pasuspender.1.xml
config.status: creating man/padsp.1.xml
config.status: creating man/pulse-daemon.conf.5.xml
config.status: creating man/pulse-client.conf.5.xml
config.status: creating man/default.pa.5.xml
config.status: creating man/pulse-cli-syntax.5.xml
config.status: creating man/start-pulseaudio-x11.1.xml
config.status: creating src/start-pulseaudio-x11
config.status: creating src/client.conf
config.status: creating src/daemon.conf
config.status: creating src/default.pa
config.status: creating src/system.pa
config.status: creating PulseAudioConfig.cmake
config.status: creating PulseAudioConfigVersion.cmake
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing libtool commands

 ---{ pulseaudio 13.0-28-ga17c-dirty }---

    prefix:                        /usr/local
    sysconfdir:                    ${prefix}/etc
    localstatedir:                 ${prefix}/var
    modlibexecdir:                 ${exec_prefix}/lib/pulse-13.0/modules
    System Runtime Path:           /usr/local/var/run/pulse
    System State Path:             /usr/local/var/lib/pulse
    System Config Path:            /usr/local/var/lib/pulse
    Zsh completions directory:     ${datarootdir}/zsh/site-functions
    Bash completions directory:    ${datarootdir}/bash-completion/completions
    Compiler:                      gcc
    CFLAGS:                        -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
    CPPFLAGS:                       -DFASTPATH -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
    LIBS:

    Enable memfd shared memory:    no
    Enable X11:                    no
    Enable OSS Output:             no
    Enable OSS Wrapper:            no
    Enable EsounD:                 no
    Enable Alsa:                   no
    Enable CoreAudio:              no
    Enable Solaris:                no
    Enable WaveOut:                yes
    Enable GLib 2.0:               no
    Enable Gtk+ 3.0:               no
    Enable GConf:                  no
    Enable GSettings:              no
    Enable Avahi:                  no
    Enable Jack:                   no
    Enable Async DNS:              no
    Enable LIRC:                   no
    Enable D-Bus:                  no
      Enable BlueZ 5:              no
        Enable ofono headsets:     no
        Enable native headsets:    no
    Enable udev:                   no
      Enable HAL->udev compat:     no
    Enable systemd
      Daemon (Socket Activation):  no
      Login (Session Tracking):    no
      Journal (Logging):           no
    Enable TCP Wrappers:           no
    Enable libsamplerate:          no
    Enable IPv6:                   no
    Enable OpenSSL (for Airtunes): no
    Enable fftw:                   no
    Enable orc:                    no
    Enable Adrian echo canceller:  yes
    Enable speex (resampler, AEC): no
    Enable soxr (resampler):       no
    Enable WebRTC echo canceller:  no
    Enable GStreamer-based RTP:    no
    Enable gcov coverage:          no
    Enable unit tests:             no
    Database
      tdb:                         no
      gdbm:                        no
      simple database:             yes

    System User:                   pulse
    System Group:                  pulse
    Access Group:                  pulse-access
    Enable per-user EsounD socket: no
    Force preopen:                 no
    Preopened modules:             all

    Legacy Database Entry Support: no


===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
You do not have D-Bus support enabled. It is strongly recommended
that you enable D-Bus support if your platform supports it.
Many parts of PulseAudio use D-Bus, from ConsoleKit interaction
to the Device Reservation Protocol to speak to JACK, Bluetooth
support and even a native control protocol for communicating and
controlling the PulseAudio daemon itself.
===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====


===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
You do not have udev support enabled. It is strongly recommended
that you enable udev support if your platform supports it as it is
the primary method used to detect hardware audio devices (on Linux)
and is thus a critical part of PulseAudio on that platform.
===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====


===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====
You do not have speex support enabled. It is strongly recommended
that you enable speex support if your platform supports it as it is
the primary method used for audio resampling and is thus a critical
part of PulseAudio on that platform.
===== WARNING WARNING WARNING WARNING WARNING WARNING WARNING =====


--prefix=/usr/localとしています。Cygwin のパッケージ管理システムと整合性を持たせたい場合、pulseaudio.cygport の修正と cygport コマンドによるビルドで対応しましょう。

参考:configure のオプションと機能の対応関係

    Enable memfd shared memory:    no       --disable-memfd
    Enable X11:                    no       --disable-x11
    Enable OSS Output:             no       --disable-oss-output
    Enable OSS Wrapper:            no       --disable-oss-wrapper
    Enable EsounD:                 no       --disable-esound
    Enable Alsa:                   no       --disable-alsa
    Enable CoreAudio:              no       --disable-coreaudio-output
    Enable Solaris:                no       --disable-solaris
    Enable WaveOut:                yes      --enable-waveout #enable
    Enable GLib 2.0:               no       --disable-glib2
    Enable Gtk+ 3.0:               no       --disable-gtk3
    Enable GConf:                  no       --disable-gconf
    Enable GSettings:              no       --disable-gsettings
    Enable Avahi:                  no       --disable-avahi
    Enable Jack:                   no       --disable-jack
    Enable Async DNS:              no       --disable-asyncns
    Enable LIRC:                   no       --disable-lirc
    Enable D-Bus:                  no       --disable-dbus
      Enable BlueZ 5:              no       --disable-bluez5
        Enable ofono headsets:     no       --disable-bluez5-ofono-headset
        Enable native headsets:    no       --disable-bluez5-native-headset
    Enable udev:                   no       --disable-udev
      Enable HAL->udev compat:     no       --disable-hal-compat
    Enable systemd
      Daemon (Socket Activation):  no       --disable-systemd-daemon
      Login (Session Tracking):    no       --disable-systemd-login
      Journal (Logging):           no       --disable-systemd-journal
    Enable TCP Wrappers:           no       --disable-tcpwrap
    Enable libsamplerate:          no       --disable-samplerate
    Enable IPv6:                   no       --disable-ipv6
    Enable OpenSSL (for Airtunes): no       --disable-openssl
    Enable fftw:                   no       --without-fftw
    Enable orc:                    no       --disable-orc
    Enable Adrian echo canceller:  yes      --enable-adrian-aec #enable
    Enable speex (resampler, AEC): no       --without-speex
    Enable soxr (resampler):       no       --without-soxr
    Enable WebRTC echo canceller:  no       --disable-webrtc-aec
    Enable GStreamer-based RTP:    no       --disable-gstreamer
    Enable gcov coverage:          no       --disable-gcov
    Enable unit tests:             no       --disable-tests
    Database
      tdb:                         no
      gdbm:                        no
      simple database:             yes      --with-database=simple #enable

    System User:                   pulse
    System Group:                  pulse
    Access Group:                  pulse-access
    Enable per-user EsounD socket: no       --disable-per-user-esound-socket
    Force preopen:                 no
    Preopened modules:             all

    Legacy Database Entry Support: no       --disable-legacy-database-entry-format

比較:Cygwin 版 PulseAudio 11.1 の依存パッケージ

apt-cyg install pulseaudio実行時のメッセージより引用。

Package pulseaudio requires the following packages, installing:

cygwin libX11-xcb1 libX11_6 libdbus1_3 libgcc1 libltdl7 liborc0.4_0 libpulse0 libsndfile1 libsoxr0 libspeexdsp1 libstdc++6 libtdb1 libwebrtc-audio-processing1 libxcb1

ビルド及びインストール

Cygwin64Terminalから以下を実行
make -j$(grep processor /proc/cpuinfo | wc -l)
make install
cp /usr/local/lib/bin/*.dll /usr/local/bin/
cp /usr/local/lib/pulse-13.0/bin/*.dll /usr/local/bin/

MAN/INFOPAGE

参考とした文献

参考とした文献

 
物理 CPU、CPU コア、および論理 CPU の数を確認する - Red Hat Customer Portal
https://access.redhat.com/ja/solutions/2159401

起動

Cygwin64Terminalから以下を実行
pulseaudio --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1

MAN/INFOPAGE

アンインストール

Cygwin64Terminalから以下を実行
for i in $(find /usr/local/lib/bin/*.dll); do rm /usr/local/bin/$(basename $i); done
for i in $(find /usr/local/lib/pulse-13.0/bin/*.dll); do rm /usr/local/bin/$(basename $i); done
unset i
cd $HOME/Downloads/pulseaudio/build
make uninstall
rm -r "/usr/local/lib/pulse-13.0"

MAN/INFOPAGE

Patch 編集の詳細

上流にマージされ不要になったと思われる Patch

pulseaudio-9.0-disable_flat_volumes.patch
0084-sink-source-Don-t-finish-move-if-unlink-happens-afte.patch
5.0-intltool-gettext.patch

当てるために一部改変が必要な Patch

2.1-cygwin-pulsedsp.patch

Reject された Patch
padsp.c.rej
@@ -2357,7 +2366,7 @@ fail:
     return ret;
 }

-#ifdef sun
+#if defined(sun) || defined(__CYGWIN__)
 int ioctl(int fd, int request, ...) {
 #else
 int ioctl(int fd, unsigned long request, ...) {
現行の src/utils/padsp.c における標的箇所
src/utils/padsp.c
    return ret;
}

#ifndef __GLIBC__
int ioctl(int fd, int request, ...) {
#else
int ioctl(int fd, unsigned long request, ...) {
Patch 改変例

「__GLIBC__ が定義されていない、または __CYGWIN__ が定義されているならば真」なので、こんな感じで良いはず。

2.1-cygwin-pulsedsp-modified.patch
@@ -2357,7 +2366,7 @@ fail:
     return ret;
 }

-#ifndef __GLIBC__
+#if !defined(__GLIBC__) || defined(__CYGWIN__)
 int ioctl(int fd, int request, ...) {
 #else
 int ioctl(int fd, unsigned long request, ...) {

7.1-cygwin-proc.patch

Reject された Patch
core-util.c.rej
--- src/pulsecore/core-util.c   2015-10-30 07:14:56.000000000 -0500
+++ src/pulsecore/core-util.c   2015-12-29 12:57:23.105710200 -0600
@@ -2691,7 +2691,7 @@ int pa_close_allv(const int except_fds[]
     struct rlimit rl;
     int maxfd, fd;

-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
     int saved_errno;
     DIR *d;
現行のsrc/pulsecore/core-util.c における標的箇所
src/pulsecore/core-util.c
    struct rlimit rl;
    int maxfd, fd;

#if defined(__linux__) || defined(__sun)
    int saved_errno;
    DIR *d;

Patch 改変例

c で「a または b または c」って書き方は許されるのかな?上のコードなら「(a or b) or c」でも「a or (b or c)」でも実害は無いように思えます 2

7.1-cygwin-proc-modified.patch
--- src/pulsecore/core-util.c   2015-10-30 07:14:56.000000000 -0500
+++ src/pulsecore/core-util.c   2015-12-29 12:57:23.105710200 -0600
@@ -2691,7 +2691,7 @@ int pa_close_allv(const int except_fds[]
     struct rlimit rl;
     int maxfd, fd;

-#if defined(__linux__) || defined(__sun)
+#if defined(__linux__) || defined(__sun) || defined(__CYGWIN__)
     int saved_errno;
     DIR *d;

とりあえず Patch の側を手直しして当てました。

今回は「PulseAudio のソースをきちんと読んでいない=全体としての整合性を考慮出来ていない」状態での改変なので、不具合が出たらごめんなさい。

参考とした文献

参考とした文献

 
C言語のdefineについて
http://www.c-lang.org/define.html
 
C言語の演算子について
http://www.c-lang.org/operator.html

cygport:Cygwin の Ports ライクなソースコード管理システム

Cygwin Ports
http://cygwinports.org/

Cygwin Packages -- Packaging sources for Cygwin distribution packages · GitHub
https://github.com/cygwinports

cygport/README at master · cygwinports/cygport · GitHub
https://github.com/cygwinports/cygport/blob/master/README

Table of Contents
https://cygwinports.github.io/cygport/toc_index.html

Cygwin - cygport - PIB
https://seesaawiki.jp/w/kou1okada/d/Cygwin%20-%20cygport

cygport 再入門 - いけむランド
http://fd0.hatenablog.jp/entry/2014/01/26/002816

[cygwin] w3m 0.5.3-2のコンパイル
http://serian.hatenablog.com/entry/20121213/p1

おまけ:MinGW-W64 でのビルド不成功ログ

手を入れないとビルドが通らないっぽいです。

on ArchWSL

構築依存のインストール

構築依存のインストール
yay -S mingw-w64-libogg mingw-w64-flac mingw-w64-libvorbis mingw-w64-libsndfile

MAN/INFOPAGE

 
yay
https://github.com/Jguer/yay/blob/master/doc/yay.8
または、WSL から

curl -L https://raw.githubusercontent.com/Jguer/yay/master/doc/yay.8 | man -l -


x86_64-w64-mingw32-configure 実行結果
x86_64-w64-mingw32-configure
x86_64-w64-mingw32-configure --without-caps --disable-rpath --disable-memfd --disable-x11 --disable-oss-output --disable-oss-wrapper --disable-esound --disable-alsa --disable-coreaudio-output --disable-solaris --enable-waveout --disable-glib2 --disable-gtk3 --disable-gconf --disable-gsettings --disable-avahi --disable-jack --disable-asyncns --disable-lirc --disable-dbus --disable-bluez5 --disable-bluez5-ofono-headset --disable-bluez5-native-headset --disable-udev --disable-hal-compat --disable-systemd-daemon --disable-systemd-login --disable-systemd-journal --disable-tcpwrap --disable-samplerate --disable-ipv6 --disable-openssl --without-fftw --disable-orc --enable-adrian-aec --without-speex --without-soxr --disable-webrtc-aec --disable-gstreamer --disable-gcov --disable-tests --with-database=simple --disable-per-user-esound-socket --disable-legacy-database-entry-format --prefix=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
checking for a thread-safe mkdir -p... /usr/sbin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for stow... no
checking whether make supports nested variables... (cached) yes
checking whether ln -s works... yes
checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-w64-mingw32-gcc accepts -g... yes
checking for x86_64-w64-mingw32-gcc option to accept ISO C89... none needed
checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of x86_64-w64-mingw32-gcc... gcc3
checking for x86_64-w64-mingw32-g++... x86_64-w64-mingw32-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-w64-mingw32-g++ accepts -g... yes
checking dependency style of x86_64-w64-mingw32-g++... gcc3
checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -E
checking for grep that handles long lines and -e... /usr/sbin/grep
checking for egrep... /usr/sbin/grep -E
checking whether x86_64-w64-mingw32-gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether x86_64-w64-mingw32-g++ supports C++11 features by default... yes
checking for gm4... no
checking for m4... m4
checking for x86_64-w64-mingw32-pkg-config... /usr/sbin/x86_64-w64-mingw32-pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for a sed that does not truncate output... /usr/sbin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/sbin/msgfmt
checking for gmsgfmt... /usr/sbin/msgfmt
checking for xgettext... /usr/sbin/xgettext
checking for msgmerge... /usr/sbin/msgmerge
checking for ld used by x86_64-w64-mingw32-gcc... /usr/x86_64-w64-mingw32/bin/ld
checking if the linker (/usr/x86_64-w64-mingw32/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... no
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... /usr/x86_64-w64-mingw32/lib/libintl.dll.a
checking host operating system... win32
checking whether C compiler accepts -std=gnu11... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -W... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -pipe... yes
checking whether C compiler accepts -Wno-long-long... yes
checking whether C compiler accepts -Wno-overlength-strings... yes
checking whether C compiler accepts -Wunsafe-loop-optimizations... yes
checking whether C compiler accepts -Wundef... yes
checking whether C compiler accepts -Wformat=2... yes
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wsign-compare... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wmissing-include-dirs... yes
checking whether C compiler accepts -Wformat-nonliteral... yes
checking whether C compiler accepts -Wold-style-definition... no
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wdeclaration-after-statement... yes
checking whether C compiler accepts -Wfloat-equal... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wstrict-prototypes... no
checking whether C compiler accepts -Wredundant-decls... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wmissing-noreturn... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wendif-labels... yes
checking whether C compiler accepts -Wcast-align... yes
checking whether C compiler accepts -Wstrict-aliasing... yes
checking whether C compiler accepts -Wwrite-strings... yes
checking whether C compiler accepts -Wno-unused-parameter... yes
checking whether C compiler accepts -fno-common... yes
checking whether C compiler accepts -fdiagnostics-show-option... yes
checking whether C compiler accepts -fdiagnostics-color=auto... yes
checking whether the linker accepts "-Wl,-version-script=../src/map-file"... yes
checking whether the linker accepts -Wl,-z,now... no
checking whether the linker accepts -Wl,-z,nodelete... no
checking whether the linker accepts -Wl,--no-undefined... yes
checking whether x86_64-w64-mingw32-gcc knows __atomic_store_n()... yes
checking whether x86_64-w64-mingw32-gcc knows __sync_bool_compare_and_swap()... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/sbin/sed
checking for fgrep... /usr/sbin/grep -F
checking for ld used by x86_64-w64-mingw32-gcc... /usr/x86_64-w64-mingw32/bin/ld
checking if the linker (/usr/x86_64-w64-mingw32/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/sbin/x86_64-w64-mingw32-nm -B
checking the name lister (/usr/sbin/x86_64-w64-mingw32-nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-w64-mingw32 format... func_convert_file_nix_to_w32
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/x86_64-w64-mingw32/bin/ld option to reload object files... -r
checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
checking for archiver @FILE support... @
checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
checking command to parse /usr/sbin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/sbin/dd
checking how to truncate binary pipes... /usr/sbin/dd bs=4096 count=1
checking for x86_64-w64-mingw32-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... no
checking for x86_64-w64-mingw32-as... x86_64-w64-mingw32-as
checking for x86_64-w64-mingw32-dlltool... (cached) x86_64-w64-mingw32-dlltool
checking for x86_64-w64-mingw32-objdump... (cached) x86_64-w64-mingw32-objdump
checking for objdir... .libs
checking if x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if x86_64-w64-mingw32-gcc static flag -static works... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-w64-mingw32-gcc linker (/usr/x86_64-w64-mingw32/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... x86_64-w64-mingw32-g++ -E
checking for ld used by x86_64-w64-mingw32-g++... /usr/x86_64-w64-mingw32/bin/ld
checking if the linker (/usr/x86_64-w64-mingw32/bin/ld) is GNU ld... yes
checking whether the x86_64-w64-mingw32-g++ linker (/usr/x86_64-w64-mingw32/bin/ld) supports shared libraries... yes
checking for x86_64-w64-mingw32-g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if x86_64-w64-mingw32-g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if x86_64-w64-mingw32-g++ static flag -static works... yes
checking if x86_64-w64-mingw32-g++ supports -c -o file.o... yes
checking if x86_64-w64-mingw32-g++ supports -c -o file.o... (cached) yes
checking whether the x86_64-w64-mingw32-g++ linker (/usr/x86_64-w64-mingw32/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking ltdl.h usability... yes
checking ltdl.h presence... yes
checking for ltdl.h... yes
checking for lt_dladvise_init in -lltdl... yes
checking for ANSI C header files... (cached) yes
checking for arpa/inet.h... no
checking for cpuid.h... yes
checking for glob.h... no
checking for grp.h... no
checking for netdb.h... no
checking for netinet/in.h... no
checking for netinet/in_systm.h... no
checking for netinet/tcp.h... no
checking for poll.h... no
checking for pwd.h... no
checking for sched.h... yes
checking for sys/mman.h... no
checking for sys/select.h... no
checking for sys/socket.h... no
checking for sys/wait.h... no
checking for sys/uio.h... no
checking for syslog.h... no
checking for sys/dl.h... no
checking for dlfcn.h... (cached) no
checking for linux/sockios.h... no
checking for sys/prctl.h... no
checking for sys/conf.h... no
checking for sys/filio.h... no
checking for windows.h... yes
checking for winsock2.h... yes
checking for ws2tcpip.h... yes
checking for sys/atomic.h... no
checking for sys/ioctl.h... no
checking for byteswap.h... no
checking for sys/syscall.h... no
checking for sys/eventfd.h... no
checking for execinfo.h... no
checking for langinfo.h... no
checking for regex.h... no
checking for pcreposix.h... no
checking for locale.h... yes
checking for xlocale.h... no
checking for valgrind/memcheck.h... no
checking for netinet/ip.h... no
checking sys/resource.h usability... no
checking sys/resource.h presence... no
checking for sys/resource.h... no
checking sys/un.h usability... no
checking sys/un.h presence... no
checking for sys/un.h... no
checking linux/input.h usability... no
checking linux/input.h presence... no
checking for linux/input.h... no
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for off_t... yes
checking for uid_t in sys/types.h... no
checking whether environ is declared... yes
checking size of void*... 8
checking whether __x86_64__ is declared... yes
checking for SIGXCPU defined in signal.h... no
checking for INADDR_NONE defined in netinet/in.h... no
checking for INADDR_NONE defined in winsock2.h... yes
checking whether x86_64-w64-mingw32-gcc knows _Bool... yes
checking for library containing pow... none required
checking for library containing sched_setscheduler... none required
checking for library containing dlopen... no
checking for library containing shm_open... no
checking for library containing inet_ntop... no
checking for library containing timer_create... no
checking for library containing pthread_setaffinity_np... no
checking for library containing pthread_getname_np... none required
checking for library containing pthread_setname_np... none required
checking for library containing connect... no
checking for library containing backtrace... no
checking for library containing regexec... no
checking for getopt_long... yes
checking for lrintf... yes
checking for strtof... yes
checking for chmod... yes
checking for chown... no
checking for fstat... yes
checking for fchown... no
checking for fchmod... no
checking for clock_gettime... yes
checking for getaddrinfo... no
checking for getgrgid_r... no
checking for getgrnam_r... no
checking for getpwnam_r... no
checking for getpwuid_r... no
checking for gettimeofday... yes
checking for getuid... no
checking for mlock... no
checking for nanosleep... yes
checking for pipe... no
checking for posix_fadvise... no
checking for posix_madvise... no
checking for posix_memalign... no
checking for setpgid... no
checking for setsid... no
checking for shm_open... no
checking for sigaction... no
checking for sleep... yes
checking for symlink... no
checking for sysconf... no
checking for uname... no
checking for pthread_setaffinity_np... no
checking for pthread_getname_np... yes
checking for pthread_setname_np... yes
checking for readlink... no
checking for ctime_r... no
checking for usleep... yes
checking for strerror_r... no
checking for lstat... no
checking for paccept... no
checking for setresuid... no
checking for setresgid... no
checking for setreuid... no
checking for setregid... no
checking for seteuid... no
checking for setegid... no
checking for ppoll... no
checking for strsignal... no
checking for sig2str... no
checking for strtod_l... no
checking for pipe2... no
checking for accept4... no
checking for open64... no
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... no
checking for vfork... no
checking type of array argument to getgroups... int
checking for getgroups... no
checking for getgroups in -lbsd... no
checking for mkfifo... no
checking for working alloca.h... no
checking for alloca... yes
checking for regexec... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for library containing dladdr... no
checking for iconv... (cached) yes
checking for working iconv... (cached) no
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for LIBSNDFILE... yes
checking whether we need libatomic_ops... no
checking for mmsystem.h... yes
checking for thread local storage (TLS) class... __thread
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating libpulse.pc
config.status: creating libpulse-simple.pc
config.status: creating libpulse-mainloop-glib.pc
config.status: creating doxygen/Makefile
config.status: creating doxygen/doxygen.conf
config.status: creating src/pulse/version.h
config.status: creating po/Makefile.in
config.status: creating man/pulseaudio.1.xml
config.status: creating man/pax11publish.1.xml
config.status: creating man/pacat.1.xml
config.status: creating man/pacmd.1.xml
config.status: creating man/pactl.1.xml
config.status: creating man/pasuspender.1.xml
config.status: creating man/padsp.1.xml
config.status: creating man/pulse-daemon.conf.5.xml
config.status: creating man/pulse-client.conf.5.xml
config.status: creating man/default.pa.5.xml
config.status: creating man/pulse-cli-syntax.5.xml
config.status: creating man/start-pulseaudio-x11.1.xml
config.status: creating src/start-pulseaudio-x11
config.status: creating src/client.conf
config.status: creating src/daemon.conf
config.status: creating src/default.pa
config.status: creating src/system.pa
config.status: creating PulseAudioConfig.cmake
config.status: creating PulseAudioConfigVersion.cmake
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing libtool commands

 ---{ pulseaudio 13.0-28-ga17c }---

    prefix:                        /usr/local
    sysconfdir:                    ${prefix}/etc
    localstatedir:                 ${prefix}/var
    modlibexecdir:                 /usr/x86_64-w64-mingw32/lib/pulse-13.0/modules
    System Runtime Path:           /usr/local/var/run/pulse
    System State Path:             /usr/local/var/lib/pulse
    System Config Path:            /usr/local/var/lib/pulse
    Zsh completions directory:     ${datarootdir}/zsh/site-functions
    Bash completions directory:    ${datarootdir}/bash-completion/completions
    Compiler:                      x86_64-w64-mingw32-gcc
    CFLAGS:                        -O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4  -Wall -W -Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
    CPPFLAGS:                      -D_FORTIFY_SOURCE=2  -I/usr/x86_64-w64-mingw32/include -DFASTPATH -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
    LIBS:

    Enable memfd shared memory:    no
    Enable X11:                    no
    Enable OSS Output:             no
    Enable OSS Wrapper:            no
    Enable EsounD:                 no
    Enable Alsa:                   no
    Enable CoreAudio:              no
    Enable Solaris:                no
    Enable WaveOut:                yes
    Enable GLib 2.0:               no
    Enable Gtk+ 3.0:               no
    Enable GConf:                  no
    Enable GSettings:              no
    Enable Avahi:                  no
    Enable Jack:                   no
    Enable Async DNS:              no
    Enable LIRC:                   no
    Enable D-Bus:                  no
      Enable BlueZ 5:              no
        Enable ofono headsets:     no
        Enable native headsets:    no
    Enable udev:                   no
      Enable HAL->udev compat:     no
    Enable systemd
      Daemon (Socket Activation):  no
      Login (Session Tracking):    no
      Journal (Logging):           no
    Enable TCP Wrappers:           no
    Enable libsamplerate:          no
    Enable IPv6:                   no
    Enable OpenSSL (for Airtunes): no
    Enable fftw:                   no
    Enable orc:                    no
    Enable Adrian echo canceller:  yes
    Enable speex (resampler, AEC): no
    Enable soxr (resampler):       no
    Enable WebRTC echo canceller:  no
    Enable GStreamer-based RTP:    no
    Enable gcov coverage:          no
    Enable unit tests:             no
    Database
      tdb:                         no
      gdbm:                        no
      simple database:             yes

    System User:                   pulse
    System Group:                  pulse
    Access Group:                  pulse-access
    Enable per-user EsounD socket: no
    Force preopen:                 no
    Preopened modules:             all

    Legacy Database Entry Support: no


cat /usr/sbin/x86_64-w64-mingw32-configure(aur/mingw-w64-configure
#!/bin/sh

# check if last arg is a path to configure, else use parent
for last; do true; done
if test -x "${last}/configure"; then
  config_path="$last"
else
  config_path=".."
fi

default_mingw_pp_flags="-D_FORTIFY_SOURCE=2"
default_mingw_compiler_flags="-O2 -pipe -fno-plt -fexceptions --param=ssp-buffer-size=4"
default_mingw_linker_flags="-Wl,-O1,--sort-common,--as-needed -fstack-protector -lssp"

export CPPFLAGS="${MINGW_CPPFLAGS:-$default_mingw_pp_flags $CPPFLAGS}"
export CFLAGS="${MINGW_CFLAGS:-$default_mingw_compiler_flags $CFLAGS}"
export CXXFLAGS="${MINGW_CXXFLAGS:-$default_mingw_compiler_flags $CXXFLAGS}"
export LDFLAGS="${MINGW_LDFLAGS:-$default_mingw_linker_flags $LDFLAGS}"

${config_path}/configure \
  --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build="$CHOST" \
  --prefix=/usr/x86_64-w64-mingw32 --libdir=/usr/x86_64-w64-mingw32/lib --includedir=/usr/x86_64-w64-mingw32/include \
  --enable-shared --enable-static "$@"

ArchWSLでのmakeの実行結果
  CC       pulse/libpulsecommon_13.0_la-fork-detect.lo
In file included from ../../src/pulse/fork-detect.c:26:
../../src/pulsecore/atomic.h: In function ‘pa_atomic_ptr_load’:
../../src/pulsecore/atomic.h:116:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  116 |     return (void*) __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);
      |            ^
../../src/pulsecore/atomic.h: In function ‘pa_atomic_ptr_store’:
../../src/pulsecore/atomic.h:120:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  120 |     __atomic_store_n(&a->value, (unsigned long) p, __ATOMIC_SEQ_CST);
      |                                 ^
../../src/pulsecore/atomic.h: In function ‘pa_atomic_ptr_cmpxchg’:
../../src/pulsecore/atomic.h:138:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  138 |     return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
      |                                                    ^
../../src/pulsecore/atomic.h:138:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  138 |     return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
      |                                                                  ^
In file included from ../../src/pulsecore/atomic.h:24,
                 from ../../src/pulse/fork-detect.c:26:
../../src/pulse/fork-detect.c: In function ‘pa_detect_fork’:
../../src/pulsecore/macro.h:240:13: error: duplicate case value
  240 |             case !!(expr):                         \
      |             ^~~~
../../src/pulse/fork-detect.c:40:5: note: in expansion of macro ‘pa_assert_cc’
   40 |     pa_assert_cc(sizeof(pa_atomic_t) >= sizeof(pid_t));
      |     ^~~~~~~~~~~~
../../src/pulsecore/macro.h:239:13: note: previously used here
  239 |             case 0:                                \
      |             ^~~~
../../src/pulse/fork-detect.c:40:5: note: in expansion of macro ‘pa_assert_cc’
   40 |     pa_assert_cc(sizeof(pa_atomic_t) >= sizeof(pid_t));
      |     ^~~~~~~~~~~~
make[3]: *** [Makefile:8178: pulse/libpulsecommon_13.0_la-fork-detect.lo] Error 1

CC pulse/libpulsecommon_13.0_la-fork-detect.loで失敗。

on MSYS2/MinGW64-Subsystem

構築依存のインストール
pacman -S mingw-w64-x86_64-libogg mingw-w64-x86_64-flac mingw-w64-x86_64-libvorbis mingw-w64-x86_64-libsndfile

configure 実行結果
configure
$ ../configure --without-caps --disable-rpath --disable-memfd --disable-x11 --disable-oss-output --disable-oss-wrapper --disable-esound --disable-alsa --disable-coreaudio-output --disable-solaris --enable-waveout --disable-glib2 --disable-gtk3 --disable-gconf --disable-gsettings --disable-avahi --disable-jack --disable-asyncns --disable-lirc --disable-dbus --disable-bluez5 --disable-bluez5-ofono-headset --disable-bluez5-native-headset --disable-udev --disable-hal-compat --disable-systemd-daemon --disable-systemd-login --disable-systemd-journal --disable-tcpwrap --disable-samplerate --disable-ipv6 --disable-openssl --without-fftw --disable-orc --enable-adrian-aec --without-speex --without-soxr --disable-webrtc-aec --disable-gstreamer --disable-gcov --disable-tests --with-database=simple --disable-per-user-esound-socket --disable-legacy-database-entry-format --prefix=/usr/local
configure: loading site script /mingw64/etc/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '197609' is supported by ustar format... yes
checking whether GID '197121' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for stow... no
checking whether make supports nested variables... (cached) yes
checking whether ln -s works... no, using cp -pR
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether g++ supports C++11 features by default... yes
checking for gm4... no
checking for m4... m4
checking for pkg-config... /mingw64/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /mingw64/bin/msgfmt
checking for gmsgfmt... /mingw64/bin/msgfmt
checking for xgettext... /mingw64/bin/xgettext
checking for msgmerge... /mingw64/bin/msgmerge
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... no
checking for iconv... yes
checking for working iconv... yes
checking how to link with libiconv... -liconv
checking for GNU gettext in libintl... yes
checking whether to use NLS... yes
checking where the gettext function comes from... external libintl
checking how to link with libintl... -lintl
checking host operating system... win32
checking whether C compiler accepts -std=gnu11... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -W... yes
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -pipe... yes
checking whether C compiler accepts -Wno-long-long... yes
checking whether C compiler accepts -Wno-overlength-strings... yes
checking whether C compiler accepts -Wunsafe-loop-optimizations... yes
checking whether C compiler accepts -Wundef... yes
checking whether C compiler accepts -Wformat=2... yes
checking whether C compiler accepts -Wlogical-op... yes
checking whether C compiler accepts -Wsign-compare... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wmissing-include-dirs... yes
checking whether C compiler accepts -Wformat-nonliteral... yes
checking whether C compiler accepts -Wold-style-definition... no
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Winit-self... yes
checking whether C compiler accepts -Wdeclaration-after-statement... yes
checking whether C compiler accepts -Wfloat-equal... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wstrict-prototypes... no
checking whether C compiler accepts -Wredundant-decls... yes
checking whether C compiler accepts -Wmissing-declarations... yes
checking whether C compiler accepts -Wmissing-noreturn... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wendif-labels... yes
checking whether C compiler accepts -Wcast-align... yes
checking whether C compiler accepts -Wstrict-aliasing... yes
checking whether C compiler accepts -Wwrite-strings... yes
checking whether C compiler accepts -Wno-unused-parameter... yes
checking whether C compiler accepts -fno-common... yes
checking whether C compiler accepts -fdiagnostics-show-option... yes
checking whether C compiler accepts -fdiagnostics-color=auto... yes
checking whether the linker accepts "-Wl,-version-script=../src/map-file"... yes
checking whether the linker accepts -Wl,-z,now... no
checking whether the linker accepts -Wl,-z,nodelete... no
checking whether the linker accepts -Wl,--no-undefined... yes
checking whether gcc knows __atomic_store_n()... yes
checking whether gcc knows __sync_bool_compare_and_swap()... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw64/bin/nm -B
checking the name lister (/mingw64/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw64/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... no
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking ltdl.h usability... yes
checking ltdl.h presence... yes
checking for ltdl.h... yes
checking for lt_dladvise_init in -lltdl... yes
checking for ANSI C header files... (cached) yes
checking for arpa/inet.h... no
checking for cpuid.h... yes
checking for glob.h... no
checking for grp.h... no
checking for netdb.h... no
checking for netinet/in.h... no
checking for netinet/in_systm.h... no
checking for netinet/tcp.h... no
checking for poll.h... no
checking for pwd.h... no
checking for sched.h... yes
checking for sys/mman.h... no
checking for sys/select.h... no
checking for sys/socket.h... no
checking for sys/wait.h... no
checking for sys/uio.h... no
checking for syslog.h... no
checking for sys/dl.h... no
checking for dlfcn.h... (cached) no
checking for linux/sockios.h... no
checking for sys/prctl.h... no
checking for sys/conf.h... no
checking for sys/filio.h... no
checking for windows.h... yes
checking for winsock2.h... yes
checking for ws2tcpip.h... yes
checking for sys/atomic.h... no
checking for sys/ioctl.h... no
checking for byteswap.h... no
checking for sys/syscall.h... no
checking for sys/eventfd.h... no
checking for execinfo.h... no
checking for langinfo.h... no
checking for regex.h... yes
checking for pcreposix.h... yes
checking for locale.h... yes
checking for xlocale.h... no
checking for valgrind/memcheck.h... no
checking for netinet/ip.h... no
checking sys/resource.h usability... no
checking sys/resource.h presence... no
checking for sys/resource.h... no
checking sys/un.h usability... no
checking sys/un.h presence... no
checking for sys/un.h... no
checking linux/input.h usability... no
checking linux/input.h presence... no
checking for linux/input.h... no
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for off_t... yes
checking for uid_t in sys/types.h... no
checking whether environ is declared... yes
checking size of void*... 8
checking whether __x86_64__ is declared... yes
checking for SIGXCPU defined in signal.h... no
checking for INADDR_NONE defined in netinet/in.h... no
checking for INADDR_NONE defined in winsock2.h... yes
checking whether gcc knows _Bool... yes
checking for library containing pow... none required
checking for library containing sched_setscheduler... none required
checking for library containing dlopen... no
checking for library containing shm_open... no
checking for library containing inet_ntop... no
checking for library containing timer_create... no
checking for library containing pthread_setaffinity_np... no
checking for library containing pthread_getname_np... none required
checking for library containing pthread_setname_np... none required
checking for library containing connect... no
checking for library containing backtrace... no
checking for library containing regexec... -lpcreposix
checking for getopt_long... yes
checking for lrintf... yes
checking for strtof... yes
checking for chmod... yes
checking for chown... no
checking for fstat... yes
checking for fchown... no
checking for fchmod... no
checking for clock_gettime... yes
checking for getaddrinfo... no
checking for getgrgid_r... no
checking for getgrnam_r... no
checking for getpwnam_r... no
checking for getpwuid_r... no
checking for gettimeofday... yes
checking for getuid... no
checking for mlock... no
checking for nanosleep... yes
checking for pipe... no
checking for posix_fadvise... no
checking for posix_madvise... no
checking for posix_memalign... no
checking for setpgid... no
checking for setsid... no
checking for shm_open... no
checking for sigaction... no
checking for sleep... yes
checking for symlink... no
checking for sysconf... no
checking for uname... no
checking for pthread_setaffinity_np... no
checking for pthread_getname_np... yes
checking for pthread_setname_np... yes
checking for readlink... no
checking for ctime_r... no
checking for usleep... yes
checking for strerror_r... no
checking for lstat... no
checking for paccept... no
checking for setresuid... no
checking for setresgid... no
checking for setreuid... no
checking for setregid... no
checking for seteuid... no
checking for setegid... no
checking for ppoll... no
checking for strsignal... no
checking for sig2str... no
checking for strtod_l... no
checking for pipe2... no
checking for accept4... no
checking for open64... no
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... no
checking for vfork... no
checking type of array argument to getgroups... int
checking for getgroups... no
checking for getgroups in -lbsd... no
checking for mkfifo... no
checking for working alloca.h... no
checking for alloca... yes
checking for regexec... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for library containing dladdr... no
checking for iconv... (cached) yes
checking for working iconv... (cached) yes
checking how to link with libiconv... -liconv
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for  sndfile >= 1.0.20 ... yes
checking whether we need libatomic_ops... no
checking for mmsystem.h... yes
Package systemd was not found in the pkg-config search path.
Perhaps you should add the directory containing `systemd.pc'
to the PKG_CONFIG_PATH environment variable
No package 'systemd' found
checking for thread local storage (TLS) class... __thread
Package bash-completion was not found in the pkg-config search path.
Perhaps you should add the directory containing `bash-completion.pc'
to the PKG_CONFIG_PATH environment variable
No package 'bash-completion' found
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating man/Makefile
config.status: creating libpulse.pc
config.status: creating libpulse-simple.pc
config.status: creating libpulse-mainloop-glib.pc
config.status: creating doxygen/Makefile
config.status: creating doxygen/doxygen.conf
config.status: creating src/pulse/version.h
config.status: creating po/Makefile.in
config.status: creating man/pulseaudio.1.xml
config.status: creating man/pax11publish.1.xml
config.status: creating man/pacat.1.xml
config.status: creating man/pacmd.1.xml
config.status: creating man/pactl.1.xml
config.status: creating man/pasuspender.1.xml
config.status: creating man/padsp.1.xml
config.status: creating man/pulse-daemon.conf.5.xml
config.status: creating man/pulse-client.conf.5.xml
config.status: creating man/default.pa.5.xml
config.status: creating man/pulse-cli-syntax.5.xml
config.status: creating man/start-pulseaudio-x11.1.xml
config.status: creating src/start-pulseaudio-x11
config.status: creating src/client.conf
config.status: creating src/daemon.conf
config.status: creating src/default.pa
config.status: creating src/system.pa
config.status: creating PulseAudioConfig.cmake
config.status: creating PulseAudioConfigVersion.cmake
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing libtool commands

 ---{ pulseaudio 13.0-28-ga17c }---

    prefix:                        /usr/local
    sysconfdir:                    ${prefix}/etc
    localstatedir:                 ${prefix}/var
    modlibexecdir:                 ${exec_prefix}/lib/pulse-13.0/modules
    System Runtime Path:           /usr/local/var/run/pulse
    System State Path:             /usr/local/var/lib/pulse
    System Config Path:            /usr/local/var/lib/pulse
    Zsh completions directory:     ${datarootdir}/zsh/site-functions
    Bash completions directory:    ${datarootdir}/bash-completion/completions
    Compiler:                      gcc
    CFLAGS:                        -g -O2 -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -fno-common -fdiagnostics-show-option -fdiagnostics-color=auto
    CPPFLAGS:                       -DFASTPATH -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
    LIBS:                          -lpcreposix

    Enable memfd shared memory:    no
    Enable X11:                    no
    Enable OSS Output:             no
    Enable OSS Wrapper:            no
    Enable EsounD:                 no
    Enable Alsa:                   no
    Enable CoreAudio:              no
    Enable Solaris:                no
    Enable WaveOut:                yes
    Enable GLib 2.0:               no
    Enable Gtk+ 3.0:               no
    Enable GConf:                  no
    Enable GSettings:              no
    Enable Avahi:                  no
    Enable Jack:                   no
    Enable Async DNS:              no
    Enable LIRC:                   no
    Enable D-Bus:                  no
      Enable BlueZ 5:              no
        Enable ofono headsets:     no
        Enable native headsets:    no
    Enable udev:                   no
      Enable HAL->udev compat:     no
    Enable systemd
      Daemon (Socket Activation):  no
      Login (Session Tracking):    no
      Journal (Logging):           no
    Enable TCP Wrappers:           no
    Enable libsamplerate:          no
    Enable IPv6:                   no
    Enable OpenSSL (for Airtunes): no
    Enable fftw:                   no
    Enable orc:                    no
    Enable Adrian echo canceller:  yes
    Enable speex (resampler, AEC): no
    Enable soxr (resampler):       no
    Enable WebRTC echo canceller:  no
    Enable GStreamer-based RTP:    no
    Enable gcov coverage:          no
    Enable unit tests:             no
    Database
      tdb:                         no
      gdbm:                        no
      simple database:             yes

    System User:                   pulse
    System Group:                  pulse
    Access Group:                  pulse-access
    Enable per-user EsounD socket: no
    Force preopen:                 no
    Preopened modules:             all

    Legacy Database Entry Support: no


MSYS2/MinGW64-Subsystemでのmakeの実行結果
  CC       pulsecore/libpulsecore_13.0_la-rtpoll.lo
In file included from ../../src/pulsecore/once.h:23,
                 from ../../src/pulsecore/flist.h:26,
                 from ../../src/pulsecore/rtpoll.c:38:
../../src/pulsecore/atomic.h: In function 'pa_atomic_ptr_load':
../../src/pulsecore/atomic.h:116:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  116 |     return (void*) __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);
      |            ^
../../src/pulsecore/atomic.h: In function 'pa_atomic_ptr_store':
../../src/pulsecore/atomic.h:120:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  120 |     __atomic_store_n(&a->value, (unsigned long) p, __ATOMIC_SEQ_CST);
      |                                 ^
../../src/pulsecore/atomic.h: In function 'pa_atomic_ptr_cmpxchg':
../../src/pulsecore/atomic.h:138:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  138 |     return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
      |                                                    ^
../../src/pulsecore/atomic.h:138:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  138 |     return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
      |                                                                  ^
In file included from ../../src/pulsecore/socket.h:9,
                 from ../../src/pulsecore/core-util.h:39,
                 from ../../src/pulsecore/flist.h:27,
                 from ../../src/pulsecore/rtpoll.c:38:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h: At top level:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winsock2.h:1185:16: error: redefinition of 'struct pollfd'
 1185 | typedef struct pollfd {
      |                ^~~~~~
In file included from ../../src/pulsecore/rtpoll.c:33:
../../src/pulsecore/poll.h:44:8: note: originally defined here
   44 | struct pollfd {
      |        ^~~~~~
In file included from ../../src/pulsecore/once.h:23,
                 from ../../src/pulsecore/flist.h:26,
                 from ../../src/pulsecore/rtpoll.c:38:
../../src/pulsecore/atomic.h:109:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  109 | #define PA_ATOMIC_PTR_INIT(v) { .value = (long) (v) }
      |                                          ^
../../src/pulsecore/mutex.h:53:32: note: in expansion of macro 'PA_ATOMIC_PTR_INIT'
   53 | #define PA_STATIC_MUTEX_INIT { PA_ATOMIC_PTR_INIT(NULL) }
      |                                ^~~~~~~~~~~~~~~~~~
../../src/pulsecore/once.h:33:18: note: in expansion of macro 'PA_STATIC_MUTEX_INIT'
   33 |         .mutex = PA_STATIC_MUTEX_INIT,                                  \
      |                  ^~~~~~~~~~~~~~~~~~~~
../../src/pulsecore/flist.h:50:30: note: in expansion of macro 'PA_ONCE_INIT'
   50 |     } name##_flist = { NULL, PA_ONCE_INIT };                            \
      |                              ^~~~~~~~~~~~
../../src/pulsecore/rtpoll.c:87:1: note: in expansion of macro 'PA_STATIC_FLIST_DECLARE'
   87 | PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree);
      | ^~~~~~~~~~~~~~~~~~~~~~~
../../src/pulsecore/rtpoll.c: In function 'pa_rtpoll_run':
../../src/pulsecore/rtpoll.c:319:18: warning: passing argument 1 of 'pa_poll' from incompatible pointer type [-Wincompatible-pointer-types]
  319 |     r = pa_poll(p->pollfd, p->n_pollfd_used, (p->quit || p->timer_enabled) ? (int) ((timeout.tv_sec*1000) + (timeout.tv_usec / 1000)) : -1);
      |                 ~^~~~~~~~
      |                  |
      |                  struct pollfd *
In file included from ../../src/pulsecore/rtpoll.c:33:
../../src/pulsecore/poll.h:61:28: note: expected 'struct pollfd *' but argument is of type 'struct pollfd *'
   61 | int pa_poll(struct pollfd *fds, unsigned long nfds, int timeout);
      |             ~~~~~~~~~~~~~~~^~~
make[3]: *** [Makefile:8941: pulsecore/libpulsecore_13.0_la-rtpoll.lo] エラー 1

CC pulsecore/libpulsecore_13.0_la-rtpoll.loで失敗。ArchWSL とは別の箇所でエラー。

ArchWSLでのpulsecore/libpulsecore_13.0_la-rtpoll.lo
  CC       pulsecore/libpulsecore_13.0_la-rtpoll.lo
In file included from ../../src/pulsecore/once.h:23,
                 from ../../src/pulsecore/flist.h:26,
                 from ../../src/pulsecore/rtpoll.c:38:
../../src/pulsecore/atomic.h: In function ‘pa_atomic_ptr_load’:
../../src/pulsecore/atomic.h:116:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  116 |     return (void*) __atomic_load_n(&a->value, __ATOMIC_SEQ_CST);
      |            ^
../../src/pulsecore/atomic.h: In function ‘pa_atomic_ptr_store’:
../../src/pulsecore/atomic.h:120:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  120 |     __atomic_store_n(&a->value, (unsigned long) p, __ATOMIC_SEQ_CST);
      |                                 ^
../../src/pulsecore/atomic.h: In function ‘pa_atomic_ptr_cmpxchg’:
../../src/pulsecore/atomic.h:138:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  138 |     return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
      |                                                    ^
../../src/pulsecore/atomic.h:138:66: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  138 |     return __sync_bool_compare_and_swap(&a->value, (long) old_p, (long) new_p);
      |                                                                  ^
In file included from ../../src/pulsecore/once.h:23,
                 from ../../src/pulsecore/flist.h:26,
                 from ../../src/pulsecore/rtpoll.c:38:
../../src/pulsecore/rtpoll.c: At top level:
../../src/pulsecore/atomic.h:109:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  109 | #define PA_ATOMIC_PTR_INIT(v) { .value = (long) (v) }
      |                                          ^
../../src/pulsecore/mutex.h:53:32: note: in expansion of macro ‘PA_ATOMIC_PTR_INIT’
   53 | #define PA_STATIC_MUTEX_INIT { PA_ATOMIC_PTR_INIT(NULL) }
      |                                ^~~~~~~~~~~~~~~~~~
../../src/pulsecore/once.h:33:18: note: in expansion of macro ‘PA_STATIC_MUTEX_INIT’
   33 |         .mutex = PA_STATIC_MUTEX_INIT,                                  \
      |                  ^~~~~~~~~~~~~~~~~~~~
../../src/pulsecore/flist.h:50:30: note: in expansion of macro ‘PA_ONCE_INIT’
   50 |     } name##_flist = { NULL, PA_ONCE_INIT };                            \
      |                              ^~~~~~~~~~~~
../../src/pulsecore/rtpoll.c:87:1: note: in expansion of macro ‘PA_STATIC_FLIST_DECLARE’
   87 | PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree);
      | ^~~~~~~~~~~~~~~~~~~~~~~
  CC       pulsecore/libpulsecore_13.0_la-stream-util.lo
  CC       pulsecore/libpulsecore_13.0_la-svolume_c.lo

ArchWSL/MinGW-W64 ではlibpulsecore_13.0_la-rtpoll.loのビルドは通っていました。

例えば https://gitlab.freedesktop.org/pulseaudio/pulseaudio/blob/master/src/daemon/daemon-conf.c にはそこかしこに #ifdef OS_IS_WIN32 が出没しますし、PulseAudio のソースは Windows でのビルドも考慮されている気がするのですが、どうにも上手く行きません。

プリプロセッサのマクロの初期設定値の比較

もしかして MinGW の GCC のプリプロセッサの OS 判別で誤った値が与えられている……ということもありませんでした。普通に #define _WIN32 1 ですね。

MSYS2/MSYS_Subsystem
$ gcc -dumpmachine
x86_64-pc-msys

$ gcc -dM -E - </dev/null | grep MSYS
#define __MSYS__ 1

$ gcc -dM -E - </dev/null | grep MINGW

$ gcc -dM -E - </dev/null | grep WIN
#define __WINT_MAX__ 0xffffffffU
#define __WINT_MIN__ 0U
#define __SIZEOF_WINT_T__ 4
#define __CYGWIN__ 1
#define __WINT_TYPE__ unsigned int
#define __WINT_WIDTH__ 32

MSYS2/MinGW32_Subsystem
$ gcc -dumpmachine
i686-w64-mingw32

$ gcc -dM -E - </dev/null | grep MSYS
#define __MSYS__ 1

$ gcc -dM -E - </dev/null | grep MINGW

$ gcc -dM -E - </dev/null | grep WIN
#define __WINT_MAX__ 0xffffffffU
#define __WINT_MIN__ 0U
#define __SIZEOF_WINT_T__ 4
#define __CYGWIN__ 1
#define __WINT_TYPE__ unsigned int
#define __WINT_WIDTH__ 32

MSYS2/MinGW64_Subsystem
$ gcc -dumpmachine
x86_64-w64-mingw32

$ gcc -dM -E - </dev/null | grep MSYS

$ gcc -dM -E - </dev/null | grep MINGW
#define __MINGW32__ 1
#define __MINGW64__ 1

$ gcc -dM -E - </dev/null | grep WIN
#define _WIN32 1
#define _WIN64 1
#define __WINT_MAX__ 0xffff
#define __WINT_MIN__ 0
#define __WIN32 1
#define __WIN64 1
#define __WINNT 1
#define __WINNT__ 1
#define __WIN32__ 1
#define __SIZEOF_WINT_T__ 2
#define WIN32 1
#define WIN64 1
#define __WINT_TYPE__ short unsigned int
#define __WINT_WIDTH__ 16
#define WINNT 1
#define __WIN64__ 1

Cygwin_64bit
$ gcc -dumpmachine
x86_64-pc-cygwin

$ gcc -dM -E - </dev/null | grep CYGWIN
#define __CYGWIN__ 1

$ gcc -dM -E - </dev/null | grep MINGW

$ gcc -dM -E - </dev/null | grep WIN
#define __WINT_MAX__ 0xffffffffU
#define __WINT_MIN__ 0U
#define __SIZEOF_WINT_T__ 4
#define __CYGWIN__ 1
#define __WINT_TYPE__ unsigned int
#define __WINT_WIDTH__ 32

ArchWSL/MinGW-W64
$ x86_64-w64-mingw32-gcc -dumpmachine
x86_64-w64-mingw32

$ x86_64-w64-mingw32-gcc -dM -E - </dev/null | grep MINGW
#define __MINGW32__ 1
#define __MINGW64__ 1

$ x86_64-w64-mingw32-gcc -dM -E - </dev/null | grep WIN
#define _WIN32 1
#define _WIN64 1
#define __WINT_MAX__ 0xffff
#define __WINT_MIN__ 0
#define __WIN32 1
#define __WIN64 1
#define __WINNT 1
#define __WINNT__ 1
#define __WIN32__ 1
#define __SIZEOF_WINT_T__ 2
#define WIN32 1
#define WIN64 1
#define __WINT_TYPE__ short unsigned int
#define __WINT_WIDTH__ 16
#define WINNT 1
#define __WIN64__ 1

参考とした文献

参考とした文献

 
Pre-defined Compiler Macros / Wiki / OperatingSystems
https://sourceforge.net/p/predef/wiki/OperatingSystems/
 
C言語 マクロ コンパイル 判定 OS コンパイラ プリプロセッサ - 山口屋~活動日誌~
https://blog.goo.ne.jp/yamadokoro/e/3f3803fbedff1a535d15da364bcc1a16
 
c - How do I check OS with a preprocessor directive? - Stack Overflow
https://stackoverflow.com/questions/142508/how-do-i-check-os-with-a-preprocessor-directive
 
もう一度基礎からC言語 第14回 ヘッダファイルとプリプロセッサ指令 デバッグとプリプロセッサ指令
https://www.grapecity.com/developer/support/powernews/column/clang/014/page03.htm
 
Man page of GCC より引用:https://linuxjm.osdn.jp/html/GNU_gcc/man1/gcc.1.html

-dM
プリプロセッサに対して、プリプロセス終了時に有効であったマクロの定義の みを出力するように指示します。`-E' オプションとともに使用します。

-E
プリプロセス処理が終了したところで停止します。コンパイルはしません。 出力はプリプロセス済みのソースコードであり、標準出力へと送られます。
GCC はプリプロセスを必要としない入力ファイルを全て無視します。

windows.h, winsock2.h, ws2tcpip.h

あとは Cygwin におけるビルドで OFF にしたこの辺りのヘッダの扱いでしょうか。

checking for windows.h... (cached) no
checking for winsock2.h... (cached) no
checking for ws2tcpip.h... (cached) no
ArchWSL/MinGW-W64
$ yay -Ql mingw-w64-headers | grep windows.h
mingw-w64-headers-bin /usr/i686-w64-mingw32/include/windows.h
mingw-w64-headers-bin /usr/x86_64-w64-mingw32/include/windows.h
$ yay -Ql mingw-w64-headers | grep winsock2.h
mingw-w64-headers-bin /usr/i686-w64-mingw32/include/winsock2.h
mingw-w64-headers-bin /usr/x86_64-w64-mingw32/include/winsock2.h
$ yay -Ql mingw-w64-headers | grep ws2tcpip.h
mingw-w64-headers-bin /usr/i686-w64-mingw32/include/ws2tcpip.h
mingw-w64-headers-bin /usr/x86_64-w64-mingw32/include/ws2tcpip.h

MAN/INFOPAGE

 
yay
https://github.com/Jguer/yay/blob/master/doc/yay.8
または、WSL から

curl -L https://raw.githubusercontent.com/Jguer/yay/master/doc/yay.8 | man -l -


MSYS2/MinGW64_Subsystem
$ pacman -Ql mingw-w64-x86_64-headers-git | grep windows.h
mingw-w64-x86_64-headers-git /mingw64/x86_64-w64-mingw32/include/windows.h
$ pacman -Ql mingw-w64-x86_64-headers-git | grep winsock2.h
mingw-w64-x86_64-headers-git /mingw64/x86_64-w64-mingw32/include/winsock2.h
$ pacman -Ql mingw-w64-x86_64-headers-git | grep ws2tcpip.h
mingw-w64-x86_64-headers-git /mingw64/x86_64-w64-mingw32/include/ws2tcpip.h

MAN/INFOPAGE


  1. ロリータ。Dolores の愛称が Lolita なのだそう。自分は朧気ながら白黒映画版を見た記憶があるような、ないような。曖昧な記憶からフランス・パリ辺りが舞台だと思い込んでいましたが、アメリカが舞台でした。ちなみに、ネットで時折見かける「YES!ロリータNO!タッチ」は茜新社の成人向け漫画雑誌の印象的なキャッチコピーが独り歩きしたものだそうです。 

  2. ブール論理 - Wikipedia 

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2