#!/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: Magick++-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 `Magick++-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/X11R6
      ;;
    --exec-prefix)
      echo /usr/X11R6
      ;;
    --version)
      echo @MAJOR_VERSION@.@MINOR_VERSION@.@MICRO_VERSION@
      ;;
    --cppflags)
      echo "-I/usr/X11R6/include -I/usr/include/freetype2 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I/usr/include/libxml2"
      ;;
    --cxxflags)
      echo '-O2 -march=i486 -mcpu=i686'
      ;;
    --ldflags)
      echo '-L/usr/X11R6/lib -L/usr/X11/lib -lfreetype -lz -L/usr/lib'
      ;;
    --libs)
      LIBS="-lMagick++ -lMagick -ltiff -lfreetype -ljpeg -lpng -lexif -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm"
      echo "$LIBS"
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

