#!/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] [--cxx] [--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 /usr/pkg
      ;;
    --exec-prefix)
      echo /usr/pkg
      ;;
    --version)
      echo 1.3.47
      ;;
    --cppflags)
      echo '-I/usr/pkg/include/GraphicsMagick'
      ;;
    --cxx)
      echo 'c++'
      ;;
    --cxxflags)
      echo '-O2 -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -Dz_off_t=long -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libxml2 -pthread'
      ;;
    --ldflags)
      echo '-L/usr/pkg/lib -Wl,-zrelro -L/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -R/usr/X11R7/lib'
      ;;
    --libs)
      echo '-lGraphicsMagick++ -lGraphicsMagick -llcms2 -lfreetype -lXext -lSM -lICE -lX11 -lbz2 -lz -lltdl -lm -lpthread -lgomp'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
