#!/bin/sh
#
# Configure options script for re-calling compilation
# options required to use the Magick++ 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: GraphicsMagick++-config [--cppflags] [--cxxflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]

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

  "c++ -o example example.cpp `GraphicsMagick++-config --cppflags --cxxflags --ldflags --libs`"'

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

while test $# -gt 0; do
  case $1 in
    --prefix)
      echo /graphicsMagick
      ;;
    --exec-prefix)
      echo /graphicsMagick
      ;;
    --version)
      echo 1.3.21
      ;;
    --cppflags)
      echo '-I/graphicsMagick/include/GraphicsMagick'
      ;;
    --cxxflags)
      echo '-D__EMX__ -DEMX -DOS2 -D__ST_MT_ERRNO -O2 -march=pentium -fopenmp -mtune=pentium4 -static-libgcc -Wall'
      ;;
    --ldflags)
      echo '-L/graphicsMagick/lib -Zexe -Zomf -Zmap -Zhigh-mem -Zstack 8000 -D__ST_MT_ERRNO__ -s -static-libgcc -lstdc++ -L/usr/lib -L/@unixroot/usr/lib'
      ;;
    --libs)
      echo '-lGraphicsMagick++ -lGraphicsMagick -ljbig -lwebp -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng16 -lfpx -llzma -lbz2 -lxml2 -lz -lm -lpthreads'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

