Menu

#7 Suboptimal use of -framework flags in OS_LDFLAGS

open
nobody
None
5
2006-08-21
2006-08-21
No

Using a quoted string for @OS_LDFLAGS@ in jack.pc to hide whitespace defeats some of the flag-handling features of pkg-config. The only reason (that I can see:) for jac.pc.in to be:

Libs: -L${libdir} -ljack "@OS_LDFLAGS@"

instead of:

Libs: -L${libdir} -ljack @OS_LDFLAGS@

is to avoid pkg-config chewing up repeated -framework flags from configure.ac:

OS_LDFLAGS="-framework CoreAudio -framework CoreServices -framework AudioUnit"

Better to rewrite those flags so that each [-framework Foo] has no embedded whitespace:

OS_LDFLAGS="Wl,-framework,CoreAudio -Wl,-framework,CoreServices -Wl,-framework,AudioUnit"

Now pkg-config won't see "-framework" as a separate flag, so it won't break things, and you won't need to use quotes in the .pc

Discussion


Log in to post a comment.