Math Processor Unit Library

libmpu – library of arithmetic functions for integer, real, and complex numbers of increased digit capacity

16 Commits   0 Branches   2 Tags
#!/bin/sh

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

real_io_data_limit=@LIBMPU_REAL_IO_LIMIT@
math_fn_data_limit=@LIBMPU_REAL_MATH_F_LIMIT@
real_max_width=@LIBMPU_REAL_MAX_WIDTH@

VERSION=@VERSION@

usage()
{
cat <<EOF

  Usage    : mpu-config [OPTIONS]
  Options  :
             [--prefix[=DIR]]
             [--exec-prefix[=DIR]]
             [--version]
             [--real-io-data-limit]
             [--math-fn-data-limit]
             [--real-max-width]
             [--cppflags]
             [--cflags]
             [--libs]
             [--ldflags]

EOF
  exit $1
}

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

while test $# -gt 0; do
  case $1 in
    --prefix)
      echo_prefix=yes
      ;;
    --exec-prefix)
      echo_exec_prefix=yes
      ;;
    --version)
      echo ${VERSION}
      ;;
    --real-io-data-limit)
      echo ${real_io_data_limit}
      ;;
    --math-fn-data-limit)
      echo ${math_fn_data_limit}
      ;;
    --real-max-width)
      echo ${real_max_width}
      ;;
    --cppflags)
      echo_cppflags=yes
      ;;
    --cflags)
      echo_cflags=yes
      ;;
    --libs)
      echo_libs=yes
      ;;
    --ldflags)
      echo_ldflags=yes
      ;;
    *)
      usage 1 1>&2
      ;;
  esac
  shift
done


libmpu_cppflags=" -I${includedir}"
libmpu_cflags=" -I${includedir}"
libmpu_ldflags=" -L${libdir}"
libmpu_libs=" -lmpu"


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_cppflags}" = "xyes"; then
  echo ${libmpu_cppflags}
fi

if test "x${echo_cflags}" = "xyes"; then
  echo ${libmpu_cflags}
fi

if test "x${echo_ldflags}" = "xyes"; then
  echo ${libmpu_ldflags}
fi

if test "x${echo_libs}" = "xyes"; then
  echo ${libmpu_libs}
fi