2001-10-21 Tor Lillqvist <tml@iki.fi>

Author: tml
Date: 2001-10-21 17:23:14 GMT
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.
This commit is contained in:
Arch Librarian 2005-07-14 13:04:32 +00:00
parent 1aa1db96e5
commit 1f90ccce9a
3 changed files with 26 additions and 8 deletions

View file

@ -1,3 +1,11 @@
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

8
main.c
View file

@ -14,7 +14,6 @@
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, ...)
@ -145,12 +144,14 @@ main (int argc, char **argv)
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;
@ -208,6 +209,8 @@ main (int argc, char **argv)
#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 }
@ -341,7 +344,8 @@ main (int argc, char **argv)
*p = '/';
p++;
}
define_global_variable ("prefix", prefix);
define_global_variable (prefix_variable ? prefix_variable : "prefix",
prefix);
}
#endif

View file

@ -169,12 +169,18 @@ 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.)
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