summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2005-07-14 13:06:42 +0000
committerArch Librarian <arch@canonical.com>2005-07-14 13:06:42 +0000
commit986e4ebb03aef2ecd67c4dcc49306707ef9f68b0 (patch)
tree529e49ba006ef4a5ae14091aa658d64f306adadc /main.c
parent96d4dc19c74e56f04bb653489511407cc6f75b13 (diff)
2005-04-01 Tollef Fog Heen <tfheen@err.no>
Author: tfheen Date: 2005-04-01 21:46:07 GMT 2005-04-01 Tollef Fog Heen <tfheen@err.no> * configure.in: Try to detect whether this architecture supports inter-library dependencies. If so, we default to assuming that this support is used and link to the minimal set of libraries rather than traversing the full depends set. * main.c (main): Only recurse if we want a static library list or if this architecture doesn't support inter-library dependencies. This will probably expose bugs for libraries which declare dependencies in their .pc files but don't actually link against each other. * pkg.c (packages_get_all_libs): Add recurse option (packages_get_L_libs): Add recurse option (package_get_L_libs): Add recurse option (packages_get_l_libs): Add recurse option (package_get_l_libs): Add recurse option * pkg.h: Update prototypes to handle the recurse option.
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main.c b/main.c
index 2ede2c4..11ca830 100644
--- a/main.c
+++ b/main.c
@@ -182,6 +182,7 @@ main (int argc, char **argv)
int want_I_cflags = 0;
int want_other_cflags = 0;
int want_list = 0;
+ int want_static_lib_list = ENABLE_INDIRECT_DEPS;
int result;
int want_uninstalled = 0;
char *variable_name = NULL;
@@ -215,6 +216,8 @@ main (int argc, char **argv)
"require given version of pkg-config", "VERSION" },
{ "libs", 0, POPT_ARG_NONE, &want_libs, 0,
"output all linker flags" },
+ { "static", 0, POPT_ARG_NONE, &want_static_lib_list, 0,
+ "output linker flags for static linking" },
{ "libs-only-l", 0, POPT_ARG_NONE, &want_l_libs, 0,
"output -l flags" },
{ "libs-only-other", 0, POPT_ARG_NONE, &want_other_libs, 0,
@@ -591,14 +594,14 @@ main (int argc, char **argv)
if (want_l_libs)
{
- char *str = packages_get_l_libs (packages);
+ char *str = packages_get_l_libs (packages, want_static_lib_list);
printf ("%s ", str);
g_free (str);
need_newline = TRUE;
}
else if (want_L_libs)
{
- char *str = packages_get_L_libs (packages);
+ char *str = packages_get_L_libs (packages, want_static_lib_list);
printf ("%s ", str);
g_free (str);
need_newline = TRUE;
@@ -612,7 +615,7 @@ main (int argc, char **argv)
}
else if (want_libs)
{
- char *str = packages_get_all_libs (packages);
+ char *str = packages_get_all_libs (packages, want_static_lib_list);
printf ("%s ", str);
g_free (str);
need_newline = TRUE;