diff -upr clean/pkgconfig-0.15.0/main.c pkgconfig-0.15.0/main.c --- clean/pkgconfig-0.15.0/main.c 2003-01-15 05:01:00.000000000 +0000 +++ pkgconfig-0.15.0/main.c 2003-09-07 13:36:26.000000000 +0100 @@ -280,6 +280,8 @@ main (int argc, char **argv) g_strfreev (search_dirs); } + cross_prefix = getenv ("PKG_CONFIG_CROSS"); + #ifdef G_OS_WIN32 { /* Add search directories from the Registry */ Only in pkgconfig-0.15.0: main.o diff -upr clean/pkgconfig-0.15.0/parse.c pkgconfig-0.15.0/parse.c --- clean/pkgconfig-0.15.0/parse.c 2002-09-26 18:25:41.000000000 +0100 +++ pkgconfig-0.15.0/parse.c 2003-10-27 20:26:30.000000000 +0000 @@ -35,9 +35,10 @@ #ifdef G_OS_WIN32 int dont_define_prefix = FALSE; -char *prefix_variable = "prefix"; int msvc_syntax = FALSE; #endif +char *prefix_variable = "prefix"; +char *cross_prefix; /** @@ -896,6 +897,15 @@ parse_line (Package *pkg, const char *un varname = g_strdup (tag); varval = trim_and_sub (pkg, p, path); + if (cross_prefix && strcmp (tag, prefix_variable) == 0) + { + /* This is the prefix variable. Prepend the cross string to it. */ + gchar *new_val = g_strdup_printf ("%s/%s", cross_prefix, varval); + debug_spew (" Prefix '%s' overridden as '%s'\n", varval, new_val); + g_free (varval); + varval = new_val; + } + debug_spew (" Variable declaration, '%s' has value '%s'\n", varname, varval); g_hash_table_insert (pkg->vars, varname, varval); Only in pkgconfig-0.15.0: parse.o Only in pkgconfig-0.15.0: partial-glib.o Only in pkgconfig-0.15.0: pkg-config diff -upr clean/pkgconfig-0.15.0/pkg.h pkgconfig-0.15.0/pkg.h --- clean/pkgconfig-0.15.0/pkg.h 2002-09-06 21:00:08.000000000 +0100 +++ pkgconfig-0.15.0/pkg.h 2003-09-07 13:36:26.000000000 +0100 @@ -117,12 +117,16 @@ extern gboolean disable_uninstalled; /* If TRUE, do not automatically define "prefix" while * parsing each .pc file */ extern int dont_define_prefix; -/* The name of the variable that acts as prefix, unless it is "prefix" */ -extern char *prefix_variable; /* If TRUE, output flags in MSVC syntax. */ extern int msvc_syntax; #endif +/* The name of the variable that acts as prefix, unless it is "prefix" */ +extern char *prefix_variable; + +/* The string to be prepended to the prefix when cross-compiling */ +extern char *cross_prefix; + #endif Only in pkgconfig-0.15.0: pkg.o Only in pkgconfig-0.15.0: popt.o Only in pkgconfig-0.15.0: poptconfig.o Only in pkgconfig-0.15.0: popthelp.o Only in pkgconfig-0.15.0: poptparse.o Only in pkgconfig-0.15.0: stamp-h1