GNOME Bugzilla – Bug 313433
Broken esound.pc when using coreaudio
Last modified: 2006-08-08 02:32:31 UTC
Version details: 0.2.36 Distribution/Version: 10.3.9; XCode 1.5 1. Compile and install pkg-config 0.17.2. 2. Compile and install esound. 3. Compile and install libcdio. 4. 'pkg-config --libs esound libcdio' This gives: -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit -Wl,CoreAudio -L/sw/lib -lesd -laudiofile -lcdio -lm instead of: -Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreAudio -L/sw/lib -lesd -laudiofile -lcdio -lm The Libs entries in the .pc files contain: esound.pc: -L${libdir} -lesd -Wl,-framework -Wl,CoreAudio libcdio.pc: -L${libdir} -lcdio -lm -Wl,-framework -Wl,CoreFoundation "-Wl,-framework -Wl,IOKit" pkg-config treats each whitespace-separated word as a separate entity: it doesn't know -Wl,-framework is the first of a two-word compiler flag, so it squeezes out the "duplicate" occurance. That means the second word is passed bare, which is not correct. This problem occurs whenever esound.pc is used at the same time as any other .pc that also passes a -Wl,-framework in this manner. According to the gcc manpage: -Wl,option Pass option as an option to the linker. If option contains com- mas, it is split into multiple options at the commas. so esound.pc should contain: Libs: -L${libdir} -lesd -Wl,-framework,CoreAudio
Created attachment 50798 [details] [review] Prevent pkg-config from munging -Wl,-framework
Applied, thanks.