#!/bin/sh
#set -e

. $KUMATUXBIN/kumatux.org-vars

KUMATUX_PKG_CONFIG_PATH_ESCAPED=`$KUMATUXBIN/kumatux.org-sed-escape $KUMATUX_PKG_CONFIG_PATH`
if [ "$KUMATUX_PKG_CONFIG_PATH_ESCAPED" ]
then
    SYSTEM_PKG_CONFIG_PATH_ESCAPED=`echo $PKG_CONFIG_PATH | sed "s/$KUMATUX_PKG_CONFIG_PATH_ESCAPED://"`
else
    SYSTEM_PKG_CONFIG_PATH_ESCAPED=$PKG_CONFIG_PATH
fi

export KUMATUX_PKG_CONFIG_PATH=`cat $KUMATUXETC/$KUMATUXETCPKGCONFIG/*.conf 2>/dev/null`/usr/lib/pkgconfig
if [ "$SYSTEM_PKG_CONFIG_PATH" ]
then
    export PKG_CONFIG_PATH=$KUMATUX_PKG_CONFIG_PATH:$SYSTEM_PKG_CONFIG_PATH
else
    export PKG_CONFIG_PATH=$KUMATUX_PKG_CONFIG_PATH
fi
