| --- pkg-config-0.28/configure.ac.orig 2013-04-06 22:23:21 +0400 |
| +++ pkg-config-0.28/configure.ac 2013-04-06 22:48:16 +0400 |
| @@ -24,6 +24,21 @@ |
| dnl Check for headers |
| AC_CHECK_HEADERS([dirent.h unistd.h sys/wait.h malloc.h]) |
| |
| +AC_MSG_CHECKING([for Win32]) |
| +case "$host" in |
| + *-*-mingw*) |
| + native_win32=yes |
| + sep=";" |
| + ;; |
| + *) |
| + native_win32=no |
| + sep=":" |
| + ;; |
| +esac |
| +AC_MSG_RESULT([$native_win32]) |
| +AC_SUBST([native_win32]) |
| +AM_CONDITIONAL(NATIVE_WIN32, [test "x$native_win32" = xyes]) |
| + |
| dnl A POSIX shell is required for the tests. If TEST_SHELL hasn't been |
| dnl set on the command line then we try to find bash or ksh or sh from |
| dnl the path. If none of those are available, we just use whatever |
| @@ -56,6 +71,17 @@ |
| m4_popdef([var])]) |
| |
| dnl |
| +dnl Default prefix for hardcoded paths |
| +dnl |
| +AC_MSG_CHECKING([for default prefix for default paths]) |
| +AC_ARG_WITH([default_prefix_for_default_paths], |
| + [AS_HELP_STRING([--with-default-prefix-for-default-paths], |
| + [default prefix for default paths])], |
| + [defprefix="$withval"], |
| + [defprefix="/usr"]) |
| +AC_MSG_RESULT([$defprefix]) |
| + |
| +dnl |
| dnl Default pkg-config search path |
| dnl |
| AC_MSG_CHECKING([for default search path for .pc files]) |
| @@ -67,9 +93,9 @@ |
| # This is slightly wrong, but hopefully causes less confusion than |
| # people being unable to find their .pc files in the standard location. |
| if test "${prefix}" = "NONE"; then |
| - pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig' |
| + pc_path='${libdir}/pkgconfig${sep}${datadir}/pkgconfig${sep}${defprefix}/lib/pkgconfig${sep}${defprefix}/share/pkgconfig' |
| else |
| - pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig' |
| + pc_path='${libdir}/pkgconfig${sep}${datadir}/pkgconfig' |
| fi |
| ]) |
| PKG_EXPAND_VAR([pc_path]) |
| @@ -86,7 +112,7 @@ |
| [AS_HELP_STRING([--with-system-include-path], |
| [avoid -I flags from the given path])], |
| [system_include_path="$withval"], |
| - [system_include_path="/usr/include"]) |
| + [system_include_path="${defprefix}/include"]) |
| PKG_EXPAND_VAR([system_include_path]) |
| AC_MSG_RESULT([$system_include_path]) |
| AC_SUBST([system_include_path]) |
| @@ -105,10 +131,10 @@ |
| pc_lib_sfx=`echo "$libdir" | sed 's:.*/lib::'` |
| case "$pc_lib_sfx" in |
| */*|"") |
| - system_library_path="/usr/lib:/lib" |
| + system_library_path="${defprefix}/lib${sep}/lib" |
| ;; |
| *) |
| - system_library_path="/usr/lib$pc_lib_sfx:/lib$pc_lib_sfx:/usr/lib:/lib" |
| + system_library_path="${defprefix}/lib${pc_lib_sfx}${sep}/lib${pc_lib_sfx}${sep}${defprefix}/lib${sep}/lib" |
| ;; |
| esac |
| ]) |
| @@ -169,19 +195,6 @@ |
| fi |
| AC_SUBST(WARN_CFLAGS) |
| |
| -AC_MSG_CHECKING([for Win32]) |
| -case "$host" in |
| - *-*-mingw*) |
| - native_win32=yes |
| - ;; |
| - *) |
| - native_win32=no |
| - ;; |
| -esac |
| -AC_MSG_RESULT([$native_win32]) |
| -AC_SUBST([native_win32]) |
| -AM_CONDITIONAL(NATIVE_WIN32, [test "x$native_win32" = xyes]) |
| - |
| dnl When cross compiling to Windows, Wine might be available to help |
| dnl for testing. |
| if test "$cross_compiling" = yes && test "$native_win32" = yes; then |