+Patch for autotools for:
+* allow build of shared libraries with libtool
+* fix m4 macros for newer autoconf
+* modernize configure.ac
+* fix parallel make issues with fortran modules
+
+Sebastien Fabbro Jan. 2012
+
diff -Nur qd-2.3.12.orig/configure.ac qd-2.3.12/configure.ac
--- qd-2.3.12.orig/configure.ac 2012-01-12 19:44:25.000000000 +0000
+++ qd-2.3.12/configure.ac 2012-01-12 22:34:18.000000000 +0000
bin_SCRIPTS=qd-config
-diff -Nur qd-2.3.12.orig/README.txt qd-2.3.12/README.txt
---- qd-2.3.12.orig/README.txt 1970-01-01 01:00:00.000000000 +0100
-+++ qd-2.3.12/README.txt 2012-01-12 20:17:09.000000000 +0000
-@@ -0,0 +1,704 @@
-+-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ \r
-+QUAD-‐DOUBLE/DOUBLE-‐DOUBLE \r COMPUTATION \r PACKAGE \r \r
-+ \r
-+ \r
-+ \r
-+ \r
-+ \r
-+Copyright \r (c) \r 2005-‐2010 \r \r
-+ \r
-+ \r
-+ \r
-+ \r
-+-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ \r
-+ \r
-+Revision \r date: \r \r 2010 \r June \r 14 \r
-+ \r
-+Authors: \r
-+Yozo \r Hida \r
-+ \r
-+U.C. \r Berkeley \r \r \r \r \r
-+ \r
-+yozo@cs.berkeley.edu \r
-+Xiaoye \r S. \r Li \r \r \r
-+Lawrence \r Berkeley \r Natl \r Lab \r \r \r xiaoye@nersc.gov \r
-+David \r H. \r Bailey \r \r \r
-+Lawrence \r Berkeley \r Natl \r Lab \r \r \r dhbailey@lbl.gov \r
-+ \r
-+C++ \r usage \r guide: \r
-+Alex \r Kaiser \r \r \r
-+Lawrence \r Berkeley \r Natl \r Lab \r \r adkaiser@lbl.gov \r
-+ \r
-+This \r work \r was \r supported \r by \r the \r Director, \r Office \r of \r Science, \r Division \r of \r Mathematical, \r
-+Information, \r and \r Computational \r Sciences \r of \r the \r U.S. \r Department \r of \r Energy \r under \r contract \r
-+number \r DE-‐AC02-‐05CH11231. \r
-+ \r
-+This \r work \r was \r supported \r by \r the \r Director, \r Office \r of \r Science, \r Division \r of \r Mathematical, \r
-+Information, \r and \r Computational \r Sciences \r of \r the \r U.S. \r Department \r of \r Energy \r under \r contract \r
-+numbers \r DE-‐AC03-‐76SF00098 \r and \r DE-‐AC02-‐05CH11231. \r
-+ \r
-+*** \r IMPORTANT \r NOTES: \r
-+ \r
-+See \r the \r file \r COPYING \r for \r modified \r BSD \r license \r information. \r
-+See \r the \r file \r INSTALL \r for \r installation \r instructions. \r
-+See \r the \r file \r NEWS \r for \r recent \r revisions. \r
-+ \r
-+Outline: \r
-+ \r
-+I. \r \r \r Introduction \r
-+II. \r \r Directories \r and \r Files \r
-+III. \r C++ \r Usage \r
-+IV. \r \r Fortran \r Usage \r
-+V. \r \r \r Note \r on \r x86-‐Based \r Processors \r (MOST \r systems \r in \r use \r today) \r
-+ \r
-+ \r
-+I. \r Introduction \r
-+ \r
-+This \r package \r provides \r numeric \r types \r of \r twice \r the \r precision \r of \r IEEE \r double \r (106 \r mantissa \r
-+bits, \r or \r approximately \r 32 \r decimal \r digits) \r and \r four \r times \r the \r precision \r of \r IEEE \r double \r (212 \r
-+mantissa \r bits, \r or \r approximately \r 64 \r decimal \r digits). \r \r Due \r to \r features \r such \r as \r operator \r and \r
-+function \r overloading, \r these \r facilities \r can \r be \r utilized \r with \r only \r minor \r modifications \r to \r
-+conventional \r C++ \r and \r Fortran-‐90 \r programs. \r
-+ \r
-+In \r addition \r to \r the \r basic \r arithmetic \r operations \r (add, \r subtract, \r multiply, \r divide, \r square \r root), \r
-+common \r transcendental \r functions \r such \r as \r the \r exponential, \r logarithm, \r trigonometric \r and \r
-+hyperbolic \r functions \r are \r also \r included. \r \r A \r detailed \r description \r of \r the \r algorithms \r used \r is \r
-+
-+\favailable \r in \r the \r docs \r subdirectory \r (see \r docs/qd.ps). \r \r An \r abridged \r version \r of \r this \r paper, \r
-+which \r was \r presented \r at \r the \r ARITH-‐15 \r conference, \r is \r also \r available \r in \r this \r same \r directory \r
-+(see \r docs/arith15.ps). \r
-+ \r
-+II. \r Directories \r and \r Files \r
-+ \r
-+There \r are \r six \r directories \r and \r several \r files \r in \r the \r main \r directory \r of \r this \r distribution, \r
-+described \r below \r
-+ \r
-+src \r \r \r This \r contains \r the \r source \r code \r of \r the \r quad-‐double \r and \r double-‐double \r
-+ \r \r
-+ \r
-+library. \r \r This \r source \r code \r does \r not \r include \r inline \r functions, \r
-+ \r \r
-+ \r
-+which \r are \r found \r in \r the \r header \r files \r in \r the \r include \r directory. \r
-+ \r
-+include \r \r This \r directory \r contains \r the \r header \r files. \r
-+ \r
-+fortran \r \r This \r directory \r contains \r Fortran-‐90 \r files. \r
-+ \r
-+tests \r This \r directory \r contains \r some \r simple \r (not \r comprehensive) \r tests. \r
-+ \r
-+docs \r \r This \r directory \r contains \r two \r papers \r describing \r the \r algorithms. \r
-+ \r
-+config \r \r \r This \r directory \r contains \r various \r scripts \r used \r by \r the \r configure \r
-+ \r \r
-+ \r
-+script \r and \r the \r Makefile. \r
-+ \r
-+ \r
-+ \r
-+ \r
-+C++ \r Usage: \r \r
-+ \r
-+Please \r note \r that \r all \r commands \r refer \r to \r a \r Unix-‐type \r environment \r such \r as \r Mac \r OSX \r or \r Ubuntu \r
-+Linux \r using \r the \r bash \r shell. \r \r
-+ \r
-+ \r
-+A. \r Building \r
-+ \r
-+To \r build \r the \r library, \r first \r run \r the \r included \r configure \r script \r by \r typing \r \r
-+ \r
-+./configure \r
-+ \r
-+This \r script \r automatically \r generates \r makefiles \r for \r building \r the \r library \r and \r selects \r compilers \r
-+and \r necessary \r flags \r and \r libraries \r to \r include. \r If \r the \r user \r wishes \r to \r specify \r compilers \r or \r flags \r
-+they \r may \r use \r the \r following \r options. \r \r
-+ \r
-+CXX \r \r \r \r \r \r \r \r
-+C++ \r compiler \r to \r use \r
-+CXXFLAGS \r \r \r C++ \r compiler \r flags \r to \r use \r
-+CC \r \r \r \r \r \r \r \r \r \r
-+C \r compiler \r to \r use \r (for \r C \r demo \r program) \r
-+CFLAGS \r \r \r \r \r
-+C \r compiler \r flags \r to \r use \r (for \r C \r demo \r program) \r
-+FC \r \r \r \r \r \r \r \r \r \r
-+Fortran \r 90 \r compiler \r
-+FCFLAGS \r \r \r \r
-+Fortran \r 90 \r compiler \r flags \r to \r use \r
-+FCLIBS \r \r \r \r \r
-+Fortran \r 90 \r libraries \r needed \r to \r link \r with \r C++ \r code. \r
-+ \r
-+
-+\fFor \r example, \r if \r one \r is \r using \r GNU \r compilers, \r configure \r with: \r
-+ \r
-+./configure \r CXX=g++ \r FC=gfortran \r
-+ \r
-+The \r Fortran \r and \r C++ \r compilers \r must \r produce \r compatible \r binaries. \r On \r some \r systems \r
-+additional \r flags \r must \r be \r included \r to \r ensure \r that \r portions \r of \r the \r library \r are \r not \r built \r with \r 32 \r
-+and \r 64 \r bit \r object \r files. \r For \r example, \r on \r 64-‐Bit \r Mac \r OSX \r 10.6 \r (Snow \r Leopard) \r the \r correct \r
-+configure \r line \r using \r GNU \r compilers \r is: \r \r
-+ \r
-+ \r ./configure \r CXX=g++ \r FC=gfortran \r FCFLAGS=-‐m64 \r
-+ \r
-+To \r build \r the \r library, \r simply \r type \r \r
-+ \r
-+make \r \r
-+ \r
-+and \r the \r automatically \r generated \r makefiles \r will \r build \r the \r library \r including \r archive \r files. \r \r
-+ \r
-+To \r allow \r for \r easy \r linking \r to \r the \r library, \r the \r user \r may \r also \r wish \r to \r install \r the \r archive \r files \r to \r a \r
-+standard \r place. \r To \r do \r this \r type: \r
-+ \r
-+make \r install \r
-+ \r
-+This \r will \r also \r build \r the \r library \r if \r it \r has \r not \r already \r been \r built. \r Many \r systems, \r including \r Mac \r
-+and \r Ubuntu \r Linux \r systems, \r require \r administrator \r privileges \r to \r install \r the \r library \r at \r such \r
-+standard \r places. \r On \r such \r systems, \r one \r may \r type: \r \r
-+ \r
-+sudo \r make \r install \r \r
-+ \r
-+instead \r if \r one \r has \r sufficient \r access. \r \r
-+ \r
-+The \r directory \r ‘tests’ \r contains \r programs \r for \r high \r precision \r quadrature \r and \r integer-‐relation \r
-+detection. \r To \r build \r such \r programs, \r type: \r
-+ \r
-+ \r
-+make \r demo \r
-+ \r
-+in \r the \r \r ‘tests’ \r directory. \r \r
-+ \r
-+B. \r Linking \r \r
-+ \r
-+The \r simplest \r way \r to \r link \r to \r the \r library \r is \r to \r install \r it \r to \r a \r standard \r place \r as \r described \r above, \r
-+and \r use \r the \r –l \r option. \r For \r example \r
-+ \r
-+g++ \r compileExample.cpp \r -‐o \r compileExample \r -‐l \r qd \r
-+ \r
-+One \r can \r also \r use \r this \r method \r to \r build \r with \r make. \r A \r file \r called \r “compileExample.cpp” \r and \r the \r
-+associated \r makefile \r “makeCompileExample” \r illustrate \r the \r process. \r \r
-+ \r
-+A \r third \r alternative \r is \r to \r use \r a \r link \r script. \r If \r one \r types \r “make \r demo” \r in \r the \r test \r directory, \r the \r
-+output \r produced \r gives \r guidance \r as \r to \r how \r to \r build \r the \r files. \r By \r following \r the \r structure \r of \r
-+the \r compiling \r commands \r one \r may \r copy \r the \r appropriate \r portions, \r perhaps \r replacing \r the \r
-+
-+\ffilename \r with \r an \r argument \r that \r the \r user \r can \r include \r at \r link \r time. \r An \r example \r of \r such \r a \r
-+script \r is \r as \r follows: \r
-+ \r
-+g++ \r -‐DHAVE_CONFIG_H \r \r \r -‐I.. \r -‐I../include \r -‐I../include \r \r \r -‐O2 \r \r -‐MT \r $1.o \r -‐MD \r -‐MP \r -‐MF \r
-+.deps/qd_test.Tpo \r -‐c \r -‐o \r $1.o \r $1.cpp \r
-+mv \r -‐f \r .deps/$1.Tpo \r .deps/$1.Po \r
-+g++ \r \r -‐O2 \r \r \r \r -‐o \r $1 \r $1.o \r ../src/libqd.a \r –lm \r
-+ \r
-+To \r use \r it, \r make \r the \r link \r script \r executable \r and \r type: \r
-+ \r
-+./link.scr \r compileExample \r
-+ \r
-+Note \r that \r the \r file \r extension \r is \r not \r included \r because \r the \r script \r handles \r all \r extensions, \r
-+expecting \r the \r source \r file \r to \r have \r the \r extension \r ‘.cpp’ \r . \r \r
-+ \r
-+C. \r Programming \r techniques \r
-+ \r
-+As \r much \r as \r possible, \r operator \r overloading \r is \r included \r to \r make \r basic \r programming \r as \r much \r
-+like \r using \r standard \r typed \r floating-‐point \r arithmetic. \r Changing \r many \r codes \r should \r be \r as \r
-+simple \r as \r changing \r type \r statements \r and \r a \r few \r other \r lines. \r \r
-+ \r
-+i. \r Constructors \r
-+ \r
-+To \r create \r dd_real \r and \r qd_real \r variables \r calculated \r to \r the \r proper \r precision, \r one \r must \r use \r
-+care \r to \r use \r the \r included \r constructors \r properly. \r Many \r computations \r in \r which \r variables \r are \r
-+not \r explicitly \r typed \r to \r multiple-‐precision \r may \r be \r evaluated \r with \r double-‐precision \r
-+arithmetic. \r The \r user \r must \r take \r care \r to \r ensure \r that \r this \r does \r not \r cause \r errors. \r In \r particular, \r
-+an \r expression \r such \r as \r 1.0/3.0 \r will \r be \r evaluated \r to \r double \r precision \r before \r assignment \r or \r
-+further \r arithmetic. \r Upon \r assignment \r to \r a \r multi-‐precision \r variable, \r the \r value \r will \r be \r zero \r
-+padded. \r This \r problem \r is \r serious \r and \r potentially \r difficult \r to \r debug. \r To \r avoid \r this, \r use \r the \r
-+included \r constructors \r to \r force \r arithmetic \r to \r be \r performed \r in \r the \r full \r precision \r requested. \r
-+Here \r is \r a \r list \r of \r the \r included \r constructors \r with \r brief \r descriptions: \r
-+ \r
-+Type \r dd_real, \r with \r text \r of \r inline \r constructors \r included: \r \r
-+ \r
-+Constructor \r
-+Description \r \r
-+ \r
-+ \r
-+dd_real(double \r hi, \r double \r lo) \r \r
-+Initializes \r from \r two \r double \r precision \r values. \r \r
-+{ \r x[0] \r = \r hi; \r x[1] \r = \r lo; \r } \r
-+ \r
-+ \r
-+ \r
-+dd_real() \r {x[0] \r = \r 0.0; \r x[1] \r = \r 0.0; \r } \r
-+Default \r constructor \r initializes \r to \r zero. \r \r
-+ \r
-+ \r
-+dd_real(double \r h) \r { \r x[0] \r = \r h; \r x[1] \r = \r 0.0; \r } \r
-+Initializes \r from \r a \r double \r precision \r value, \r
-+ \r
-+setting \r the \r trailing \r part \r to \r zero. \r Use \r care \r to \r
-+ \r
-+ensure \r that \r the \r trailing \r part \r should \r actually \r
-+ \r
-+be \r set \r to \r zero. \r \r
-+ \r
-+ \r
-+ \r
-+ \r
-+ \r
-+ \r
-+dd_real(int \r h) \r { \r
-+Initializes \r from \r an \r integer \r value, \r setting \r the \r
-+
-+\f \r \r \r \r x[0] \r = \r (static_cast<double>(h)); \r
-+trailing \r part \r to \r zero. \r Use \r care \r to \r ensure \r that \r
-+ \r \r \r \r x[1] \r = \r 0.0; \r
-+the \r trailing \r part \r should \r actually \r be \r set \r to \r
-+ \r \r } \r
-+zero. \r \r
-+ \r
-+ \r
-+dd_real \r (const \r char \r *s); \r
-+Initializes \r from \r a \r string. \r \r
-+ \r
-+ \r
-+explicit \r dd_real \r (const \r double \r *d) \r { \r
-+Initializes \r from \r a \r length \r two \r array \r of \r double \r
-+ \r \r \r \r x[0] \r = \r d[0]; \r x[1] \r = \r d[1]; \r
-+precision \r values. \r \r
-+ \r \r } \r \r
-+ \r
-+ \r
-+ \r
-+ \r
-+ \r
-+Type \r qd_real, \r with \r their \r functions \r included \r inline: \r \r
-+ \r
-+Constructor \r \r
-+Description \r \r
-+ \r
-+ \r
-+inline \r qd_real::qd_real \r
-+Initializes \r from \r four \r double \r precision \r values. \r \r
-+(double \r x0, \r double \r x1, \r double \r x2, \r double \r x3) \r \r
-+{ \r
-+ \r
-+ \r \r \r
-+ \r x[0] \r = \r x0; \r
-+ \r
-+ \r \r \r
-+ \r x[1] \r = \r x1; \r
-+ \r
-+ \r \r \r
-+ \r x[2] \r = \r x2; \r
-+ \r
-+ \r \r \r
-+ \r x[3] \r = \r x3; \r
-+ \r
-+} \r
-+ \r
-+ \r
-+ \r
-+inline \r qd_real::qd_real(const \r double \r *xx) \r { \r
-+Initializes \r from \r a \r length \r four \r array \r of \r double \r
-+ \r \r \r
-+ \r x[0] \r = \r xx[0]; \r
-+precision \r values. \r \r
-+ \r \r \r
-+ \r x[1] \r = \r xx[1]; \r
-+ \r
-+ \r \r
-+ \r x[2] \r = \r xx[2]; \r
-+ \r
-+ \r \r \r
-+ \r x[3] \r = \r xx[3]; \r
-+ \r
-+ \r
-+} \r
-+ \r
-+ \r
-+ \r
-+inline \r qd_real::qd_real(double \r x0) \r { \r
-+Initializes \r from \r a \r double \r precision \r value, \r
-+ \r \r \r
-+ \r x[0] \r = \r x0; \r
-+setting \r the \r trailing \r part \r to \r zero. \r Use \r care \r to \r
-+ \r \r \r
-+ \r x[1] \r = \r x[2] \r = \r x[3] \r = \r 0.0; \r
-+ensure \r that \r the \r trailing \r part \r should \r actually \r
-+} \r
-+be \r set \r to \r zero. \r \r
-+ \r
-+ \r
-+inline \r qd_real::qd_real() \r { \r
-+Default \r constructor \r initializes \r to \r zero. \r \r
-+ \r
-+ \r x[0] \r = \r 0.0; \r \r
-+ \r
-+ \r
-+ \r x[1] \r = \r 0.0; \r \r
-+ \r
-+ \r
-+ \r x[2] \r = \r 0.0; \r \r
-+ \r
-+ \r
-+ \r x[3] \r = \r 0.0; \r \r
-+ \r
-+} \r
-+ \r
-+ \r
-+ \r
-+inline \r qd_real::qd_real(const \r dd_real \r &a) \r { \r
-+Initializes \r from \r a \r double-‐double \r value, \r
-+ \r \r \r
-+ \r x[0] \r = \r a._hi(); \r
-+setting \r the \r trailing \r part \r to \r zero. \r
-+ \r \r \r
-+ \r x[1] \r = \r a._lo(); \r
-+ \r
-+ \r \r \r
-+ \r x[2] \r = \r x[3] \r = \r 0.0; \r
-+ \r
-+} \r
-+ \r
-+inline \r qd_real::qd_real(int \r i) \r { \r
-+Initializes \r from \r an \r integer \r value, \r setting \r the \r
-+
-+\f \r \r \r
-+ \r x[0] \r = \r static_cast<double>(i); \r
-+trailing \r part \r to \r zero. \r Use \r care \r to \r ensure \r that \r
-+ \r \r \r
-+ \r x[1] \r = \r x[2] \r = \r x[3] \r = \r 0.0; \r
-+the \r trailing \r part \r should \r actually \r be \r set \r to \r
-+} \r
-+zero. \r \r
-+ \r
-+ \r
-+ \r
-+ \r
-+Some \r examples \r of \r initialization \r are \r as \r follows \r
-+ \r
-+ \r
-+qd_real \r x \r = \r “1.0” \r ; \r \r
-+ \r
-+x \r /= \r 3.0 \r ; \r \r
-+ \r
-+or \r \r
-+ \r
-+ \r
-+qd_real \r x \r = \r qd_real(1.0) \r / \r 3.0 \r ; \r \r
-+ \r
-+ \r
-+ii. \r Included \r functions \r and \r Constants \r \r
-+ \r
-+Supported \r functions \r include \r assignment \r operators, \r comparisons, \r arithmetic \r and \r
-+assignment \r operators, \r and \r increments \r for \r integer \r types. \r Standard \r C \r math \r functions \r such \r as \r
-+exponentiation, \r trigonometric, \r logarithmic, \r hyperbolic, \r exponential \r and \r rounding \r functions \r
-+are \r included. \r As \r in \r assignment \r statements, \r one \r must \r be \r careful \r with \r implied \r typing \r of \r
-+constants \r when \r using \r these \r functions. \r Many \r codes \r need \r particular \r conversion \r for \r the \r power \r
-+function, \r which \r is \r frequently \r used \r with \r constants \r that \r must \r be \r explicitly \r typed \r for \r multi-‐
-+precision \r codes. \r \r
-+ \r
-+Many \r constants \r are \r included, \r which \r are \r global \r and \r calculated \r upon \r initialization. \r The \r
-+following \r list \r of \r constants \r is \r calculated \r for \r both \r the \r dd_real \r and \r qd_real \r classes \r separately. \r
-+Use \r care \r to \r select \r the \r correct \r value. \r The \r variables, \r with \r type \r signatures, \r are: \r
-+ \r
-+Variable \r Name \r
-+Explanation \r \r
-+static \r const \r qd_real \r _2pi; \r
-+Two \r pi. \r \r
-+static \r const \r qd_real \r _pi; \r
-+Pi. \r \r
-+static \r const \r qd_real \r _3pi4; \r
-+Three \r pi \r over \r four. \r \r
-+static \r const \r qd_real \r _pi2; \r
-+Pi \r over \r two. \r \r
-+static \r const \r qd_real \r _pi4; \r
-+Pi \r over \r four \r
-+static \r const \r qd_real \r _e; \r
-+e, \r the \r base \r of \r the \r natural \r logarithm. \r \r
-+static \r const \r qd_real \r _log2; \r
-+Natural \r logarithm \r of \r two. \r \r
-+static \r const \r qd_real \r _log10; \r
-+Natural \r logarithm \r of \r ten. \r \r
-+static \r const \r qd_real \r _nan; \r
-+Not \r a \r number. \r Behaves \r like \r a \r double-‐
-+ \r
-+precision \r nan. \r \r
-+static \r const \r qd_real \r _inf; \r
-+Infinity. \r Behaves \r like \r a \r double-‐precision \r inf. \r \r
-+static \r const \r double \r _eps; \r
-+Estimated \r precision \r for \r dd_real \r or \r qd_real \r
-+ \r
-+data \r type. \r
-+static \r const \r double \r _min_normalized; \r
-+Minimum \r absolute \r value \r represent \r able \r
-+ \r
-+without \r denormalization. \r \r
-+static \r const \r qd_real \r _max; \r
-+Maximum \r representable \r value. \r \r
-+static \r const \r qd_real \r _safe_max; \r
-+Maximum \r safe \r value. \r Slightly \r smaller \r than \r
-+ \r
-+maximum \r representable \r value. \r \r
-+static \r const \r int \r _ndigits; \r
-+Number \r of \r digits \r available \r for \r dd_real \r or \r
-+
-+\f \r
-+qd_real \r datatypes. \r
-+ \r
-+ \r
-+ \r
-+ii. \r Conversion \r of \r types \r \r
-+ \r
-+Static \r casts \r may \r be \r used \r to \r convert \r constants \r between \r types. \r One \r may \r also \r use \r constructors \r
-+to \r return \r temporary \r multi-‐precision \r types \r within \r expressions, \r but \r should \r be \r careful, \r as \r this \r
-+will \r waste \r memory \r if \r done \r repeatedly. \r For \r example: \r \r
-+ \r
-+ \r
-+ \r qd_real \r y \r ; \r \r
-+y \r = \r sin( \r qd_real(4.0) \r / \r 3.0 \r ) \r ; \r
-+ \r
-+C–style \r casts \r may \r be \r used, \r but \r are \r not \r recommended. \r \r Dynamic \r and \r reinterpret \r casts \r are \r
-+not \r supported \r and \r should \r be \r considered \r unreliable. \r Casting \r between \r multi-‐precision \r and \r
-+standard \r precision \r types \r can \r be \r dangerous, \r and \r care \r must \r be \r taken \r to \r ensure \r that \r programs \r
-+are \r working \r properly \r and \r accuracy \r has \r not \r degraded \r by \r use \r of \r a \r misplaced \r type-‐conversion. \r \r
-+ \r
-+D. \r Available \r precision, \r Control \r of \r Precision \r Levels, \r
-+ \r
-+The \r library \r provides \r greatly \r extended \r accuracy \r when \r compared \r to \r standard \r double \r
-+precision. \r The \r type \r dd_real \r provides \r for \r 106 \r mantissa \r bits, \r or \r about \r 32 \r decimal \r digits. \r The \r
-+type \r qd_real \r provides \r for \r 212 \r mantissa \r bits, \r or \r about \r 64 \r decimal \r digits. \r \r
-+ \r
-+Both \r the \r dd_real \r and \r qd_real \r values \r use \r the \r exponent \r from \r the \r highest \r double-‐precision \r
-+word \r for \r arithmetic, \r and \r as \r such \r do \r not \r extend \r the \r total \r range \r of \r values \r available. \r That \r
-+means \r that \r the \r maximum \r absolute \r value \r for \r either \r data \r type \r is \r the \r same \r as \r that \r of \r double-‐
-+precision, \r or \r approximately \r 10^308. \r The \r precision \r near \r this \r range, \r however, \r is \r greatly \r
-+increased. \r \r
-+ \r
-+To \r ensure \r that \r arithmetic \r is \r carried \r out \r with \r proper \r precision \r and \r accuracy, \r one \r must \r call \r
-+the \r function \r “fpu_fix_start” \r before \r performing \r any \r double-‐double \r or \r quad-‐double \r
-+arithmetic. \r This \r forces \r all \r arithmetic \r to \r be \r carried \r out \r in \r 64-‐bit \r double \r precision, \r not \r the \r 80-‐
-+bit \r precision \r that \r is \r found \r on \r certain \r compilers \r and \r interferes \r with \r the \r existing \r library. \r \r
-+ \r
-+ \r
-+ \r unsigned \r int \r old_cw; \r
-+ \r
-+fpu_fix_start(&old_cw); \r
-+ \r
-+To \r return \r standard \r settings \r for \r arithmetic \r on \r one’s \r system, \r call \r the \r function \r “fpu_fix_end”. \r
-+For \r example: \r
-+ \r
-+ \r
-+fpu_fix_end(&old_cw); \r
-+ \r
-+ \r
-+E. \r I/O \r \r
-+ \r
-+The \r standard \r I/O \r stream \r routines \r have \r been \r overloaded \r to \r be \r fully \r compatible \r with \r all \r
-+included \r data \r types. \r One \r may \r need \r to \r manually \r reset \r the \r precision \r of \r the \r stream \r to \r obtain \r
-+full \r output. \r For \r example, \r if \r 60 \r digits \r are \r desired, \r use: \r \r
-+ \r
-+cout.precision(60) \r ; \r \r
-+
-+\f \r
-+When \r reading \r values \r using \r cin, \r each \r input \r numerical \r value \r must \r start \r on \r a \r separate \r
-+line. \r \r Two \r formats \r are \r acceptable: \r
-+ \r
-+ \r
-+1. \r Write \r the \r full \r constant \r \r
-+ \r
-+3. \r Mantissa \r e \r exponent \r
-+ \r
-+Here \r are \r three \r valid \r examples: \r
-+ \r
-+ \r
-+1.1 \r
-+ \r
-+3.14159 \r 26535 \r 89793 \r
-+ \r
-+123.123123e50 \r
-+ \r
-+ \r
-+When \r read \r using \r cin, \r these \r constants \r will \r be \r converted \r using \r full \r multi-‐precision \r accuracy. \r
-+ \r
-+ \r
-+IV. \r Fortran-‐90 \r Usage \r
-+ \r
-+NEW \r (2007-‐01-‐10): \r The \r Fortran \r translation \r modules \r now \r support \r the \r complex \r datatypes \r
-+"dd_complex" \r and \r "qd_complex". \r
-+ \r
-+Since \r the \r quad-‐double \r library \r is \r written \r in \r C++, \r it \r must \r be \r linked \r in \r with \r a \r C++ \r compiler \r (so \r
-+that \r C++ \r specific \r things \r such \r as \r static \r initializations \r are \r correctly \r handled). \r \r Thus \r the \r main \r
-+program \r must \r be \r written \r in \r C/C++ \r and \r call \r the \r Fortran \r 90 \r subroutine. \r The \r Fortran \r 90 \r
-+subroutine \r should \r be \r called \r f_main. \r
-+ \r
-+Here \r is \r a \r sample \r Fortran-‐90 \r program, \r equivalent \r to \r the \r above \r C++ \r program: \r
-+ \r
-+ \r \r subroutine \r f_main \r
-+ \r
-+use \r qdmodule \r \r
-+ \r
-+implicit \r none \r
-+ \r
-+type \r (qd_real) \r a, \r b \r
-+ \r
-+integer*4 \r old_cw \r
-+ \r
-+ \r
-+call \r f_fpu_fix_start(old_cw) \r
-+ \r
-+a \r = \r 1.d0 \r
-+ \r
-+b \r = \r cos(a)**2 \r + \r sin(a)**2 \r -‐ \r 1.d0 \r
-+ \r
-+call \r qdwrite(6, \r b) \r
-+ \r
-+stop \r
-+ \r \r end \r subroutine \r
-+ \r
-+This \r verifies \r that \r cos^2(1) \r + \r sin^2(1) \r = \r 1 \r to \r 64 \r digit \r accuracy. \r
-+ \r
-+Most \r operators \r and \r generic \r function \r references, \r including \r many \r mixed-‐mode \r type \r
-+combinations \r with \r double-‐precision \r (ie \r real*8), \r have \r been \r overloaded \r (extended) \r to \r work \r
-+with \r double-‐double \r and \r quad-‐double \r data. \r \r It \r is \r important, \r however, \r that \r users \r keep \r in \r
-+mind \r the \r fact \r that \r expressions \r are \r evaluated \r strictly \r according \r to \r conventional \r Fortran \r
-+operator \r precedence \r rules. \r \r Thus \r some \r subexpressions \r may \r be \r evaluated \r only \r to \r 15-‐digit \r
-+accuracy. \r For \r example, \r with \r the \r code \r
-+
-+\f \r
-+ \r \r \r real*8 \r d1 \r
-+ \r \r \r type \r (dd_real) \r t1, \r t2 \r
-+ \r \r \r ... \r
-+ \r \r \r t1 \r = \r cos \r (t2) \r + \r d1/3.d0 \r
-+ \r
-+the \r expression \r d1/3.d0 \r is \r computed \r to \r real*8 \r accuracy \r only \r (about \r 15 \r digits), \r since \r both \r d1 \r
-+and \r 3.d0 \r have \r type \r real*8. \r \r This \r result \r is \r then \r converted \r to \r dd_real \r by \r zero \r extension \r before \r
-+being \r added \r to \r cos(t2). \r So, \r for \r example, \r if \r d1 \r held \r the \r value \r 1.d0, \r then \r the \r quotient \r d1/3.d0 \r
-+would \r only \r be \r accurate \r to \r 15 \r digits. \r \r If \r a \r fully \r accurate \r double-‐double \r quotient \r is \r required, \r
-+this \r should \r be \r written: \r
-+ \r
-+ \r \r real*8 \r d1 \r
-+ \r \r type \r (dd_real) \r t1, \r t2 \r
-+ \r \r \r ... \r
-+ \r \r t1 \r = \r cos \r (t2) \r + \r ddreal \r (d1) \r / \r 3.d0 \r
-+ \r
-+which \r forces \r all \r operations \r to \r be \r performed \r with \r double-‐double \r arithmetic. \r
-+ \r
-+Along \r this \r line, \r a \r constant \r such \r as \r 1.1 \r appearing \r in \r an \r expression \r is \r evaluated \r only \r to \r real*4 \r
-+accuracy, \r and \r a \r constant \r such \r as \r 1.1d0 \r is \r evaluated \r only \r to \r real*8 \r accuracy \r (this \r is \r
-+according \r to \r standard \r Fortran \r conventions). \r \r If \r full \r quad-‐double \r accuracy \r is \r required, \r for \r
-+instance, \r one \r should \r write \r
-+ \r
-+ \r \r \r type \r (qd_real) \r t1 \r
-+ \r \r \r ... \r
-+ \r \r \r t1 \r = \r '1.1' \r
-+ \r
-+The \r quotes \r enclosing \r 1.1 \r specify \r to \r the \r compiler \r that \r the \r constant \r is \r to \r be \r converted \r to \r
-+binary \r using \r quad-‐double \r arithmetic, \r before \r assignment \r to \r t1. \r \r Quoted \r constants \r may \r only \r
-+appear \r in \r assignment \r statements \r such \r as \r this. \r
-+ \r
-+To \r link \r a \r Fortran-‐90 \r program \r with \r the \r C++ \r qd \r library, \r it \r is \r \r recommended \r to \r link \r with \r the \r
-+C++ \r compiler \r used \r to \r generate \r the \r library. \r \r \r The \r Fortran \r 90 \r interface \r (along \r with \r a \r C-‐style \r
-+main \r function \r calling \r f_main) \r is \r found \r in \r qdmod \r library. \r \r The \r qd-‐config \r script \r installed \r
-+during \r "make \r install" \r can \r be \r used \r to \r determine \r which \r flags \r to \r pass \r to \r compile \r and \r link \r your \r
-+programs: \r
-+ \r
-+ \r \r "qd-‐config \r -‐-‐fcflags" \r \r displays \r compiler \r flags \r needed \r to \r compile \r your \r Fortran \r files. \r
-+ \r \r "qd-‐config \r -‐-‐fclibs" \r \r \r displays \r linker \r flags \r needed \r by \r the \r C++ \r linker \r to \r link \r in \r all \r the \r \r
-+necessary \r libraries. \r
-+ \r
-+A \r sample \r Makefile \r that \r can \r be \r used \r as \r a \r template \r for \r compiling \r Fortran \r programs \r using \r
-+quad-‐double \r library \r is \r found \r in \r fortran/Makefile.sample. \r
-+ \r
-+F90 \r functions \r defined \r with \r dd_real \r arguments: \r
-+ \r \r Arithmetic: \r \r + \r -‐ \r * \r / \r ** \r
-+ \r \r Comparison \r tests: \r \r == \r < \r > \r <= \r >= \r /= \r
-+ \r \r Others: \r abs, \r acos, \r aint, \r anint, \r asin, \r atan, \r atan2, \r cos, \r cosh, \r dble, \r erf, \r
-+ \r \r erfc, \r exp, \r int, \r log, \r log10, \r max, \r min, \r mod, \r ddcsshf \r (cosh \r and \r sinh), \r
-+
-+\f \r \r ddcssnf \r (cos \r and \r sin), \r ddranf \r (random \r number \r generator \r in \r (0,1)), \r \r
-+ \r \r ddnrtf \r (n-‐th \r root), \r sign, \r sin, \r sinh, \r sqr, \r sqrt, \r tan, \r tanh \r
-+Similar \r functions \r are \r provided \r for \r qd_real \r arguments \r (with \r function \r
-+ \r \r names \r qdcsshf, \r qdcssnf, \r qdranf \r and \r qdnrtf \r instead \r of \r the \r names \r in \r
-+ \r \r the \r list \r above). \r
-+ \r
-+Input \r and \r output \r of \r double-‐double \r and \r quad-‐double \r data \r is \r done \r using \r the \r special \r
-+subroutines \r ddread, \r ddwrite, \r qdread \r and \r qdwrite. \r \r The \r first \r argument \r of \r these \r subroutines \r
-+is \r the \r Fortran \r I/O \r unit \r number, \r while \r additional \r arguments \r (as \r many \r as \r needed, \r up \r to \r 9 \r
-+arguments) \r are \r scalar \r variables \r or \r array \r elements \r of \r the \r appropriate \r type. \r \r Example: \r
-+ \r
-+ \r \r \r integer \r n \r
-+ \r \r \r type \r (qd_real) \r qda, \r qdb, \r qdc(n) \r
-+ \r \r \r ... \r
-+ \r \r \r call \r qdwrite \r (6, \r qda, \r qdb) \r
-+ \r \r \r do \r j \r = \r 1, \r n \r
-+ \r
-+ \r call \r qdwrite \r (6, \r qdc(j)) \r
-+ \r \r \r enddo \r
-+ \r
-+Each \r input \r values \r must \r be \r on \r a \r separate \r line, \r and \r may \r include \r D \r or \r E \r exponents. \r \r Double-‐
-+double \r and \r quad-‐double \r constants \r may \r also \r be \r specified \r in \r assignment \r statements \r by \r
-+enclosing \r them \r in \r quotes, \r as \r in \r
-+ \r
-+ \r \r ... \r
-+ \r \r type \r (qd_real) \r pi \r
-+ \r \r ... \r
-+ \r \r pi \r = \r
-+"3.14159265358979323846264338327950288419716939937510582097494459230" \r
-+ \r \r ... \r
-+ \r
-+Sample \r Fortran-‐90 \r programs \r illustrating \r some \r of \r these \r features \r are \r provided \r in \r the \r f90 \r
-+subdirectory. \r
-+ \r
-+ \r
-+V. \r Note \r on \r x86-‐Based \r Processors \r (MOST \r systems \r in \r use \r today) \r
-+ \r
-+The \r algorithms \r in \r this \r library \r assume \r IEEE \r double \r precision \r floating \r point \r arithmetic. \r \r Since \r
-+Intel \r x86 \r processors \r have \r extended \r (80-‐bit) \r floating \r point \r registers, \r the \r round-‐to-‐double \r
-+flag \r must \r be \r enabled \r in \r the \r control \r word \r of \r the \r FPU \r for \r this \r library \r to \r function \r properly \r
-+under \r x86 \r processors. \r \r The \r following \r functions \r contains \r appropriate \r code \r to \r facilitate \r
-+manipulation \r of \r this \r flag. \r \r For \r non-‐x86 \r systems \r these \r functions \r do \r nothing \r (but \r still \r exist). \r
-+ \r
-+fpu_fix_start \r This \r turns \r on \r the \r round-‐to-‐double \r bit \r in \r the \r control \r word. \r
-+fpu_fix_end \r
-+ \r \r This \r restores \r the \r control \r flag. \r
-+ \r
-+These \r functions \r must \r be \r called \r by \r the \r main \r program, \r as \r follows: \r
-+ \r
-+ \r
-+int \r main() \r { \r
-+ \r
-+ \r \r unsigned \r int \r old_cw; \r
-+ \r
-+ \r \r fpu_fix_start(&old_cw); \r
-+
-+\f \r
-+ \r
-+ \r \r ... \r user \r code \r using \r quad-‐double \r library \r ... \r
-+ \r
-+ \r
-+ \r \r fpu_fix_end(&old_cw); \r
-+ \r
-+} \r
-+ \r
-+A \r Fortran-‐90 \r example \r is \r the \r following: \r
-+ \r
-+ \r
-+subroutine \r f_main \r
-+ \r
-+use \r qdmodule \r
-+ \r
-+implicit \r none \r
-+ \r
-+integer*4 \r old_cw \r
-+ \r
-+ \r
-+call \r f_fpu_fix_start(old_cw) \r
-+ \r
-+ \r
-+ \r \r ... \r user \r code \r using \r quad-‐double \r library \r ... \r
-+ \r
-+ \r
-+call \r f_fpu_fix_end(old_cw) \r
-+ \r
-+end \r subroutine \r
-+ \r
-+
-+\f
-\ No newline at end of file
+
diff -Nur qd-2.3.12.orig/src/Makefile.am qd-2.3.12/src/Makefile.am
--- qd-2.3.12.orig/src/Makefile.am 2012-01-12 19:44:25.000000000 +0000
+++ qd-2.3.12/src/Makefile.am 2012-01-12 19:49:45.000000000 +0000