#!/bin/sh
#
# Configure options script for re-calling GraphicsMagick compilation
# options required to use the GraphicsMagick 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
# effectively in configure scripts.
#
usage='Usage: GraphicsMagick-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]

 For example, "example.c" may be compiled to produce "example" as follows:

  "/usr/bin/clang -o example example.c `GraphicsMagick-config --cppflags --cflags --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.45
      ;;
    --cc)
      echo '/usr/bin/clang'
      ;;
    --cflags)
      echo '-pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk  -Wall -D_THREAD_SAFE'
      ;;
    --cppflags)
      echo '-I/opt/local/include/GraphicsMagick'
      ;;
    --ldflags)
      echo '-L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk '
      ;;
    --libs)
      echo '-lGraphicsMagick -ljasper -lheif -ljxl -ljxl_threads -ltiff -lzip -lzip -lsharpyuv -lwebp -lwebpmux -lfreetype -ljpeg -lturbojpeg -lpng16 -llcms2 -lxml2 -lzstd -llzma -lbz2 -lz -lm -lpthread'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
