+2001-06-14 Havoc Pennington <hp@redhat.com>
+
+ * pkg.c (internal_get_package): don't fall back to legacy -config
+ scripts for the -uninstalled case.
+
+2001-06-07 Havoc Pennington <hp@redhat.com>
+
+ * pkg.m4: add URL to no-pkg-config error message
+
2001-06-06 Havoc Pennington <hp@redhat.com>
* pkg.m4: Fix mismatched backtick
static Package *
-internal_get_package (const char *name, gboolean warn)
+internal_get_package (const char *name, gboolean warn, gboolean check_compat)
{
Package *pkg = NULL;
const char *location;
un = g_strconcat (name, "-uninstalled", NULL);
- pkg = internal_get_package (un, FALSE);
+ pkg = internal_get_package (un, FALSE, FALSE);
g_free (un);
debug_spew ("Reading '%s' from file '%s'\n", name, location);
}
- if (location == NULL)
+ if (location == NULL && check_compat)
{
pkg = get_compat_package (name);
-
- if (pkg == NULL)
+
+ if (pkg)
{
- if (warn)
- verbose_error ("Package %s was not found in the pkg-config search path.\n"
- "Perhaps you should add the directory containing `%s.pc'\n"
- "to the PKG_CONFIG_PATH environment variable\n",
- name, name);
+ debug_spew ("Returning values for '%s' from a legacy -config script\n",
+ name);
+
+ return pkg;
}
-
- debug_spew ("Returning values for '%s' from a legacy -config script\n",
- name);
-
- return pkg;
}
+
+ if (pkg == NULL)
+ {
+ if (warn)
+ verbose_error ("Package %s was not found in the pkg-config search path.\n"
+ "Perhaps you should add the directory containing `%s.pc'\n"
+ "to the PKG_CONFIG_PATH environment variable\n",
+ name, name);
+ return NULL;
+ }
+
pkg = parse_package_file (location);
if (pkg == NULL)
Package *
get_package (const char *name)
{
- return internal_get_package (name, TRUE);
+ return internal_get_package (name, TRUE, TRUE);
}
static GSList*
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7.0; then
echo "*** Your version of pkg-config is too old. You need version 0.7.0 or newer."