mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-02-03 13:40:32 +01:00
Explicitly set --exists as the default option
This happened basically by accident before when "pkg-config foo" was run because the code wouldn't find any options set and just fall through to the end after processing the package arguments. However, it would act differently in that Requires.private was only enabled with an explicit --exists.
This commit is contained in:
parent
d1b7dd42d1
commit
ec11c93ef8
3 changed files with 12 additions and 4 deletions
|
|
@ -51,10 +51,10 @@ EXPECT_RETURN=0
|
|||
RESULT="/usr/include/somedir"
|
||||
run_test --variable includedir missing-requires-private
|
||||
|
||||
# tests below are on an existing package, but with missing Requires; when
|
||||
# pkg-config outputs error, the actual error text isn't checked
|
||||
# tests below are on an existing package, but with missing Requires;
|
||||
# when pkg-config outputs error, the actual error text isn't checked
|
||||
# package exists
|
||||
EXPECT_RETURN=0
|
||||
EXPECT_RETURN=1
|
||||
RESULT=""
|
||||
run_test missing-requires
|
||||
|
||||
|
|
|
|||
7
main.c
7
main.c
|
|
@ -529,6 +529,13 @@ main (int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* If no output option was set, then --exists is the default. */
|
||||
if (!output_opt_set)
|
||||
{
|
||||
debug_spew ("no output option set, defaulting to --exists\n");
|
||||
want_exists = TRUE;
|
||||
}
|
||||
|
||||
/* Error printing is determined as follows:
|
||||
* - for --cflags, --libs, etc. it's on by default
|
||||
* and --silence-errors can turn it off
|
||||
|
|
|
|||
|
|
@ -193,7 +193,8 @@ constraint after each package name, for example:
|
|||
.nf
|
||||
$ pkg-config --exists 'glib-2.0 >= 1.3.4 libxml = 1.8.3'
|
||||
.fi
|
||||
Remember to use \-\-print-errors if you want error messages.
|
||||
Remember to use \-\-print-errors if you want error messages. When no
|
||||
output options are supplied to \fIpkg-config\fP, \-\-exists is implied.
|
||||
.TP
|
||||
.I "--msvc-syntax"
|
||||
This option is available only on Windows. It causes \fIpkg-config\fP
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue