#!/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:

  "aarch64-mld-linux-g++  -mcpu=cortex-a76+crypto -mbranch-protection=standard --sysroot=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/recipe-sysroot -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
      ;;
    --exec-prefix)
      echo /usr
      ;;
    --version)
      echo 1.3.46
      ;;
    --cppflags)
      echo '-I/usr/include/GraphicsMagick'
      ;;
    --cxx)
      echo 'aarch64-mld-linux-g++  -mcpu=cortex-a76+crypto -mbranch-protection=standard --sysroot=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/recipe-sysroot'
      ;;
    --cxxflags)
      echo '-g'
      ;;
    --ldflags)
      echo '-L/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map -fmacro-prefix-map=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/GraphicsMagick-1.3.46=/usr/src/debug/graphicsmagick/1.3.46 -fdebug-prefix-map=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/GraphicsMagick-1.3.46=/usr/src/debug/graphicsmagick/1.3.46 -fmacro-prefix-map=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/build=/usr/src/debug/graphicsmagick/1.3.46 -fdebug-prefix-map=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/build=/usr/src/debug/graphicsmagick/1.3.46 -fdebug-prefix-map=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/recipe-sysroot= -fmacro-prefix-map=/home/nightbuild/mld-dev-6.5/build/tmp-glibc/work/cortexa76-mld-linux/graphicsmagick/1.3.46/recipe-sysroot= -fdebug-prefix-map=FIXMESTAGINGDIRHOST='
      ;;
    --libs)
      echo '-lGraphicsMagick++ -lGraphicsMagick -ljpeg -lpng16 -lzstd -lz -lm -lpthread -lgomp'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
