+2001-10-21 Tor Lillqvist <tml@iki.fi>
+
+ * main.c (main): (Win32): Add option --prefix-variable in case the
+ variable used in a .pc file as "prefix" isn't called
+ "prefix".
+
+ * pkg-config.1: Document it.
+
2001-10-19 Tor Lillqvist <tml@iki.fi>
* main.c: (Win32): Add option --dont-define-prefix on Windows. The
static int want_debug_spew = 0;
static int want_verbose_errors = 0;
static int want_stdout_errors = 0;
-static int dont_define_prefix = 0;
void
debug_spew (const char *format, ...)
static int want_list = 0;
static int result;
static int want_uninstalled = 0;
+ static int dont_define_prefix = 0;
static char *variable_name = NULL;
static int want_exists = 0;
static char *required_atleast_version = NULL;
static char *required_exact_version = NULL;
static char *required_max_version = NULL;
static char *required_pkgconfig_version = NULL;
+ static char *prefix_variable = NULL;
static int want_silence_errors = 0;
GString *str;
GSList *packages = NULL;
#ifdef G_OS_WIN32
{ "dont-define-prefix", 0, POPT_ARG_NONE, &dont_define_prefix, 0,
"don't set the value of prefix based on where pkg-config.exe is installed" },
+ { "prefix-variable", 0, POPT_ARG_STRING, &prefix_variable, 0,
+ "set the name of the variable that pkg-config automatically sets", "PREFIX" },
#endif
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
*p = '/';
p++;
}
- define_global_variable ("prefix", prefix);
+ define_global_variable (prefix_variable ? prefix_variable : "prefix",
+ prefix);
}
#endif
.TP
.I "--dont-define-prefix"
-This option is available only on Windows and prevents \fIpkg-config\fP
-from automatically setting the variable "prefix" as the same directory
-where \fIpkg-config\fP was installed. (This directory is determined by
-asking the system where \fIpkg-config.exe\fP is located, and if that
-directory is called \fIbin\fP or \fIlib\fP, using its parent
-directory, otherwise itself.)
+This option is available only on Windows. It prevents \fIpkg-config\fP
+from automatically setting the value of the variable "prefix" to the
+directory where \fIpkg-config\fP was installed. (This directory is
+determined by asking the system where \fIpkg-config.exe\fP is located,
+and if that directory is called \fIbin\fP or \fIlib\fP, using its
+parent directory, otherwise itself.)
+
+.TP
+.I "--prefix-variable=PREFIX"
+Also this option is available only on Windows. It sets the name of the
+variable that \fIpkg-config\fP automatically sets to its own
+installation prefix.
.SH ENVIRONMENT VARIABLES