From 8d19fad1a01ac681a3004bb2777ab71b3dcd4eee Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Sat, 27 Sep 2014 17:07:31 -0700 Subject: Also match -Wl,-framework for OSX framework Freedesktop #1278 (https://bugs.freedesktop.org/show_bug.cgi?id=1278) --- check/check-special-flags | 2 +- check/special-flags.pc | 2 +- parse.c | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/check/check-special-flags b/check/check-special-flags index c0a9ebb..9679458 100755 --- a/check/check-special-flags +++ b/check/check-special-flags @@ -7,5 +7,5 @@ set -e RESULT="-isystem /system1 -idirafter /after1 -idirafter /after2 -isystem /system2 -I/foo -I/bar" run_test --cflags special-flags -RESULT="-framework Foo -lsimple -framework Bar" +RESULT="-framework Foo -lsimple -framework Bar -Wl,-framework -Wl,Baz" run_test --libs special-flags diff --git a/check/special-flags.pc b/check/special-flags.pc index 318eab0..56e2057 100644 --- a/check/special-flags.pc +++ b/check/special-flags.pc @@ -7,5 +7,5 @@ Name: Special flags test Description: Dummy pkgconfig test package for testing pkgconfig Version: 1.0.0 Requires: -Libs: -framework Foo -lsimple -framework Bar +Libs: -framework Foo -lsimple -framework Bar -Wl,-framework -Wl,Baz Cflags: -I/foo -isystem /system1 -idirafter /after1 -I/bar -idirafter /after2 -isystem /system2 diff --git a/parse.c b/parse.c index 700eed9..5596810 100644 --- a/parse.c +++ b/parse.c @@ -665,7 +665,9 @@ static void _do_parse_libs (Package *pkg, int argc, char **argv) flag->arg = g_strconcat (L_flag, p, NULL); pkg->libs = g_list_prepend (pkg->libs, flag); } - else if (strcmp("-framework",p) == 0 && i+1 < argc) + else if ((strcmp("-framework", p) == 0 || + strcmp("-Wl,-framework", p) == 0) && + i+1 < argc) { /* Mac OS X has a -framework Foo which is really one option, * so we join those to avoid having -framework Foo -- cgit v1.2.1