#!/bin/sh
# Environment variables for the TQt3 package.
#
QTDIR=/usr
export QTDIR
export PATH="`echo $PATH | sed \"s|/usr/bin|$QTDIR/bin:/usr/bin|\"`"

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
  esac
fi
if [ "$ARCH" = "x86_64" ]; then
  LIBDIR="lib64"
else
  LIBDIR="lib"
fi

# This environment variable is no longer necessary.
# if [ "$CPLUS_INCLUDE_PATH" = "" ]; then
#   CPLUS_INCLUDE_PATH=$QTDIR/include
# else
#   CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$QTDIR/include
# fi
# export CPLUS_INCLUDE_PATH

if [ "$PKG_CONFIG_PATH" = "" ]; then
  PKG_CONFIG_PATH=$QTDIR/${LIBDIR}/pkgconfig
else
  # Does the variable already include the TQt3 location?
  if [ "`echo $PKG_CONFIG_PATH | grep $QTDIR`" = "" ]; then
    PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$QTDIR/${LIBDIR}/pkgconfig
  fi
fi
export PKG_CONFIG_PATH
