#!/bin/sh
#
# libsent configuration result reporter
#
# "libsent-config --cflags" generates C defines, and
# "libsent-config --libs" generates libraries needed for compile with
# the sentlib
#
# by Doshita Lab. Speech Group, Kyoto University  1991-2000
# by Shikano Lab. Speech Group, NAIST 2002

#
# ripped from gtk's gtk-config.in
#
# $Id: libsent-config.in,v 1.4 2002/09/11 22:01:50 ri Exp $
#

sound_inc="@SOUNDINC@"
sound_libs="@SOUNDLIB@ @EXTRALIB@"
version="\
Julius/Julian libsent library rev.@VERSION@"
info="\
****************************************************************
Julius/Julian libsent library rev.@VERSION@:

         mic API type    : @altype@ (@aldesc@)
         NetAudio support: @use_netaudio@
 readable wavefile format: @wavefile_support@
         use POSIX thread: @use_pthread@
 
  Note: \"libsent-config\" in sentlib dir keeps required compile flags.
        When using this library, please add'
        \"libsent-config --cflags\" to CFLAGS and
        \"libsent-config --libs\" to LIBS.
****************************************************************"
usage="\
Usage: libsent-config [--libs] [--cflags] [--info] [--version]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

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

    case $1 in
	--cflags)
	    echo $sound_inc
	    ;;
	--libs)
	    echo $sound_libs @LIBS@
	    ;;
	--version)
	    echo "${version}"
	    ;;
	--info)
	    echo "${info}"
	    ;;
        *)
	    echo "${usage}" 1>&2
	    exit 1
	    ;;
    esac
    shift
done

echo

exit 0
