#!/data/data/com.termux/files/usr/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] [--cxxflags] [--exec-prefix] [--ldflags] [--libs] [--prefix] [--version]

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

  "c++ -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 /data/data/com.termux/files/usr
      ;;
    --exec-prefix)
      echo /data/data/com.termux/files/usr
      ;;
    --version)
      echo 1.3.33
      ;;
    --cppflags)
      echo '-I/data/data/com.termux/files/usr/include/GraphicsMagick'
      ;;
    --cxxflags)
      echo '-march=i686 -msse3 -mstackrealign -mfpmath=sse -Oz -fstack-protector-strong'
      ;;
    --ldflags)
      echo '-L/data/data/com.termux/files/usr/lib -L/data/data/com.termux/files/usr/lib -Wl,-z,relro,-z,now -L/data/data/com.termux/files/usr/lib'
      ;;
    --libs)
      echo '-lGraphicsMagick++ -lGraphicsMagick -llcms2 -ltiff -lfreetype -ljasper -ljpeg -lpng16 -llzma -lbz2 -lxml2 -lz -lzstd -lm -lomp'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

