+2001-10-19 Tor Lillqvist <tml@iki.fi>
+
+ * main.c: (Win32): Add option --dont-define-prefix on Windows. The
+ option prevents pkg-config from automatically defining an
+ overriding value for the "prefix" variable.
+
+ Unless this option is used, set "prefix" to pkg-config's
+ installation directory, i.e. assume that the packages whose
+ configuration files are found in the same tree where
+ pkg-config.exe itself is, also have been configured to use the
+ same prefix. This means that a typical "developer package"
+ containg a subtree of headers, libraries, etc, including .pc
+ files, can be installed in any random location. As long as
+ pkg-config.exe is installed the same tree, things just should
+ work.
+
+ * pkg-config.1: Document it.
+
2001-09-30 Tor Lillqvist <tml@iki.fi>
Changes for "pure" Win32 (without Cygwin or similar) support. 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, ...)
"show verbose information about missing or conflicting packages" },
{ "errors-to-stdout", 0, POPT_ARG_NONE, &want_stdout_errors, 0,
"print errors from --print-errors to stdout not stderr" },
+#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" },
+#endif
POPT_AUTOHELP
{ NULL, 0, 0, NULL, 0 }
};
return 1;
}
+#ifdef G_OS_WIN32
+ if (!dont_define_prefix)
+ {
+ gchar *prefix = g_win32_get_package_installation_directory (PACKAGE " " VERSION, NULL);
+ gchar *p = prefix;
+
+ /* Turn backslashes into slashes or poptParseArgvString() will eat
+ * them when ${prefix} has been expanded in parse_libs().
+ */
+ while (*p)
+ {
+ if (*p == '\\')
+ *p = '/';
+ p++;
+ }
+ define_global_variable ("prefix", prefix);
+ }
+#endif
+
package_init ();
if (want_list)
.fi
Remember to use \-\-print-errors if you want error messages.
+.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.)
+
.SH ENVIRONMENT VARIABLES
.TP