#!/bin/sh
# generated auomatically by configure

yajl=""

TARGET=oyranos

VERSION=0.9.6
VERSION_L=$((0*10000+9*100+6))
VERSION_A=0
VERSION_B=9
VERSION_C=6

prefix="/usr"
exec_prefix="$prefix"
bindir="/usr/bin"
libdir="/usr/lib"
framedir="/usr/Library/Frameworks"
cmmsubpath=color/modules
metasubpath=oyranos-meta
cmmdir="$libdir/$cmmsubpath"
includedir="$prefix/include/oyranos"
datadir="$prefix/share"
mandir="$datadir/man"
syscolordir="$datadir/color"
usercolordir=~/.config/color
usercolordata=~/.local/share/color
iccdirname=icc
settingsdirname=settings
targetdirname=target
pixmapdir="$datadir/pixmaps"
icondir="$datadir/icons"
desktopdir="$datadir/applications"
oyranos_add="$ltdl $xml2 $iconv $intl $yajl"
sourcedir=/chakra/desktop/oyranos/src/oyranos-0.9.6
builddir=/chakra/desktop/oyranos/src/oyranos-0.9.6

if [ -n "$PKG_CONFIG_PATH" ]; then
  PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$libdir/pkgconfig
else
  PKG_CONFIG_PATH=$libdir/pkgconfig
fi
export PKG_CONFIG_PATH


if [ $# -eq 0 ]; then
  echo "$TARGET"
fi


while test $# -gt 0 
do
    case "$1" in
	-*=*) 
	    optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
	    ;;
	*)
	    optarg=
	    ;;
    esac

    case $1 in
	--version)
	    echo $VERSION
	    ;;
	--num-version)
	    echo $VERSION_L
	    ;;
	--api-version)
	    echo $VERSION_A
	    ;;
	--cflags)
	    echo_cflags=yes
	    ;;
	--ldflags)
	    echo_ldflags=yes
	    ;;
	--ldstaticflags)
	    echo_ldstaticflags=yes
	    ;;
	--syscolordir)
	    echo_syscolordir=yes
	    ;;
	--usercolordir)
	    echo_usercolordir=yes
	    ;;
	--iccdirname)
	    echo_iccdirname=yes
	    ;;
	--settingsdirname)
	    echo_settingsdirname=yes
	    ;;
        --cmmdir)
	    echo_cmmdirname=yes
	    ;;
        --metadir)
	    echo_metadirname=yes
	    ;;
        --builddir)
	    echo_builddirname=yes
	    ;;
        --sourcedir)
	    echo_sourcedirname=yes
	    ;;
	*)
	    echo_help=yes
	    ;;
    esac
    shift
done

if [ "$echo_help" = "yes" ]; then
  echo "usage:"
  echo "  $0 --version           get official version"
  echo "  $0 --api-version       get version of API"
  echo "  $0 --num-version       get version as a simple number"
  echo "  $0 --cflags            compiler flags"
  echo "  $0 --ldflags           dynamic link flags"
  echo "  $0 --ldstaticflags     static linking flags"
  echo "  $0 --syscolordir       path to system main color directory"
  echo "  $0 --usercolordir      path to users main color directory"
  echo "  $0 --iccdirname        ICC profile directory name"
  echo "  $0 --settingsdirname   Oyranos settings directory name"
  echo "  $0 --cmmdir            Oyranos CMM directory name"
  echo "  $0 --metadir           Oyranos meta module directory name"
  echo "  $0 --sourcedir         Oyranos local source directory name"
  echo "  $0 --builddir          Oyranos local build directory name"
fi

if [ "$echo_ldflags" = "yes" ]; then
    elektra_dyn="`pkg-config --libs elektra`"
    elektra="$elektra_dyn"
fi

if [ -z "$elektra" ]; then
  if [ -f $libdir/libelektra.a ]; then
    elektra="$libdir/libelektra.a"
    if [ -f $libdir/libelektra-filesys.a ]; then
      elektra="$elektra $libdir/libelektra-filesys.a"
    fi
    if [ -f $libdir/elektra/libelektra-filesys.a ]; then
      elektra="$elektra $libdir/elektra/libelektra-filesys.a"
    fi
  fi
  if [ -f $libdir/libelektra-static.a ]; then
    elektra="-lelektra-static"
  fi
fi

if [ -z "$elektra" ]; then
    elektra="`pkg-config --libs elektra`"
fi

if [ "$echo_cflags" = "yes" ]; then
  echo "-I/usr/include/oyranos"
fi

if [ "$echo_ldflags" = "yes" ]; then
  if [ -f libOyranos.so ]; then
    echo "-L. -lOyranos -lOyranosConfig -lOyranosModules -lOyranosObject -lOyranosCore"
  else
    if [ -d $framedir/Oyranos.framework ]; then
      echo "-L$framedir -lOyranos -lOyranosConfig -lOyranosModules -lOyranosObject -lOyranosCore"
    else
      echo "-L$libdir -lOyranos -lOyranosConfig -lOyranosModules -lOyranosObject -lOyranosCore"
    fi
  fi
fi

if [ "$echo_ldstaticflags" = "yes" ]; then
  if [ -f liboyranos-static.a ]; then
    echo "liboyranos-static.a liboyranos_config-static.a liboyranos_modules-static.a liboyranos_object-static.a liboyranos_core-static.a $elektra $oyranos_add"
  else
    echo "-L$libdir -loyranos-static -loyranos_config-static -loyranos_modules-static -loyranos_object-static -loyranos_core-static $elektra $oyranos_add"
  fi
fi

if [ "$echo_syscolordir" = "yes" ]; then
  echo "$syscolordir"
fi
if [ "$echo_usercolordir" = "yes" ]; then
  echo "$usercolordir"
fi
if [ "$echo_iccdirname" = "yes" ]; then
  echo "$iccdirname"
fi
if [ "$echo_settingsdirname" = "yes" ]; then
  echo "$settingsdirname"
fi
if [ "$echo_cmmdirname" = "yes" ]; then
  echo "$cmmdir"
fi
if [ "$echo_metadirname" = "yes" ]; then
  echo "$libdir/$metasubpath"
fi
if [ "$echo_sourcedirname" = "yes" ]; then
  echo "$sourcedir"
fi
if [ "$echo_builddirname" = "yes" ]; then
  echo "$builddir"
fi

