From: Sven Luther Date: Wed, 17 Dec 2003 00:04:46 +0000 (+0000) Subject: Backported new bignum configuration code. X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~810 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f497b82049e30d60aa928b25c1769c297b9bba64;p=ocaml.git Backported new bignum configuration code. --- diff --git a/debian/ocaml.dirs b/debian/ocaml.dirs index 04fe59ea..ba859252 100644 --- a/debian/ocaml.dirs +++ b/debian/ocaml.dirs @@ -1,5 +1,6 @@ usr/bin usr/lib/ocaml/3.07 +usr/lib/ocaml/3.07/config usr/include/ocaml/3.07 usr/share/man/man1 usr/share/man/man3 diff --git a/debian/patches/00list b/debian/patches/00list index dd78e5c5..e0eeb166 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,3 +1,4 @@ versioned_libdir objinfo hppa +config_bignum diff --git a/debian/patches/config_bignum.dpatch b/debian/patches/config_bignum.dpatch new file mode 100644 index 00000000..f56331a2 --- /dev/null +++ b/debian/patches/config_bignum.dpatch @@ -0,0 +1,77 @@ +#! /bin/sh -e +## config_bignum.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Makefiles, configure scripts and other build stuff adapted for +## DP: debian package creation + +if [ $# -ne 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi +case "$1" in + -patch) patch -f --no-backup-if-mismatch -p1 < $0;; + -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 +@DPATCH@ +diff -ur ocaml-3.07.2a.orig/configure ocaml-3.07.2a/configure +--- ocaml-3.07.2a.orig/configure 2003-12-17 00:59:21.000000000 +0100 ++++ ocaml-3.07.2a/configure 2003-12-17 00:59:00.000000000 +0100 +@@ -1021,30 +1021,21 @@ + # Determine the target architecture for the "num" library + + case "$host" in +- mips-*-ultrix*) bignum_arch=mips;; +- alpha*-*-osf*) bignum_arch=alpha;; +- i[3456]86-*-linux*) +- case `sh ./runtest elf.c` in +- elf) bignum_arch=x86;; +- *) bignum_arch=C;; +- esac;; +- i[3456]86-*-beos) bignum_arch=x86;; +- i[3456]86-*-*bsd*) +- case `sh ./runtest elf.c` in +- elf) bignum_arch=x86;; +- *) bignum_arch=C;; +- esac;; +- sparc*-*-sunos*) bignum_arch=supersparc;; +- sparc*-*-solaris*) bignum_arch=supersparc-solaris;; +- sparc*-*-*bsd*) bignum_arch=sparc;; +- m68k-*-sunos*) bignum_arch=68K;; +- *) bignum_arch=C ++ alpha*-*-*) bng_arch=alpha; bng_asm_level=1;; ++ i[3456]86-*-*) bng_arch=ia32 ++ if `sh ./trycompile ia32sse2.c` ++ then bng_asm_level=2 ++ else bng_asm_level=1 ++ fi;; ++ mips-*-*) bng_arch=mips; bng_asm_level=1;; ++ powerpc-*-*) bng_arch=ppc; bng_asm_level=1;; ++ sparc*-*-*) bng_arch=sparc; bng_asm_level=1;; ++ x86_64-*-*) bng_arch=amd64; bng_asm_level=1;; ++ *) bng_arch=generic; bng_asm_level=0;; + esac + +-# Some systems (e.g. Solaris) don't have an assembler! +-if sh ./searchpath as; then :; else bignum_arch=C; fi +- +-echo "BIGNUM_ARCH=$bignum_arch" >> Makefile ++echo "BNG_ARCH=$bng_arch" >> Makefile ++echo "BNG_ASM_LEVEL=$bng_asm_level" >> Makefile + + # Determine if the POSIX threads library is supported + +@@ -1524,7 +1515,7 @@ + echo " $otherlibraries" + + echo "Configuration for the \"num\" library:" +-echo " target architecture ...... $bignum_arch" ++echo " target architecture ...... $bng_arch (asm level $bng_asm_level)" + + if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then + echo "Configuration for the \"graph\" library:" diff --git a/debian/rules b/debian/rules index f523a690..69f809d5 100755 --- a/debian/rules +++ b/debian/rules @@ -135,6 +135,8 @@ install-arch: $(CURDIR)/debian/ocaml/usr/share/lintian/overrides/ocaml install -m 644 otherlibs/labltk/README \ $(CURDIR)/debian/README.labltk + install -m 644 config/Makefile \ + $(CURDIR)/debian/ocaml/usr/lib/ocaml/$(VERSION)/config/Makefile # Then move the ocaml-base package. dh_movefiles -pocaml-base --sourcedir=debian/ocaml