From: Arch Librarian Date: Thu, 14 Jul 2005 13:04:32 +0000 (+0000) Subject: 2001-10-21 Tor Lillqvist X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f90ccce9a1a08e0ae60277280dfa54a98de6290;p=pkg-config 2001-10-21 Tor Lillqvist Author: tml Date: 2001-10-21 17:23:14 GMT 2001-10-21 Tor Lillqvist * 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. --- diff --git a/ChangeLog b/ChangeLog index 590365d..97d6cfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-10-21 Tor Lillqvist + + * 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 * main.c: (Win32): Add option --dont-define-prefix on Windows. The diff --git a/main.c b/main.c index 0647e7f..e2985f4 100644 --- a/main.c +++ b/main.c @@ -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 diff --git a/pkg-config.1 b/pkg-config.1 index 7daabd8..e6a94d6 100644 --- a/pkg-config.1 +++ b/pkg-config.1 @@ -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