#!/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 /usr/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=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection
    ;;

  --cxxflags)
    echo -march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -Wp,-D_GLIBCXX_ASSERTIONS
    ;;

  --version)
    echo 2.6.3
    ;;

  *)
    usage 1 1>&2
    ;;

esac
