From 7b10816cdb66d3fdca8a318cf135a7de5cf7849b Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 26 Jul 2012 00:32:35 +0200 Subject: [PATCH] Ordering cflags flags --- main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 6556ce4..34a1c89 100644 --- a/main.c +++ b/main.c @@ -487,6 +487,8 @@ main(int argc, char *argv[]) int want_libs_L = 0; int want_libs_l = 0; int want_libs_other = 0; + int want_cflags_I = 0; + int want_cflags_other = 0; struct pkg_option options[] = { { "version", no_argument, &want_version, 1, }, @@ -507,8 +509,8 @@ main(int argc, char *argv[]) { "help", no_argument, &want_help, 16, }, { "env-only", no_argument, &want_env_only, 17, }, { "print-requires-private", no_argument, &want_requires_private, 18, }, - { "cflags-only-I", no_argument, &want_cflags, WANT_CFLAGS_ONLY_I, }, - { "cflags-only-other", no_argument, &want_cflags, WANT_CFLAGS_ONLY_OTHER, }, + { "cflags-only-I", no_argument, &want_cflags_I, WANT_CFLAGS_ONLY_I, }, + { "cflags-only-other", no_argument, &want_cflags_other, WANT_CFLAGS_ONLY_OTHER, }, { "libs-only-L", no_argument, &want_libs_L, WANT_LIBS_ONLY_LDPATH, }, { "libs-only-l", no_argument, &want_libs_l, WANT_LIBS_ONLY_LIBNAME, }, { "libs-only-other", no_argument, &want_libs_other, WANT_LIBS_ONLY_OTHER, }, @@ -566,6 +568,11 @@ main(int argc, char *argv[]) else if (want_libs_other) want_libs = want_libs_other; + if (want_cflags_I) + want_cflags = want_cflags_I; + else if (want_cflags_other) + want_cflags = want_cflags_other; + if (want_version) { version();