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

  "x86_64-tizen-linux-gnu-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 /usr
      ;;
    --exec-prefix)
      echo /usr
      ;;
    --version)
      echo 1.3.45
      ;;
    --cc)
      echo 'x86_64-tizen-linux-gnu-clang'
      ;;
    --cflags)
      echo '-Os -fstack-protector -Wno-unused-command-line-argument -Wno-error=unused-but-set-variable -Wno-error=unused-command-line-argument -Wno-error=unused-lambda-capture -Wno-error=strict-prototypes -Wno-error=logical-not-parentheses -Wno-error=deprecated-non-prototype -Wno-error=implicit-enum-enum-cast -Wno-error=unused-value -Wno-error=unknown-warning-option -Wno-error=delete-non-abstract-non-virtual-dtor -Wno-error=unused-private-field -Wno-error=header-guard -Wno-error=c99-designator -Wno-error=unused-const-variable -Wno-error=pessimizing-move -Wno-error=unused-function -Wno-error=inconsistent-missing-override -Wno-error=unqualified-std-cast-call -Wno-error=ignored-reference-qualifiers -Wno-braced-scalar-init -Wno-deprecated-literal-operator -Wno-error=vla-cxx-extension -Wno-error=shadow -Wno-error=misleading-indentation -Wno-error=macro-redefined -Wno-error=single-bit-bitfield-constant-conversion -Wno-error=constant-conversion -Wno-error=void-pointer-to-enum-cast -Wno-error=dangling-assignment-gsl -Wno-error=cast-function-type-strict -Wno-error=final-dtor-non-final-class -Wno-error=parentheses-equality -Wno-error=uninitialized -Wno-error=nontrivial-memcall -Wno-error=reserved-user-defined-literal -Wno-error=pointer-bool-conversion -Wno-nontrivial-memcall -Wno-error=implicit-function-declaration -Wno-error=instantiation-after-specialization -Wno-error=non-c-typedef-for-linkage -Wno-error=implicit-const-int-float-conversion -Wno-narrowing -Wno-error=literal-conversion -Wno-error=absolute-value -Wno-error=deprecated-declarations -Wno-error=missing-braces -Wno-error=return-type-c-linkage -Wno-error=format-nonliteral -Wno-error=delete-abstract-non-virtual-dtor -Wno-error=defaulted-function-deleted -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unnecessary-virtual-specifier -Wno-error=main -Wno-error=fortify-source -Wno-error=mismatched-tags -Wno-error=overloaded-virtual -Wno-error=unused-variable -Wno-error=unknown-pragmas -Wno-error=varargs -momit-leaf-frame-pointer -g2 -gdwarf-4 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -Wformat -Wformat-security -fmessage-length=0 -frecord-gcc-switches -fdiagnostics-color=never -m64 -march=nehalem -msse4.2 -mfpmath=sse -fasynchronous-unwind-tables -fno-omit-frame-pointer -g -Wall'
      ;;
    --cppflags)
      echo '-I/usr/include/GraphicsMagick'
      ;;
    --ldflags)
      echo '-L/usr/lib64 -Wl,-z,relro,--as-needed'
      ;;
    --libs)
      echo '-lGraphicsMagick -lz -lltdl -lm -lpthread'
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
