#! /bin/sh
## ---------------------------------------------------------------------
## autoopts-config.in -- Describe AutoOpts configuration
##
##  Autoopts Copyright (c) 1992-2012 by Bruce Korb
##
## DO NOT EDIT THIS FILE   (autoopts-config.in)
## 
## It has been AutoGen-ed  August 11, 2012 at 09:41:23 AM by AutoGen 5.16.2pre7
## From the definitions    aoconf.def
## and the template file   aoconf.tpl
##
      prefix="/usr/local"
 datarootdir="${prefix}/share"
     datadir="${datarootdir}"
     package="autogen"
  includedir="/usr/local/include/autogen"
 exec_prefix="${prefix}"
      bindir="${exec_prefix}/bin"
      libdir="${exec_prefix}/lib"
      ldopts="-Wl,-R${libdir}"
      exeext=""
     version="36:5:11"
      dotver="36.5.11"
  pkgdatadir="${datadir}/${package}"
     autogen="${bindir}/autogen${exeext}"
     ldflags="-L${libdir} -lopts"
        libs="${ldflags}"
      libsrc="${pkgdatadir}/libopts-${dotver}.tar.gz"
 static_libs="${libdir}/libopts.a"
      cflags="-I${includedir}"
test 'Xyes' = Xno && static_libs=''
case "${libdir}" in
/lib | /lib64 | /usr/lib | /usr/lib64 )
    ldopts=''
    ldflags=-lopts
    ;;

* )
    test -n "${ldopts}" && \
        ldflags="${ldopts}${libdir} ${ldflags}"
    ;;
esac
libs=${ldflags}
test "${includedir}" = "/usr/include" && cflags=""
optlist="\
    autogen     bindir      cflags      datadir     datarootdir dotver
    everything  exec_prefix exeext      includedir  ldflags     ldopts
    libdir      libs        libsrc      package     pkgdatadir  prefix
    static_libs version"

usage()
{
  test $# -gt 0 && {
    exec 1>&2
    echo autoopts-config error: "$*"
  }

  echo Usage: autoopts-config \<\<OPTION\>\> [ ... ]
  echo Options may be one or more of:

  for o in $optlist
  do  echo "       ${o}"
  done | sed 's,_,-,g'
  echo 'NB: "everything" will print out the list of all names and values.'
  exit $#
}

test $# -gt 0 || usage "No value specified"

# Figure out what's wanted
#
val=''
for o in "$@" ; do
  o=`echo ${o} | sed 's,^-*,,;s/-/_/g'`
  case "$o" in
  help | h | \? )   usage ;;
  *[!a-zA-Z0-9_]* ) usage "Invalid name:  ${o}" ;;

  prefix      ) val="${val} ${prefix}"       ;;
  datarootdir ) val="${val} ${datarootdir}"  ;;
  datadir     ) val="${val} ${datadir}"      ;;
  package     ) val="${val} ${package}"      ;;
  includedir  ) val="${val} ${includedir}"   ;;
  exec_prefix ) val="${val} ${exec_prefix}"  ;;
  bindir      ) val="${val} ${bindir}"       ;;
  libdir      ) val="${val} ${libdir}"       ;;
  ldopts      ) val="${val} ${ldopts}"       ;;
  exeext      ) val="${val} ${exeext}"       ;;
  version     ) val="${val} ${version}"      ;;
  dotver      ) val="${val} ${dotver}"       ;;
  pkgdatadir  ) val="${val} ${pkgdatadir}"   ;;
  autogen     ) val="${val} ${autogen}"      ;;
  ldflags     ) val="${val} ${ldflags}"      ;;
  libs        ) val="${val} ${libs}"         ;;
  libsrc      ) val="${val} ${libsrc}"       ;;
  static_libs ) val="${val} ${static_libs}"  ;;
  cflags      ) val="${val} ${cflags}"       ;;
  everything  )
     for o in ${optlist}
     do test ${o} = everything && continue
        eval v=\"\${${o}}\"
        test -z "${v}" && echo ${o} || \
           printf "%-12s $v\n" ${o}
     done
     exit 0
     ;;

  * ) usage "Unknown value name:  ${o}" ;;
  esac
done

echo "${val}"
## end of autoopts-config.in
