summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-02-02 09:55:15 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-02-03 16:41:19 +0100
commit43adda38494f1ddde8c7aa2184d20470dd808866 (patch)
tree2efb6b832ddd368b82778e64cc7a8bbb5f59e29a /scripts
parent24c84d207dc6f188c244c2dfa81a6651e263ada2 (diff)
downloadptxdist-43adda38494f1ddde8c7aa2184d20470dd808866.tar.gz
ptxdist-43adda38494f1ddde8c7aa2184d20470dd808866.tar.xz
ptxd_init_cross_env: set PKG_CONFIG_SYSTEM_LIBRARY_PATH and PKG_CONFIG_SYSTEM_INCLUDE_PATH
With these variables, pkg-config will skip unnecessary '-I' and '-L' arguments. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_00-init.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index d79775c06..466aa7425 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -261,8 +261,10 @@ ptxd_init_cross_env() {
#
# add <DIR>/lib/pkgconfig and <DIR>/share/pkgconfig
- local -a pkg_libdir
+ local -a pkg_libdir pkg_lib_system_path pkg_system_incpath
pkg_libdir=( "${prefix[@]/%//${lib_dir}/pkgconfig}" "${prefix[@]/%//share/pkgconfig}" )
+ pkg_system_libpath=( "${pkg_libdir[@]/%//../../lib}" "${pkg_libdir[@]/%//../lib}" "/usr/lib" "/lib" )
+ pkg_system_incpath=( "${pkg_libdir[@]/%//../../include}" "${pkg_libdir[@]/%//../include}" "/usr/include" "/include" )
#
# PKG_CONFIG_PATH contains additional pkg-config search
@@ -289,7 +291,7 @@ ptxd_init_cross_env() {
fi
IFS=":"
- PTXDIST_CROSS_ENV_PKG_CONFIG="PKG_CONFIG_PATH='${pkg_path[*]}' PKG_CONFIG_LIBDIR='${pkg_libdir[*]}'"
+ PTXDIST_CROSS_ENV_PKG_CONFIG="PKG_CONFIG_PATH='${pkg_path[*]}' PKG_CONFIG_LIBDIR='${pkg_libdir[*]}' PKG_CONFIG_SYSTEM_LIBRARY_PATH='${pkg_system_libpath[*]}' PKG_CONFIG_SYSTEM_INCLUDE_PATH='${pkg_system_incpath[*]}'"
export PTXDIST_CROSS_ENV_PKG_CONFIG
IFS="${orig_IFS}"
}