# 2022 11 13 Mouse # This dance is required because this verison of libgmp does not get # along with post-1.4T NetBSD. On some arches and versions, -O breaks # but -O2 works; on others, the other way around. Really should toss # libgmp and build my own. Until then.... # # Do this first to get errors fast on new arches. k="`uname -m`/`uname -s`/`uname -r`" case "$k" in */NetBSD/1.4T) opt=-O;; */NetBSD/1.6) opt=-O;; */NetBSD/2.0) opt=-O;; */NetBSD/2.1) opt=-O;; */NetBSD/3.0.1) opt=-O;; */NetBSD/3.1) opt=-O;; i386/NetBSD/4.0.1) opt=-O2;; macppc/NetBSD/4.0.1) opt=-O2;; shark/NetBSD/4.0.1) opt=-O2;; sparc/NetBSD/4.0.1) opt=-O2;; sparc64/NetBSD/4.0.1) opt=-O2;; sun3/NetBSD/4.0.1) opt=-O2;; i386/NetBSD/5.2) opt=-O2;; sparc/NetBSD/5.2) opt=-O2;; pmax/NetBSD/5.2) opt=-O2;; i686/Linux/2.6.28-18-generic) opt=-O2;; *) echo "Don't know optimization setting for $k" 1>&2 exit 1 ;; esac cd libgmp-2.0.2 git clean -d -x -f -q # Yeah, it's drunk the ./configure koolaid. :-þ env CC="cc $opt" CFLAGS=-g ./configure VER=2.0.2..`git log -1 --abbrev=10 --pretty=%h` export VERSION=libgmp-$VER make libgmp.a || exit 1 make check || exit 1 make install || exit 1 git clean -d -x -f -q sed -e "/^version/s@:.*@: $VER@" < ../WHERE_I_CAME_FROM.master > ../WHERE_I_CAME_FROM