#!/bin/sh
## ---------------------------------------------------------------------
## autoopts-config.in -- Tell a client where to find installed autoopts
## 
##  Autoopts copyright 1992-2002 Bruce Korb
## 
## Author:          Bruce Korb <bkorb@gnu.org>
## Maintainer:      Bruce Korb <bkorb@gnu.org>
## Created:         Mon Jun 30 15:35:12 1997                                  
## Last Modified:   $Date: 2002/04/01 03:18:27 $
##            by: bkorb
## ---------------------------------------------------------------------
## $Id: autoopts-config.in,v 2.7 2002/04/01 03:18:27 bkorb Exp $
## ---------------------------------------------------------------------
## Code:

package=autogen
prefix=/usr
exec_prefix=${prefix}
exec_prefix_set=no
exeext=
libdir=${exec_prefix}/lib
datadir=${prefix}/share
includedir=${prefix}/include
top_srcdir=

usage()
{
  cat <<EOF
Usage: autoopts-config [OPTIONS] [LIBRARIES]
Options:
        [--prefix[=DIR]]
        [--exec-prefix[=DIR]]
        [--version]
        [--libs]
        [--pkgdatadir]
        [--cflags]
        [--autogen]
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
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo_prefix=yes
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo_exec_prefix=yes
      ;;
    --top-builddir=*)
      top_builddir=$optarg
      ;;
    --top-srcdir=*)
      top_srcdir=$optarg
      ;;
    --version)
      echo 12:0:3
      exit 0
      ;;
    --libs)
      echo_libs=yes
      ;;
    --cflags)
      echo_cflags=yes
      ;;
    --autogen)
      echo_autogen=yes
      ;;
    --pkgdatadir)
      pkgdatadir="$datadir/$package"
      echo_pkgdatadir=yes
      ;;
    *)
      usage 1 1>&2
      ;;
  esac
  shift
done

if test x$echo_prefix = xyes; then
	echo $prefix
fi
if test x$echo_exec_prefix = xyes; then
	echo $exec_prefix
fi
if test x$echo_autogen = xyes; then
    if test x$top_builddir != x; then
        echo $top_builddir/src/autogen$exeext
    else
        echo $exec_prefix/bin/autogen$exeext
    fi
fi
if test x$echo_cflags = xyes; then
    if test x$top_srcdir != x; then
        includedir="$top_srcdir/autoopts"
    fi
    if test "$includedir" != /usr/include ; then
	echo -I$includedir
    fi
fi
if test x$echo_libs = xyes; then
    if test x$top_builddir != x; then
        echo "$top_builddir/autoopts/libopts.la "
    else
	echo "-L$libdir -lopts "
    fi
fi
if test "$echo_pkgdatadir" = "yes"; then
    if test x$top_srcdir != x; then
        echo "-L$top_srcdir/autoopts"
    else
	echo $pkgdatadir
    fi
fi

exit 0
## end autoopts-cinfig.in
