#!/bin/sh
#
# Shamelessly ripped from imlib-config that was 
# apparently shamelessly ripped from gtk's gtk-config.in
#

VERSION="1.12.0"
CCFLAGS=" -DP_USE_PRAGMA -D_REENTRANT -fno-exceptions -I/usr/local/include"
LDFLAGS="-L/usr/X11R6/lib -L/usr/local/lib"
LIBS="-lldap -llber -lldap_r  -pthread -lsasl2 -lssl -lcrypto -lexpat -lSDL -lpt"
LIBDIR="/usr/local/lib"
PWINSTDIR="/usr/local/share/pwlib"
MACHTYPE="mips64"
OSTYPE="OpenBSD"
OSRELEASE="201005"
SHAREDLIBEXT="so"
INSTALLPREFIX="/usr/local"

# usage="Usage: ptlib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
usage="Usage: ptlib-config [--version] [--pwlibdir] [--ccflags] [--ldflags] [--libs] [--machtype] [--ostype] [--osrelease] [--sharedlibext] [--prefix] [--libdir]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
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
      ;;
    --pwlibdir)
      echo $PWINSTDIR
      ;;
    --ldflags)
      echo $LDFLAGS
      ;;
    --ccflags)
      echo $CCFLAGS
      ;;
    --libs)
      echo $LIBS
      ;;
    --machtype)
      echo $MACHTYPE
      ;;
    --ostype)
      echo $OSTYPE
      ;;
    --osrelease)
      echo $OSRELEASE
      ;;
    --sharedlibext)
      echo $SHAREDLIBEXT
      ;;
    --prefix)
      echo $INSTALLPREFIX
      ;;
    --libdir)
      echo $LIBDIR
      ;;
    --all)
      echo VERSION      = $VERSION
      echo PWLIBDIR     = $PWINSTDIR
      echo LDFLAGS      = $LDFLAGS
      echo CCFLAGS      = $CCFLAGS
      echo LIBS         = $LIBS
      echo MACHTYPE     = $MACHTYPE
      echo OSTYPE       = $OSTYPE
      echo OSRELEASE    = $OSRELEASE
      echo SHAREDLIBEXT = $SHAREDLIBEXT
      echo PREFIX       = $INSTALLPREFIX
      echo LIBDIR       = $LIBDIR
      ;;

    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

exit 0
