#!/bin/sh

dpsearch_cflags="-O2 -pipe  -fno-strict-aliasing -I/usr/local/include -DHAVE_PTHREAD -D_REENTRANT -I/usr/local/include       -I/usr/local/include     "
dpsearch_tl_cflags="-O2 -pipe  -fno-strict-aliasing -I/usr/local/include -I/usr/local/include       -I/usr/local/include     "

dpsearch_libs="-L/usr/local/lib -ldpsearch -ldpcharset -pthread -L/usr/local/lib -lm -lz        -L/usr/local/lib -lpq -lcrypt     -L/lib -lssl -lcrypto -lpthread "
dpsearch_tl_libs="-L/usr/local/lib -ldpsearch_mod -ldpcharset -pthread -L/usr/local/lib -lm -lz       -L/usr/local/lib -lpq -lcrypt     -L/lib -lssl -lcrypto "
prefix=/usr/local
sysconfdir=/usr/local/etc/dpsearch

usage()
{
	cat <<EOF
Usage: $0 [OPTIONS]
Options:
	[--version]
	[--version-id]
	[--cflags]
	[--libs]
	[--threadsless-cflags]
	[--threadsless-libs]
EOF
	exit $1
}

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

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --version)
      echo 4.53
      ;;
    --version-id)
      echo 453
      ;;
    --cflags)
      echo_cflags=yes
      ;;
    --libs)
      echo_libs=yes
      ;;
    --threadsless-cflags)
      echo_tl_cflags=yes
      ;;
    --threadsless-libs)
      echo_tl_libs=yes
      ;;
    *)
      usage 1 1>&2
      ;;
  esac
  shift
done

if test "$echo_cflags" = "yes"; then
	echo $dpsearch_cflags
fi

if test "$echo_libs" = "yes"; then
	echo $dpsearch_libs
fi      

if test "$echo_tl_cflags" = "yes"; then
	echo $dpsearch_tl_cflags
fi

if test "$echo_tl_libs" = "yes"; then
	echo $dpsearch_tl_libs
fi      

