#!/bin/sh
#
# Configure options script for re-calling MagickWand compilation options
# required to use the MagickWand library.
#

prefix=/opt/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
pkgconfigdir=${libdir}/pkgconfig
export PKG_CONFIG_LIBDIR="${pkgconfigdir}"

usage="\
Usage: MagickWand-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      echo "Example: gcc \`MagickWand-config --cflags --cppflags\` -o wand wand.c \`MagickWand-config --ldflags --libs\`" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
    *) optarg= ;;
  esac
  case $1 in
    --prefix=*)
      prefix=$optarg
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo '6.9.13-40 Q16 '
      ;;
    --cc)
      echo '/opt/local/bin/clang-mp-11'
      ;;
    --cflags)
      /opt/local/bin/pkg-config --cflags MagickWand-6.Q16
      ;;
    --cxx)
      echo '/opt/local/bin/clang++-mp-11'
      ;;
    --cxxflags)
      /opt/local/bin/pkg-config --cflags MagickWand-6.Q16
      ;;
    --cppflags)
      /opt/local/bin/pkg-config --cflags MagickWand-6.Q16
      ;;
    --ldflags)
      /opt/local/bin/pkg-config --libs MagickWand-6.Q16
      ;;
    --libs)
      /opt/local/bin/pkg-config --libs MagickWand-6.Q16
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

