#!/bin/sh
#
# Configure options script for re-calling GraphicsMagick compilation
# options required to use the GraphicsMagick 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
# effectively in configure scripts.
#
usage='Usage: GraphicsMagick-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]

 For example, "example.c" may be compiled to produce "example" as follows:

  "gcc -o example example.c `GraphicsMagick-config --cppflags --cflags --ldflags --libs`"'

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 1.3.8
      ;;
    --cflags)
      echo '-O2 -pipe -Wall'
      ;;
    --cppflags)
      echo '-I/usr/local/include/GraphicsMagick'
      ;;
    --ldflags)
      echo '-L/usr/local/lib -L/usr/ports/pobj/GraphicsMagick-1.3.8-no_x11/GraphicsMagick-1.3.8/magick/.libs -L/usr/ports/pobj/GraphicsMagick-1.3.8-no_x11/GraphicsMagick-1.3.8/wand/.libs -L/usr/local/lib -L/usr/local/lib'
      ;;
    --libs)
      echo '-lGraphicsMagick -ljbig -llcms -ltiff -ljasper -ljpeg -lpng -lbz2 -lxml2 -lz -lm '
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

