#!/bin/sh

coil_prefix="/opt/ros/kinetic"
coil_exec_prefix="/opt/ros/kinetic"
coil_cxx="g++"
coil_cflags="-Wall -fPIC -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -O2 -I/opt/ros/kinetic/include/coil-1.1"
coil_libs="-luuid -ldl -L/opt/ros/kinetic/lib -lpthread  -lRTC"
coil_libdir="/opt/ros/kinetic/lib/coil-1.1"
coil_version="1.1.0"
#
#  @file rtm-config
#  @brief OpenRTM-aist configuration access utility
#  @date $Date: 2005-05-12 09:06:18 $
#  @author Noriaki Ando <n-ando@aist.go.jp>
# 
#  Copyright (C) 2003-2005
#      Task-intelligence Research Group,
#      Intelligent Systems Research Institute,
#      National Institute of
#          Advanced Industrial Science and Technology (AIST), Japan
#      All rights reserved.
# 
#  $Id: rtm-config.in 775 2008-07-28 16:14:45Z n-ando $
# 

usage()
{
        cat <<EOF
Usage: rtm-config [OPTIONS]
Options:
        [--prefix[=DIR]]
        [--exec-prefix[=DIR]]
        [--version]
        [--libs]
        [--cflags]
        [--libdir]
        [--orb]
        [--idlc]
        [--idlflags]
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=*)
      rtm_exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo_exec_prefix=yes
      ;;
    --version)
      echo $rtm_version
      ;;
    --cflags)
      echo_cflags=yes
      ;;
    --libs)
      echo_libs=yes
      ;;
    --libdir)
      echo_libdir=yes
	  ;;
    --orb)
      echo_orb=yes
      ;;
    --idlc)
      echo_idlc=yes
      ;;
    --idlflags)
      echo_idlflags=yes
      ;;
    *)
      usage 1 1>&2
      ;;
  esac
  shift
done

if test "$echo_prefix" = "yes"; then
        echo $rtm_prefix
fi

if test "$echo_exec_prefix" = "yes"; then
        echo $rtm_exec_prefix
fi

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

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

if test "$echo_libdir" = "yes"; then
      echo $rtm_libdir
fi      

if test "$echo_orb" = "yes"; then
      echo $rtm_orb
fi      

if test "$echo_idlc" = "yes"; then
      echo $rtm_idlc
fi      

if test "$echo_idlflags" = "yes"; then
      echo $rtm_idlflags
fi      
