#!/bin/sh
#
# Configure options script for re-calling ImageMagick compilation
# options required to use the ImageMagick library.
#
# Concept derived from gtk-config in the Gtk package except that Autoconf-style
# configuration information is presented instead so that it may be used more
# effictively in configure scripts.
#
usage="\
Usage: Magick-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--cppflags] [--ldflags] [--libs]"

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 5.3.8
      ;;
    --cflags)
      echo '-g -O2 -Wall'
      ;;
    --cppflags)
      echo "-DHAVE_CONFIG_H -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/freetype2 -D_REENTRANT -I/usr/local/include -I/usr/X11R6/include -I/usr/X11R6/include/X11"
      ;;
    --ldflags)
      echo '-L/usr/X11R6/lib -L/usr/local/lib -L/usr/X11R6/lib'
      ;;
    --libs)
      LIBS=`echo -L/usr/ports/graphics/ImageMagick/work/ImageMagick-5.3.8/magick -lMagick    -ltiff -lfreetype  -ljpeg  -lpng  -ldpstk -ldps -lXext -lXt  -lSM -lICE -lX11   -lz -lpthread  -lm | sed -e 's/  */ /g'`
      echo "$LIBS"
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

