diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2007-01-02 13:08:40 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2007-01-02 13:08:40 +0000 |
commit | 576bef4881ed416f840eeca42521eb575ccfa8b1 (patch) | |
tree | 5c5f8db7035463734fa247f77e419050a028a0a0 /scripts/pkg-config-wrapper | |
parent | edd8996cf252f65747aed0bbcf372d1c7a4e8718 (diff) | |
download | ptxdist-576bef4881ed416f840eeca42521eb575ccfa8b1.tar.gz ptxdist-576bef4881ed416f840eeca42521eb575ccfa8b1.tar.xz |
* pkg-config-wrapper: use "right" pkg-config.
Merged from branches/ptxdist-trunk-mkl by rsc.
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6662 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/pkg-config-wrapper')
-rwxr-xr-x | scripts/pkg-config-wrapper | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper index a61596ad7..6e9a06042 100755 --- a/scripts/pkg-config-wrapper +++ b/scripts/pkg-config-wrapper @@ -1,6 +1,9 @@ #!/bin/bash -PKGCONFIG=/usr/bin/pkg-config +#declare -a PKG_CONFIGS + +PKG_CONFIG_ARRAY=(`type -a -P pkg-config`) +PKG_CONFIG="${PKG_CONFIG_ARRAY[1]}" check_pipe_status() { for i in "${PIPESTATUS[@]}"; do @@ -17,7 +20,7 @@ if test -z "${SYSROOT}"; then echo "pkg-config: missing \$SYSROOT environment variable" echo echo - ) >2 + ) >&2 exit 1 fi @@ -42,7 +45,7 @@ if ${found_var}; then # if someone asks for a variable, if it looks like a path (starting with /) # prefix it with sysroot # - ${PKGCONFIG} "${@}" | + ${PKG_CONFIG} "${@}" | sed -e "s~^/~${SYSROOT}/~" else # @@ -52,7 +55,7 @@ else # 4) libtool isn't correctly DESTDIR/SYSROOT aware, it replaces -lfoo by # paths leading to host libraries; using -Wl,-lfoo seems to work. # - ${PKGCONFIG} "${@}" | + ${PKG_CONFIG} "${@}" | sed -e "s~\-L/*${SYSROOT}/*~-L=/~g; s~\-I/*${SYSROOT}/*~-I=/~g;" \ -e "s~\-L/~-L=/~g; s~\-I/~-I=/~g;" \ -e "s~\-L\=~-L${SYSROOT}~g; s~\-I\=~-I${SYSROOT}~g;" \ |