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

  "/usr/bin/clang++ -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 /opt/local
      ;;
    --exec-prefix)
      echo /opt/local
      ;;
    --version)
      echo 1.3.42
      ;;
    --cppflags)
      echo '-I/opt/local/include/GraphicsMagick'
      ;;
    --cxx)
      echo '/usr/bin/clang++'
      ;;
    --cxxflags)
      echo '-pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk  -D_THREAD_SAFE'
      ;;
    --ldflags)
      echo '-L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk  -L/opt/local/lib'
      ;;
    --libs)
      echo '-lGraphicsMagick++ -lGraphicsMagick -lwebp -lwebpmux -lsharpyuv -ljasper -L/opt/local/lib -lheif -llcms2 -ltiff -lfreetype -ljpeg -ljxl -ljxl_threads -lhwy -lbrotlidec -lbrotlienc -lstdc++ -lpng16 -llzma -lbz2 -lxml2 -lz -lzstd -lm -lpthread'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
