diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2013-04-10 17:59:35 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2013-05-17 05:13:14 -0700 |
commit | 409ee76ce1ba3372f34ca4d14b629bd8ad8347e1 (patch) | |
tree | bf92d1d51cb3cb4544d3229ac336c409fa863c9e /configure.ac | |
parent | 636e804ded087d01378cf69598e237700f9376eb (diff) | |
download | pkg-config-409ee76ce1ba3372f34ca4d14b629bd8ad8347e1.tar.gz |
Allow more control of redefined prefix behavior
Currently the native Win32 builds default to redefining the prefix
variable in .pc files based on their installation paths. This behavior
is not always desired when pkg-config is being used in a traditional
fixed path environment (e.g., /mingw like /usr).
Allow the default to be set via configure switch
--enable/disable-define-prefix, and allow it to be set both ways at
runtime through the --[dont-]define-prefix pkg-config option.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 94666a4..4eeaa82 100644 --- a/configure.ac +++ b/configure.ac @@ -161,6 +161,19 @@ if test "$cross_compiling" = yes && test "$native_win32" = yes; then test "x$WINE" != x && TESTS_PKG_CONFIG='${WINE} '"$TESTS_PKG_CONFIG" fi +dnl On Windows, the prefix variable in .pc files can be redfined at +dnl runtime. Allow the default behavior to be controlled. +AC_MSG_CHECKING([if prefix should be redefined at runtime]) +AC_ARG_ENABLE([define_prefix], + [AS_HELP_STRING([--enable-define-prefix], + [redefine prefix in .pc files @<:@default=yes on Win32@:>@])], + [], + [enable_define_prefix=$native_win32]) +AC_MSG_RESULT([$enable_define_prefix]) +AC_DEFINE_UNQUOTED([ENABLE_DEFINE_PREFIX], + [`test "x$enable_define_prefix" = xyes && echo TRUE || echo FALSE`], + [Define ${prefix} in .pc files at runtime]) + dnl dnl Find glib or use internal copy. Required version is 2.16 for dnl g_win32_get_package_installation_directory_of_module(). |