#!/bin/sh
prefix=/usr
exec_prefix=/usr/bin
libdir=/usr/lib

usage()
{
	cat <<EOF
Usage: pdal-config [OPTIONS]
Options:
	[--cflags]
	[--cxxflags]
	[--defines]
	[--includes]
	[--libs]
	[--plugin-dir]
	[--version]
EOF
	exit $1
}

if test $# -eq 0; then
	usage 1 1>&2
fi

case $1 in
  --libs)
    echo -L/usr/lib -lpdalcpp
    ;;

  --plugin-dir)
    echo lib
    ;;

  --prefix)
    echo ${prefix}
     ;;

  --ldflags)
    echo -L${libdir}
    ;;

  --defines)
    echo 
    ;;

  --includes)
    echo -I/usr/include -I/usr/include -I/usr/include/libxml2
    ;;

  --cflags)
    echo -march=x86-64-v3 -mtune=haswell -O3 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -mpclmul -g1 -ffile-prefix-map=/startdir/src=/usr/src/debug/pdal -flto=auto
    ;;

  --cxxflags)
    echo -march=x86-64-v3 -mtune=haswell -O3 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -mpclmul -Wp,-D_GLIBCXX_ASSERTIONS -g1 -ffile-prefix-map=/startdir/src=/usr/src/debug/pdal -flto=auto
    ;;

  --version)
    echo 2.9.2
    ;;

  *)
    usage 1 1>&2
    ;;

esac
