#!/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
      echo "Example: gcc \`Magick-config --cflags --cppflags\` source.c \`Magick-config --ldflags --libs\`" 1>&2
      exit 1
fi

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

