#!/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 [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case $1 in
    --prefix)
      echo /usr/local
      ;;
    --exec-prefix)
      echo /usr/local
      ;;
    --version)
      echo 5.5.1
      ;;
    --cflags)
      echo '-g -O2 -Wall'
      ;;
    --cppflags)
      echo "-I/usr/local/include -D_REENTRANT -I/usr/X11R6/include -I/usr/X11R6/include/X11 -I/usr/local/include/freetype2 -I/usr/local/include/libxml2"
      ;;
    --ldflags)
      echo '-L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/local/lib'
      ;;
    --libs)
      LIBS="-lMagick -ljbig -llcms -ltiff -lfreetype -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm"
      echo "$LIBS"
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

