#!/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/libxml2
    ;;

  --cflags)
    echo -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -ggdb -fira-loop-pressure -fira-hoist-pressure -O2 -fno-omit-frame-pointer -flto=auto -mabi=lp64d -mstrict-align -march=loongarch64 -mtune=loongarch64 -msimd=none
    ;;

  --cxxflags)
    echo -ggdb -fno-permissive -fdeclone-ctor-dtor -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -ggdb -fira-loop-pressure -fira-hoist-pressure -O2 -fno-omit-frame-pointer -flto=auto -mabi=lp64d -mstrict-align -march=loongarch64 -mtune=loongarch64 -msimd=none
    ;;

  --version)
    echo 2.10.1
    ;;

  *)
    usage 1 1>&2
    ;;

esac
