mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-07 17:48:05 +02:00
Use the -l:lib syntax when pkg-config is called with --static
Signed-off-by: Nicolas Caramelli <caramelli.devel@gmail.com>
This commit is contained in:
parent
d97db4fae4
commit
efc2ea54fa
2 changed files with 8 additions and 2 deletions
2
main.c
2
main.c
|
|
@ -43,7 +43,7 @@ static gboolean want_my_version = FALSE;
|
||||||
static gboolean want_version = FALSE;
|
static gboolean want_version = FALSE;
|
||||||
static FlagType pkg_flags = 0;
|
static FlagType pkg_flags = 0;
|
||||||
static gboolean want_list = FALSE;
|
static gboolean want_list = FALSE;
|
||||||
static gboolean want_static_lib_list = ENABLE_INDIRECT_DEPS;
|
gboolean want_static_lib_list = ENABLE_INDIRECT_DEPS;
|
||||||
static gboolean want_short_errors = FALSE;
|
static gboolean want_short_errors = FALSE;
|
||||||
static gboolean want_uninstalled = FALSE;
|
static gboolean want_uninstalled = FALSE;
|
||||||
static char *variable_name = NULL;
|
static char *variable_name = NULL;
|
||||||
|
|
|
||||||
8
parse.c
8
parse.c
|
|
@ -38,6 +38,8 @@ gboolean parse_strict = TRUE;
|
||||||
gboolean define_prefix = ENABLE_DEFINE_PREFIX;
|
gboolean define_prefix = ENABLE_DEFINE_PREFIX;
|
||||||
char *prefix_variable = "prefix";
|
char *prefix_variable = "prefix";
|
||||||
|
|
||||||
|
extern gboolean want_static_lib_list;
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
gboolean msvc_syntax = FALSE;
|
gboolean msvc_syntax = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -651,7 +653,11 @@ static void _do_parse_libs (Package *pkg, int argc, char **argv)
|
||||||
++p;
|
++p;
|
||||||
|
|
||||||
flag->type = LIBS_l;
|
flag->type = LIBS_l;
|
||||||
flag->arg = g_strconcat (l_flag, p, lib_suffix, NULL);
|
if (want_static_lib_list && *p != ':')
|
||||||
|
flag->arg = g_strconcat (l_flag, ":lib", p, lib_suffix, ".a", NULL);
|
||||||
|
else
|
||||||
|
flag->arg = g_strconcat (l_flag, p, lib_suffix, NULL);
|
||||||
|
|
||||||
pkg->libs = g_list_prepend (pkg->libs, flag);
|
pkg->libs = g_list_prepend (pkg->libs, flag);
|
||||||
}
|
}
|
||||||
else if (p[0] == '-' &&
|
else if (p[0] == '-' &&
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue