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/bootstrap b/bootstrap
new file mode 100755
index 0000000..b1fa3be
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+CWD=`pwd`
+
+program=`basename $0`
+
+usage() {
+  cat << EOF
+
+Usage: $program [options]
+
+Options:
+  -h,--help                  Display this message.
+  -d,--target-dest-dir=DIR   The target ROOTFS directory
+                             [default: DIR=/].
+
+EOF
+}
+
+TARGET_DEST_DIR=/
+ACDIR=usr/share/aclocal
+INCDIR=usr/include
+SYSTEM_ACDIR=
+SYSTEM_INCDIR=
+
+while [ 0 ] ; do
+  if [ "$1" = "-h" -o "$1" = "--help" ] ; then
+    usage
+    exit 0
+  elif [ "$1" = "-d" -o "$1" = "--target-dest-dir" ] ; then
+    if [ "$2" = "" ] ; then
+      echo -e "\n${program}: ERROR: --target-dest-dir is not specified.\n"
+      usage
+      exit 1
+    fi
+    TARGET_DEST_DIR="$2"
+    shift 2
+  elif [[ $1 == --target-dest-dir=* ]] ; then
+    TARGET_DEST_DIR="`echo $1 | cut -f2 -d'='`"
+    shift 1
+  else
+    if [ "$1" != "" ] ; then
+      echo -e "\n${program}: ERROR: Unknown argument: $1.\n"
+      usage
+      exit 1
+    fi
+    break
+  fi
+done
+
+if [ ! -d "${TARGET_DEST_DIR}" ] ; then
+  echo -e "\n${program}: ERROR: --target-dest-dir is not a directory.\n"
+  usage
+  exit 1
+fi
+
+#
+# Absolute path:
+#
+if [ "${TARGET_DEST_DIR:0:1}" != "/" ] ; then
+  TARGET_DEST_DIR=${CWD}/${TARGET_DEST_DIR}
+fi
+
+#
+# Remove last '/' char:
+#
+if [ "${TARGET_DEST_DIR: -1}" = "/" ] ; then
+  len=${#TARGET_DEST_DIR}
+  let "len = len - 1"
+  tmp="${TARGET_DEST_DIR:0:$len}"
+  TARGET_DEST_DIR=${tmp}
+fi
+
+SYSTEM_ACDIR="${TARGET_DEST_DIR}/${ACDIR}"
+SYSTEM_INCDIR="${TARGET_DEST_DIR}/${INCDIR}"
+
+################################################################
+# Libtool:
+#
+libtoolize --force --copy
+#
+# Используется если в configure.ac вызывается LT_INIT.
+# Patch необходим по тому, что и lib-ld.m4 и libtool.m4
+# используют функцию AC_ARG_WITH([gnu-ld], ...
+# а это приводит к тому, что ./configure --help дважды
+# выдает подсказку --with-gnu-ld :
+#
+patch -p0 < $CWD/config/patches/libtool.m4.patch
+patch -p0 < $CWD/config/patches/libtool.m4-shared.patch
+
+#
+# End of Libtool.
+################################################################
+
+
+aclocal --install -I m4 --force --system-acdir=${SYSTEM_ACDIR}
+autoheader --include=${SYSTEM_INCDIR}
+automake --gnu --add-missing --copy --force-missing
+autoconf --force
+
+
+################################################################
+# Remove cache and back files:
+#
+rm -rf autom4te.cache *~
+#
+# End of Cleanup.
+################################################################