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
author: kx <kx@radix-linux.su> 2024-12-20 16:11:07 +0300 committer: kx <kx@radix-linux.su> 2024-12-20 16:11:07 +0300 commit: 868b2b66b564b5c00e3a74d10be45db7151627ac parent: cce2ae8d3312493b7653358bb4af201d3271377b
Commit Summary:
Version 1.0.14
Diffstat:
1 file changed, 90 insertions, 0 deletions
diff --git a/mpu-config.in b/mpu-config.in
new file mode 100644
index 0000000..b53a92b
--- /dev/null
+++ b/mpu-config.in
@@ -0,0 +1,107 @@
+#!/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