[gmp-ecm] 04/04: Imported Debian patch 7.0+ds-1

Jerome Benoit calculus-guest at moszumanska.debian.org
Sun Mar 20 16:45:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

calculus-guest pushed a commit to branch master
in repository gmp-ecm.

commit a5ae36dab8993a8ba2e319de1421daa98ab47aaa
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Sun Mar 20 04:37:06 2016 +0100

    Imported Debian patch 7.0+ds-1
---
 debian/adhoc/examples/Makefile                     |    3 +-
 debian/changelog                                   |   20 +-
 debian/control                                     |   45 +-
 debian/copyright                                   |   72 +-
 ...cm0-dev-common.docs => libecm1-dev-common.docs} |    0
 ...common.examples => libecm1-dev-common.examples} |    0
 ...v-common.install => libecm1-dev-common.install} |    0
 ...rrides => libecm1-dev-common.lintian-overrides} |    2 +-
 .../{libecm0-dev.install => libecm1-dev.install}   |    0
 ...ian-overrides => libecm1-dev.lintian-overrides} |    2 +-
 ...libecm0.README.Debian => libecm1.README.Debian} |    0
 debian/{libecm0.docs => libecm1.docs}              |    0
 debian/{libecm0.install => libecm1.install}        |    0
 ...lintian-overrides => libecm1.lintian-overrides} |    4 +-
 debian/patches/debianization-examples.patch        |   12 +-
 debian/patches/series                              |    4 +-
 .../upstream-autotoolization-noexecstack.patch     |   20 +-
 .../patches/upstream-autotoolization-refresh.patch | 1451 --------------------
 .../upstream-bug-793012-mips_longlong_sp.patch     |   46 -
 .../upstream-lintian-spelling-error-silence.patch  |   20 +
 ...tream-longcheck-neutralize-forgotten-code.patch |   23 +
 debian/rules                                       |    8 +-
 debian/tests/build-examples                        |    2 +-
 debian/tests/control                               |    5 +-
 debian/tests/make-longcheck                        |   18 +-
 25 files changed, 179 insertions(+), 1578 deletions(-)

diff --git a/debian/adhoc/examples/Makefile b/debian/adhoc/examples/Makefile
index 81d0090..564883f 100644
--- a/debian/adhoc/examples/Makefile
+++ b/debian/adhoc/examples/Makefile
@@ -15,7 +15,7 @@
 #
 # written for Debian by Jerome Benoit <calculus at rezozer.net>
 # on behalf of the Debian Science Team
-# copyright: 2015 Jerome Benoit <calculus at rezozer.net>
+# copyright: 2015-2016 Jerome Benoit <calculus at rezozer.net>
 # distributed under the terms and conditions of GPL version 3 or later
 #
 
@@ -24,6 +24,7 @@ default: all
 PROGRAMS = \
 	ecmfactor
 
+LDFLAGS = -pthread
 LDLIBS = -lecm -lgmp
 
 all: build
diff --git a/debian/changelog b/debian/changelog
index 2ef41d1..baeafb3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,23 @@
-gmp-ecm (7.0+ds-0) UNRELEASED; urgency=medium
+gmp-ecm (7.0+ds-1) unstable; urgency=medium
 
   * New major upstream release.
   * Debianization:
-    - debian/copyright, update.
-    - debian/watch, refresh.
+    - debian/control:
+      - vcs-* fields, secure;
+      - Standards-Version, dump to 3.9.7;
+      - debug symbol package, drop off in favour of automatic generation;
+      - SO name, increment;
+    - debian/copyright, update;
+    - debian/rules:
+      - dpkg-buildflags, add hardening=+all;
+      - debug symbol package, drop off (see above);
+      - refresh;
+    - debian/watch, refresh;
+    - debian/adhoc/examples/Makefile, refresh;
+    - debian/tests:
+      - d/t/make-longcheck, harden and update.
 
- -- Jerome Benoit <calculus at rezozer.net>  Sat, 19 Mar 2016 21:57:33 +0000
+ -- Jerome Benoit <calculus at rezozer.net>  Sun, 20 Mar 2016 16:02:29 +0000
 
 gmp-ecm (6.4.4+ds-5) unstable; urgency=medium
 
diff --git a/debian/control b/debian/control
index 9325b30..8559920 100644
--- a/debian/control
+++ b/debian/control
@@ -8,10 +8,10 @@ Build-Depends:
  autotools-dev, gnulib, m4 [amd64 kfreebsd-amd64], dh-autoreconf, libtool,
  libgmp-dev (>= 2:6.0)
 Build-Depends-Indep:
-Standards-Version: 3.9.6
+Standards-Version: 3.9.7
 Homepage: http://ecm.gforge.inria.fr/
-Vcs-Git: git://anonscm.debian.org/debian-science/packages/gmp-ecm.git
-Vcs-Browser: http://anonscm.debian.org/cgit/debian-science/packages/gmp-ecm.git
+Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/gmp-ecm.git
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/gmp-ecm.git
 
 Package: gmp-ecm
 Architecture: any
@@ -39,7 +39,7 @@ Description: Factor integers using the Elliptic Curve Method
  .
  This package provides the command line utility.
 
-Package: libecm0
+Package: libecm1
 Provides: libecm
 Section: libs
 Architecture: any
@@ -67,7 +67,7 @@ Description: factor integers using the Elliptic Curve Method -- lib
  .
  This package provides the shared library.
 
-Package: libecm0-dev
+Package: libecm1-dev
 Provides: libecm-dev
 Section: libdevel
 Architecture: any
@@ -75,7 +75,7 @@ Replaces: libecm-dev (<= 6.4.4-2)
 Conflicts: libecm-dev (<= 6.4.4-2)
 #Conflicts: libecm-dev
 Depends:
- libecm0 (= ${binary:Version}), libecm0-dev-common (= ${source:Version}),
+ libecm1 (= ${binary:Version}), libecm1-dev-common (= ${source:Version}),
  libgmp-dev, ${misc:Depends}
 Multi-Arch: same
 Description: factor integers using the Elliptic Curve Method -- libdev
@@ -98,14 +98,14 @@ Description: factor integers using the Elliptic Curve Method -- libdev
  This package provides the static library and symbolic links needed
  for development.
 
-Package: libecm0-dev-common
+Package: libecm1-dev-common
 Provides: libecm-dev-common
 Section: libdevel
 Architecture: all
 Replaces: libecm-dev (<= 6.4.4-2)
 Conflicts: libecm-dev (<= 6.4.4-2), libecm-dev-common
 Depends: ${misc:Depends}
-Recommends: libecm0-dev (=${binary:Version})
+Recommends: libecm1-dev (=${binary:Version})
 Multi-Arch: foreign
 Description: factor integers using the Elliptic Curve Method -- header
  gmp-ecm is a free implementation of the Elliptic Curve Method (ECM)
@@ -126,39 +126,12 @@ Description: factor integers using the Elliptic Curve Method -- header
  .
  This package provides the header needed by developers.
 
-Package: libecm0-dbg
-Provides: libecm-dbg
-Section: debug
-Priority: extra
-Architecture: any
-Conflicts: libecm-dbg
-Depends: libecm0 (= ${binary:Version}), ${misc:Depends}
-Multi-Arch: same
-Description: factor integers using the Elliptic Curve Method -- debug
- gmp-ecm is a free implementation of the Elliptic Curve Method (ECM)
- for integer factorization.
- .
- The original purpose of the ECMNET project was to make Richard Brent's
- prediction true, i.e. to find a factor of 50 digits or more by
- ECM. This goal was attained on September 14, 1998, when Conrad Curry
- found a 53-digit factor of 2^677-1 c150 using George Woltman's mprime
- program. The new goal of ECMNET is now to find other large factors by
- ecm, mainly by contributing to the Cunningham project, most likely the
- longest, ongoing computational project in history according to Bob
- Silverman. A new record was set by Nik Lygeros and Michel Mizony, who
- found in December 1999 a prime factor of 54 digits using GMP-ECM.
- .
- See http://www.loria.fr/~zimmerma/records/ecmnet.html for more
- information about ecmnet.
- .
- This package provides the debugging symbols.
-
 Package: libecm-dev
 Section: oldlibs
 Priority: extra
 Architecture: all
 Pre-Depends: ${misc:Pre-Depends}
-Depends: libecm0-dev (>= ${source:Version}), ${misc:Depends}
+Depends: libecm1-dev (>= ${source:Version}), ${misc:Depends}
 Multi-Arch: foreign
 Description: transitional dummy package
  This is a transitional dummy package. It can safely be removed.
diff --git a/debian/copyright b/debian/copyright
index eadebed..1f4ebdd 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -66,6 +66,9 @@ Files:
  test.ecm
  test.pm1
  test.pp1
+ testlong.ecm
+ testlong.pm1
+ testlong.pp1
 Copyright:
  Copyright (C) 2001-2016 the GMP-ECM Project Team
 License: GPL-3+
@@ -80,21 +83,21 @@ Files:
  ecm.h
  ecm-impl.h
  ecm_ntt.c
- ellparam_batch.c
  factor.c
  Fgw.c
- getprime.c
+ getprime_r.c
  ks-multiply.c
  listz.c
  lucas.c
  median.c
+ memusage.c
  mpmod.c
  mpmod.h
  mpzspm.c
  mpzspv.c
- mul_fft.c
  mul_lo.c
  ntt_gfp.c
+ parametrizations.c
  pm1.c
  pm1fs2.c
  polyeval.c
@@ -108,7 +111,10 @@ Files:
  spm.c
  spv.c
  stage2.c
- toomcook.c
+ aprtcle/aprcl.c
+ aprtcle/jacobi_sum.h
+ aprtcle/mpz_aprcl.c
+ aprtcle/mpz_aprcl.h
  powerpc64/redc.asm
  powerpc64/mulredc*.asm
  powerpc64/mulredc*.m4
@@ -120,7 +126,6 @@ License: LGPL-3+
 Files:
  ecm-gmp.h
  longlong.h
- memory.c
  athlon/redc.asm
  pentium4/redc.asm
 Copyright:
@@ -129,6 +134,27 @@ License: LGPL-3+
 Comment:
  These files were copied from the GNU MP Library.
 
+Files:
+ basicdefs.h
+Copyright:
+ Copyright (C) 2001-2005 the GMP-ECM Project Team
+License: GPL-2+
+
+Files:
+ build.vc12/getrusage.c
+Copyright:
+ Copyright Free Software Foundation, Inc.
+License: LGPL-2.1+
+Comment:
+ This file was copied from the MPIR Library.
+
+Files:
+ build.vc12/getopt.c
+ build.vc12/getopt.h
+Copyright:
+ Copyright 1987-2002 Free Software Foundation, Inc.
+License: LGPL-2.1+
+
 Files: debian/*
 Copyright:
  2015-2016 Jerome Benoit <calculus at rezozer.net>
@@ -172,3 +198,39 @@ License: LGPL-3+
  .
  On Debian systems, the complete text of the GNU Lesser General
  Public License can be found in "/usr/share/common-licenses/LGPL-3".
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+License: LGPL-2.1+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1, or (at your option)
+ any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU Lesser General Public License for more details.
+ .
+ You should have received a copy of the GNU Lesser General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ .
+ On Debian systems, the complete text of the GNU Lesser General Public
+ License version 2.1 can be found in "/usr/share/common-licenses/LGPL-2.1".
diff --git a/debian/libecm0-dev-common.docs b/debian/libecm1-dev-common.docs
similarity index 100%
rename from debian/libecm0-dev-common.docs
rename to debian/libecm1-dev-common.docs
diff --git a/debian/libecm0-dev-common.examples b/debian/libecm1-dev-common.examples
similarity index 100%
rename from debian/libecm0-dev-common.examples
rename to debian/libecm1-dev-common.examples
diff --git a/debian/libecm0-dev-common.install b/debian/libecm1-dev-common.install
similarity index 100%
rename from debian/libecm0-dev-common.install
rename to debian/libecm1-dev-common.install
diff --git a/debian/libecm0-dev-common.lintian-overrides b/debian/libecm1-dev-common.lintian-overrides
similarity index 51%
rename from debian/libecm0-dev-common.lintian-overrides
rename to debian/libecm1-dev-common.lintian-overrides
index 55e9054..2f47eb2 100644
--- a/debian/libecm0-dev-common.lintian-overrides
+++ b/debian/libecm1-dev-common.lintian-overrides
@@ -1,2 +1,2 @@
 # Breaks appears too weak during upgrade tests with piuparts(1)
-libecm0-dev-common: conflicts-with-version libecm-dev (<= 6.4.4-2)
+libecm1-dev-common: conflicts-with-version libecm-dev (<= 6.4.4-2)
diff --git a/debian/libecm0-dev.install b/debian/libecm1-dev.install
similarity index 100%
rename from debian/libecm0-dev.install
rename to debian/libecm1-dev.install
diff --git a/debian/libecm0-dev.lintian-overrides b/debian/libecm1-dev.lintian-overrides
similarity index 51%
rename from debian/libecm0-dev.lintian-overrides
rename to debian/libecm1-dev.lintian-overrides
index 98569b1..179097e 100644
--- a/debian/libecm0-dev.lintian-overrides
+++ b/debian/libecm1-dev.lintian-overrides
@@ -1,2 +1,2 @@
 # Breaks appears too weak during upgrade tests with piuparts(1)
-libecm0-dev: conflicts-with-version libecm-dev (<= 6.4.4-2)
+libecm1-dev: conflicts-with-version libecm-dev (<= 6.4.4-2)
diff --git a/debian/libecm0.README.Debian b/debian/libecm1.README.Debian
similarity index 100%
rename from debian/libecm0.README.Debian
rename to debian/libecm1.README.Debian
diff --git a/debian/libecm0.docs b/debian/libecm1.docs
similarity index 100%
rename from debian/libecm0.docs
rename to debian/libecm1.docs
diff --git a/debian/libecm0.install b/debian/libecm1.install
similarity index 100%
rename from debian/libecm0.install
rename to debian/libecm1.install
diff --git a/debian/libecm0.lintian-overrides b/debian/libecm1.lintian-overrides
similarity index 93%
rename from debian/libecm0.lintian-overrides
rename to debian/libecm1.lintian-overrides
index b4d09ef..4636c10 100644
--- a/debian/libecm0.lintian-overrides
+++ b/debian/libecm1.lintian-overrides
@@ -5,7 +5,7 @@
 # Out of memory events are also managed with exit(3): this looks as a
 # clumsy emergency exit policy rather than a design issue that may be
 # revisited only to please lintian(1).
-libecm0: shlib-calls-exit
+libecm1: shlib-calls-exit
 
 # A public interface is clearly defined in the library header ecm.h
 # (see README.lib), but unfortunately no ABI is clearly defined.
@@ -13,4 +13,4 @@ libecm0: shlib-calls-exit
 # symbols not declared in this headeer (and suppoed to be used).
 # The issue was discussed with the upstream maintainer.
 # -- Jerome Benoit <calculus at rezozer.net>  Fri, 29 May 2015
-libecm0: no-symbols-control-file
+libecm1: no-symbols-control-file
diff --git a/debian/patches/debianization-examples.patch b/debian/patches/debianization-examples.patch
index 1fe0f80..4e8cca2 100644
--- a/debian/patches/debianization-examples.patch
+++ b/debian/patches/debianization-examples.patch
@@ -10,14 +10,14 @@ Last-Update: 2015-05-31
 -/* ecmfactor.c - example of use of libecm.a.
 +/* ecmfactor.c - example of use of the ECM library.
  
- Copyright 2005, 2006 Paul Zimmermann, Dave Newman.
+ Copyright 2005-2016 Paul Zimmermann, Dave Newman, Pierrick Gaudry.
  
-@@ -20,7 +20,7 @@
- #include <stdio.h>
- #include <stdlib.h>
+@@ -22,7 +22,7 @@
+ #include <string.h>
+ #include <pthread.h>
  #include <gmp.h> /* GMP header file */
 -#include "ecm.h" /* ecm header file */
 +#include <ecm.h> /* ecm header file */
  
- int
- main (int argc, char *argv[])
+ /* thread structure */
+ typedef struct
diff --git a/debian/patches/series b/debian/patches/series
index 6ad90fa..949a6ba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,5 @@
-upstream-bug-793012-mips_longlong_sp.patch
-upstream-autotoolization-refresh.patch
 #upstream-libtoolization-version_script.patch
+upstream-lintian-spelling-error-silence.patch
 upstream-autotoolization-noexecstack.patch
+upstream-longcheck-neutralize-forgotten-code.patch
 debianization-examples.patch
diff --git a/debian/patches/upstream-autotoolization-noexecstack.patch b/debian/patches/upstream-autotoolization-noexecstack.patch
index a6a0eba..c6da915 100644
--- a/debian/patches/upstream-autotoolization-noexecstack.patch
+++ b/debian/patches/upstream-autotoolization-noexecstack.patch
@@ -3,16 +3,16 @@ Description: upstream -- autotoolization -- noexecstack
  meant to be submitted to the upstream maintainer team.
 Origin: debian
 Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2015-06-01
+Last-Update: 2016-03-19
 
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -39,7 +39,7 @@
- # Link the asm redc code (if we use it) into libecm.la
- libecm_la_CPPFLAGS = $(MULREDCINCPATH)
- libecm_la_CFLAGS = $(OPENMP_CFLAGS)
--libecm_la_LDFLAGS = -version-info 0:0:0
-+libecm_la_LDFLAGS = -version-info 0:0:0 -Wl,-znoexecstack
- libecm_la_LIBADD = $(MULREDCLIBRARY) $(GMPLIB)
- 
- bin_PROGRAMS = ecm
+@@ -46,7 +46,7 @@
+ # www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+ # If any interfaces have been added, removed, or changed since the last
+ # update, increment current, and set revision to 0.
+-libecm_la_LDFLAGS = $(LIBECM_LDFLAGS) -version-info 1:0:0 -g
++libecm_la_LDFLAGS = $(LIBECM_LDFLAGS) -version-info 1:0:0 -g -Wl,-znoexecstack
+ libecm_la_LIBADD = $(MULREDCLIBRARY)
+ if WANT_GPU 
+   libecm_la_SOURCES += cudakernel.cu
diff --git a/debian/patches/upstream-autotoolization-refresh.patch b/debian/patches/upstream-autotoolization-refresh.patch
deleted file mode 100644
index d8d3f3f..0000000
--- a/debian/patches/upstream-autotoolization-refresh.patch
+++ /dev/null
@@ -1,1451 +0,0 @@
-Description: upstream -- autotoolization -- refreshment
- Slightly refresh the autotools machinery, in particular the original autoconf
- configuration file was rename configure.ac to please lintian(1);
- meant to be submitted to the upstream maintainer team.
-Origin: debian
-Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2015-05-31
-
---- /dev/null
-+++ b/configure.ac
-@@ -0,0 +1,714 @@
-+m4_define([ECM_VERSION], [6.4.4])
-+
-+AC_PREREQ([2.57])
-+AC_INIT([ecm], ECM_VERSION, [ecm-discuss at lists.gforge.inria.fr])
-+AC_CONFIG_MACRO_DIR([m4])
-+AC_CONFIG_AUX_DIR([build-aux])
-+AC_CONFIG_HEADER([config.h])
-+AC_USE_SYSTEM_EXTENSIONS
-+GMP_INIT([config.m4])
-+AM_INIT_AUTOMAKE([1.10])
-+AM_INIT_AUTOMAKE([ecm], ECM_VERSION)
-+AM_SILENT_RULES([no])
-+AM_MAINTAINER_MODE([])
-+AC_CANONICAL_HOST
-+
-+dnl Copied from MPFR 2.4.2:
-+unset GMP_CFLAGS GMP_CC user_redefine_cc
-+dnl Check if user request his CC and CFLAGS
-+if test -n "$CFLAGS" || test -n "$CC" ; then
-+  user_redefine_cc=yes
-+fi
-+
-+dnl the following is required to compile auxi.c according to autoconf 2.61
-+AC_PROG_EGREP
-+AC_PROG_SED
-+
-+AC_ARG_WITH([gmp],         [  --with-gmp=DIR          GMP install directory ],  [with_gmp_include=$withval/include with_gmp_lib=$withval/lib])
-+AC_ARG_WITH([gmp_include], [  --with-gmp-include=DIR  GMP include directory ],  [with_gmp_include=$withval])
-+AC_ARG_WITH([gmp_lib],     [  --with-gmp-lib=DIR      GMP lib directory ],      [with_gmp_lib=$withval])
-+AC_ARG_WITH([gwnum],       [  --with-gwnum=DIR        GWNUM source directory ], [with_gwnum=$withval])
-+
-+if test x"$with_gmp_include" != "x"
-+then
-+  if ! test -d "$with_gmp_include"
-+  then
-+    AC_MSG_ERROR([Specified GMP include directory "$with_gmp_include" does not exist])
-+  fi
-+  CPPFLAGS="-I$with_gmp_include"
-+fi
-+
-+if test x"$with_gmp_lib" != "x"
-+then
-+  if ! test -d "$with_gmp_lib"
-+  then
-+    AC_MSG_ERROR([Specified GMP library directory "$with_gmp_lib" does not exist])
-+  fi
-+fi
-+
-+############################
-+# Parse --enable-* options #
-+############################
-+
-+dnl Assertions are enabled by default for beta/rc releases. The last parameter
-+dnl of AC_ARG_ENABLE() sets the default value (change also default=...).
-+AC_ARG_ENABLE([assert],
-+[AS_HELP_STRING([--enable-assert], [enable ASSERT checking [[default=no]]])],[],[enable_assert=no])
-+if test "x$enable_assert" = xyes; then
-+  AC_DEFINE([WANT_ASSERT],1,[Define to 1 if you want assertions enabled])
-+  GMP_DEFINE([WANT_ASSERT], 1)
-+fi
-+
-+AC_ARG_ENABLE([shellcmd],
-+[AS_HELP_STRING([--enable-shellcmd], [enable shell command execution [[default=no]]])])
-+if test "x$enable_shellcmd" = xyes; then
-+  AC_DEFINE([WANT_SHELLCMD],1,[Define to 1 if you want shell command execution])
-+fi
-+
-+AC_ARG_ENABLE([gmp-cflags],
-+[AS_HELP_STRING([--enable-gmp-cflags], [enable importing CFLAGS from gmp.h [[default=yes]]])],[],[enable_gmp_cflags=yes])
-+
-+AC_ARG_ENABLE([openmp],
-+[AS_HELP_STRING([--enable-openmp], [enable OpenMP multi-threading [[default=no]]])])
-+
-+AC_ARG_ENABLE([sse2],
-+[AS_HELP_STRING([--enable-sse2], [use SSE2 instructions in NTT code (default=yes for 32-bit x86 systems, if supported)])])
-+
-+AC_ARG_ENABLE([asm-redc],
-+[AS_HELP_STRING([--enable-asm-redc], [use an asm redc (default=yes on x86_64 and powerpc64, no on others)])])
-+
-+AC_ARG_ENABLE([memory-debug],
-+[AS_HELP_STRING([--enable-memory-debug], [enable memory debugging [[default=no]]])])
-+if test "x$enable_memory_debug" = xyes; then
-+  AC_DEFINE([MEMORY_DEBUG], 1, [Define to 1 if you want memory debugging])
-+fi
-+AM_CONDITIONAL([MEMORY_DEBUG], [test "x$enable_memory_debug" = xyes])
-+
-+AC_ARG_ENABLE([mulredc-svoboda],
-+[AS_HELP_STRING([--enable-mulredc-svoboda], [enable Svoboda mulredc [[default=no]]])])
-+if test "x$enable_mulredc_svoboda" = xyes; then
-+  AC_DEFINE([MULREDC_SVOBODA],1,[Define to 1 if you want Svoboda mulredc])
-+  GMP_DEFINE([MULREDC_SVOBODA], 1)
-+fi
-+
-+
-+
-+dnl Use C language for test programs
-+AC_LANG([C])
-+
-+dnl Copied from MPFR 2.4.1 and modified
-+dnl We need to guess the C preprocessor instead of using AC_PROG_CPP,
-+dnl since AC_PROG_CPP implies AC_PROG_CC, which chooses a compiler
-+dnl (before we have the chance to get it from gmp.h) and does some
-+dnl checking related to this compiler (such as dependency tracking
-+dnl options); if the compiler changes due to __GMP_CC in gmp.h, one
-+dnl would have incorrect settings.
-+dnl FIXME: Move this in aclocal ?
-+
-+if test "x$user_redefine_cc" = x && test "x$enable_gmp_cflags" = xyes && test "x$cross_compiling" != xyes; then
-+if test "x$GMP_CC$GMP_CFLAGS" = x; then
-+   AC_MSG_CHECKING([for CC and CFLAGS in gmp.h])
-+   GMP_CC=__GMP_CC
-+   GMP_CFLAGS=__GMP_CFLAGS
-+   for cpp in /lib/cpp gcc cc c99
-+   do
-+     test $cpp = /lib/cpp || cpp="$cpp -E"
-+     echo "Trying to run $cpp" >&AS_MESSAGE_LOG_FD
-+     AC_LANG_CONFTEST([AC_LANG_SOURCE([foo])])
-+     if $cpp $CPPFLAGS conftest.$ac_ext > /dev/null 2> /dev/null ; then
-+       # Get CC and CFLAGS
-+       AC_LANG_CONFTEST([AC_LANG_SOURCE([#include "gmp.h"
-+MPFR_OPTION_CC __GMP_CC
-+MPFR_OPTION_CFLAGS __GMP_CFLAGS])])
-+       echo "Trying to parse gmp.h with: $cpp $CPPFLAGS conftest.$ac_ext" >&AS_MESSAGE_LOG_FD
-+       if $cpp $CPPFLAGS conftest.$ac_ext 2> /dev/null > conftest.out; then
-+         GMP_CC="`$EGREP MPFR_OPTION_CC conftest.out | $SED -e 's/MPFR_OPTION_CC //g' | $SED -e 's/"//g'`"
-+         GMP_CFLAGS="`$EGREP MPFR_OPTION_CFLAGS conftest.out | $SED -e 's/MPFR_OPTION_CFLAGS //g'| $SED -e 's/"//g'`"
-+         echo "Success, GMP_CC=$GMP_CC, GMP_CFLAGS=$GMP_CFLAGS" >&AS_MESSAGE_LOG_FD
-+         break
-+       else
-+         echo "Could not parse gmp.h with $cpp" >&AS_MESSAGE_LOG_FD
-+       fi
-+     else
-+       echo "Could not run $cpp" >&AS_MESSAGE_LOG_FD
-+     fi
-+   done
-+   rm -f conftest*
-+   if test "x$GMP_CC" = "x__GMP_CC" || test "x$GMP_CFLAGS" = "x__GMP_CFLAGS" ; then
-+      AC_MSG_RESULT([no])
-+      GMP_CFLAGS=
-+      GMP_CC=
-+   else
-+      AC_MSG_RESULT([yes CC=$GMP_CC CFLAGS=$GMP_CFLAGS])
-+   fi
-+fi
-+
-+dnl But these variables may be invalid, so we must check them first.
-+dnl Note: we do not use AC_RUN_IFELSE, as it implies AC_PROG_CC.
-+if test "x$GMP_CC$GMP_CFLAGS" != x; then
-+   AC_MSG_CHECKING([whether CC=$GMP_CC and CFLAGS=$GMP_CFLAGS works])
-+   AC_LANG_CONFTEST([AC_LANG_SOURCE([int main (void) { return 0; }])])
-+   if $GMP_CC $GMP_CFLAGS -o conftest conftest.$ac_ext 2> /dev/null ; then
-+     AC_MSG_RESULT([yes])
-+     CFLAGS=$GMP_CFLAGS
-+     CC=$GMP_CC
-+   else
-+     AC_MSG_RESULT([no, reverting to default])
-+   fi
-+   rm -f conftest*
-+fi
-+
-+fi
-+
-+
-+dnl Checks for programs.
-+AC_PROG_CC
-+AM_PROG_AS
-+AM_PROG_CC_C_O
-+
-+
-+# Now that we have decided on CC and CFLAGS, init libtool
-+# Don't make a shared library by default. Enable building a shared library
-+# by specifying "--enable-shared" on the ./configure command line
-+LT_PREREQ([2.2.6])
-+LT_INIT([disable-shared])
-+
-+
-+dnl Checks for typedefs, structures, and compiler characteristics.
-+AC_TYPE_INT64_T
-+AC_TYPE_UINT64_T
-+AC_TYPE_LONG_LONG_INT
-+
-+dnl Check if compiler supports "const," if not define it to empty string
-+AC_C_CONST
-+
-+dnl Check if compiler supports "inline," if not define it to
-+dnl __inline__ or __inline or the empty string
-+AC_C_INLINE
-+
-+dnl Check if both time.h and sys/time.h can be included
-+AC_HEADER_TIME
-+
-+dnl Define size_t to something useable if standard headers don't
-+AC_TYPE_SIZE_T
-+
-+
-+dnl If OpenMP is enabled, check which command line parameter (if any)
-+dnl if required to make the compiler enable OpenMP
-+if test "x$enable_openmp" = xyes; then
-+  AC_OPENMP
-+fi
-+
-+########################
-+# Enable asm redc code #
-+########################
-+# If --(en|dis)able-asm-redc not specified, choose default value
-+# Test if asm redc code is available for this cpu.
-+# Point ASMPATH to the correct subdirectory.
-+
-+# asm_redc enabled by default for x86_64 and 64 bit PowerPC
-+if test "x$enable_asm_redc" = x; then
-+  case $host in
-+    x86_64*-*-* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
-+    *) enable_asm_redc=no;;
-+  esac
-+fi
-+
-+if test "x$enable_asm_redc" = xyes; then
-+  case $host in
-+    pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
-+    x86_64*-*-*)
-+# In case GMP has been compiled with a 32-bit ABI...
-+# Use AC_COMPILE_IFELSE instead of AC_PREPROC_IFELSE, otherwise
-+# GMP's CFLAGS doesn't seem to be taken into account.
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-+#if defined(__i386__)
-+#error
-+#endif])], [], [AC_MSG_NOTICE([32-bit ABI (i386), disabling asm-redc])
-+                enable_asm_redc=no])
-+                          ASMPATH=x86_64;;
-+# warning: with powerpc-apple-darwin* we can have ABI=32
-+# see bug #10646 on the bug tracker, where config.guess says
-+# powerpc-apple-darwin8.11.0 (this a 64-bit machine, but most applications
-+# are compiled in 32 bits). It works with --disable-asm-redc.
-+    powerpc-apple-darwin*)
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-+#if defined(__ppc__)
-+#error
-+#endif])], [], [AC_MSG_NOTICE([32-bit PowerPC, disabling asm-redc])
-+                enable_asm_redc=no])
-+                          ASMPATH=powerpc64;;
-+    powerpc64-*-linux*)
-+			  ECM_INCLUDE([<"$srcdir"/powerpc64/powerpc-defs.m4>])
-+			  ASMPATH=powerpc64;;
-+    i[[56]]86-*-* | k[[78]]*-*-* | athlon*-*-* | pentiumpro-*-* | \
-+    pentium2-*-* | viac3*-*-* | i686-apple-darwin*)
-+    		   	  ASMPATH=athlon;;
-+    *) AC_MSG_ERROR([[asm redc not available on this machine $host]]);;
-+  esac
-+fi
-+
-+if test "x$enable_asm_redc" = xyes; then
-+# do the necessary definitions and includes
-+  AC_DEFINE([USE_ASM_REDC],1,[Define to 1 to use asm redc])
-+  test "x$CCAS" != x || CCAS="$CC -c"
-+  AC_SUBST([CCAS])
-+  GMP_PROG_M4
-+  GMP_ASM_UNDERSCORE
-+  GMP_ASM_TEXT
-+  GMP_ASM_GLOBL
-+  GMP_ASM_TYPE
-+
-+  case $host in
-+    *-*-mingw32) GMP_DEFINE([WINDOWS64_ABI], 1)
-+                 AC_DEFINE([WINDOWS64_ABI], 1,[Define to 1 if x86_64 mulredc*() functions should be called with Windows ABI]);;
-+    *) ;;
-+  esac
-+
-+  case $host in
-+    pentium3-*-*)
-+      echo "WARNING: Your processor is recognized as Pentium3."
-+      echo "         The asm code uses SSE2, and therefore it might"
-+      echo "         fail if your proc is indeed a P3, and not a"
-+      echo "         Pentium M. If you have compilation problems,"
-+      echo "         consider using --disable-asm-redc." ;;
-+    *)
-+  esac
-+fi
-+AM_CONDITIONAL([ENABLE_ASM_REDC], [test "x$enable_asm_redc" = xyes])
-+
-+
-+############################
-+# Enable SSE2 instructions #
-+############################
-+# Test if we should use SSE2 instructions and if the cpu supports them
-+if test "x$enable_sse2" = "x"; then
-+dnl Default: if we build for Pentium 4, enable SSE2 code for the NTT
-+dnl Some SSE2 enabled cpus are identified as i686, we enables SSE2
-+dnl for them by default and let the tests below check if it works
-+  case $host in
-+    pentium4-*-* | viac7-*-* | i686-*-* | i786-*-*)
-+      enable_sse2=yes
-+    ;;
-+  esac
-+fi
-+# If the necessary predefines (__GNUC__ or __ICL, and __i386__)
-+# are not set, SSE2 will never be compiled in, and we switch off
-+# the SSE2 flag
-+if test "x$enable_sse2" = xyes; then
-+  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
-+#if !defined(__GNUC__) && !defined(__ICL) || !defined(__i386__)
-+#error
-+#IRIXdoesnotexitaterrordirective
-+#endif])], [], dnl Necessary predefines are present. Nothing to do
-+  [ dnl Necessary predefines are not present. Switch off SSE2
-+    AC_MSG_NOTICE([Not using GCC or ICC, or not a 32-bit x86. SSE2 disabled])
-+    enable_sse2=no])
-+fi
-+if test "x$enable_sse2" = xyes; then
-+  # See if we need -msse2 to enable SSE2 instructions
-+  AC_MSG_CHECKING([for SSE2 support])
-+  m4_define([SSE2_TEST_PROG], [AC_LANG_PROGRAM([], dnl
-+[#if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
-+/* On some machines, a program without constraints may pass without -msse2 but
-+   those with constraints in spv.c fail, thus we test with constraints here. */
-+asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
-+#else
-+#error
-+#IRIXdoesnotexitaterrordirective
-+#endif])])
-+  AC_COMPILE_IFELSE([SSE2_TEST_PROG], dnl
-+   [ dnl SSE2 works, nothing to be done
-+     AC_MSG_RESULT([yes])], dnl
-+   [ dnl SSE2 does not work, try again with -msse2
-+    OLDCFLAGS="$CFLAGS"
-+    CFLAGS="$CFLAGS -msse2"
-+    AC_COMPILE_IFELSE([SSE2_TEST_PROG], dnl
-+      [ dnl works now, keep CFLAGS like this
-+        AC_MSG_RESULT([yes, with -msse2])], dnl
-+      [ dnl still didn't work, switch off SSE2
-+       CFLAGS="$OLDCFLAGS"
-+       enable_sse2=no
-+       AC_MSG_RESULT([not supported, SSE2 disabled])
-+      ])])
-+fi
-+if test "x$enable_sse2" = xyes; then
-+  AC_DEFINE([HAVE_SSE2],1,[Define to 1 to enable SSE2 instructions in NTT code])
-+fi
-+
-+########################
-+# Add GWNUM if desired #
-+########################
-+dnl If user wants GWNUM, check if the file exists (either as .a or .lib)
-+if test "x$with_gwnum" != "x"; then
-+  if test "x$enable_openmp" = xyes; then
-+      AC_MSG_ERROR([Woltman's GWNUM currently cannot be used together with OpenMP])
-+  fi
-+  AC_CHECK_FILE([$with_gwnum/gwnum.a], [
-+    AC_DEFINE([HAVE_GWNUM], 1, [Define to 1 if gwnum.a or gwnum.lib exist])
-+    GWLIB="$with_gwnum/gwnum.a -lpthread"
-+    CPPFLAGS="$CPPFLAGS -I$with_gwnum"
-+  ],[
-+    AC_CHECK_FILE([$with_gwnum/gwnum.lib], [
-+      AC_DEFINE([HAVE_GWNUM], 1, [Define to 1 if gwnum.a or gwnum.lib exist])
-+      GWLIB="$with_gwnum/gwnum.lib -lpthread"
-+      CPPFLAGS="$CPPFLAGS -I$with_gwnum"
-+    ],[
-+      with_gwnum=
-+      AC_MSG_ERROR([Woltman's GWNUM library not found])
-+    ])
-+  ])
-+fi
-+AM_CONDITIONAL([WITH_GWNUM], [test "x$with_gwnum" != "x"])
-+
-+
-+dnl Checks for header files.
-+AC_FUNC_ALLOCA
-+AC_HEADER_STDC
-+AC_CHECK_HEADERS([math.h limits.h malloc.h strings.h sys/time.h unistd.h io.h signal.h fcntl.h])
-+AC_CHECK_HEADERS([windows.h])
-+AC_CHECK_HEADERS([ctype.h sys/types.h sys/resource.h])
-+
-+dnl Checks for library functions that are not in GMP
-+AC_FUNC_STRTOD
-+
-+dnl Check functions in the math library
-+AC_CHECK_LIB(m,pow,,AC_MSG_ERROR(required function missing))
-+AC_CHECK_LIB(m,floor,,AC_MSG_ERROR(required function missing))
-+AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR(required function missing))
-+AC_CHECK_LIB(m,fmod,,AC_MSG_ERROR(required function missing))
-+AC_CHECK_LIB(m,cos)
-+
-+dnl Check for GSL but don't add it to LIBS, since only rho uses it and
-+dnl we don't want all other binaries to depend on it.
-+dnl If found, pass link flags to Makefile via GSL_LD_FLAGS
-+GSL_LD_FLAGS=
-+dnl Check if "-lgslcblas" works. If yes, check if "-lgsl -lgslcblas" works.
-+dnl If both work, put "-lgsl -lgslcblas" in GSL_LD_FLAGS
-+AC_CHECK_LIB([gslcblas],[cblas_dgemm], dnl
-+ [AC_CHECK_LIB([gsl],[gsl_blas_dgemm], dnl
-+  [AC_DEFINE([HAVE_LIBGSL],1,[Define to 1 if you have the `gsl' library (-lgsl).])
-+   AC_DEFINE([HAVE_LIBGSLCBLAS],1,[Define to 1 if you have the `gslcblas' library (-lgslcblas).])
-+   GSL_LD_FLAGS="-lgsl -lgslcblas"], [], dnl
-+   dnl Here comes the "OTHER-LIBRARIES" field for AC_CHECK_LIB [gsl]:
-+   [-lgslcblas])])
-+
-+AC_CHECK_FUNCS([isascii memset strchr strlen strncasecmp strstr], [], [AC_MSG_ERROR([required function missing])])
-+AC_CHECK_FUNCS([access unlink], [], [AC_MSG_ERROR([required function missing])])
-+AC_CHECK_FUNCS([isspace isdigit isxdigit], [], [AC_MSG_ERROR([required function missing])])
-+AC_CHECK_FUNCS([time ctime], [], [AC_MSG_ERROR([required function missing])])
-+AC_CHECK_FUNCS([setpriority nice gethostname gettimeofday getrusage memmove signal fcntl fileno])
-+
-+dnl FIXME: which win32 library contains these functions?
-+dnl AC_CHECK_FUNCS([GetCurrentProcess GetProcessTimes])
-+AC_CHECK_FUNCS([malloc_usable_size])
-+
-+
-+dnl If we use GCC and user has not specified his own CFLAGS,
-+dnl add some warning flags, avoiding duplication
-+if test "x$GCC" = xyes && test "x$user_redefine_cc" != xyes; then
-+  case $CFLAGS in
-+    "-pedantic "* | *" -pedantic "* | *" -pedantic") ;;
-+    *) CFLAGS="-pedantic $CFLAGS"
-+  esac
-+  case $CFLAGS in
-+    "-Wundef "* | *" -Wundef "* | *" -Wundef") ;;
-+    *) CFLAGS="-Wundef $CFLAGS"
-+  esac
-+  case $CFLAGS in
-+    "-Wall "* | *" -Wall "* | *" -Wall") ;;
-+    *) CFLAGS="-Wall $CFLAGS"
-+  esac
-+  case $CFLAGS in
-+    "-W "* | *" -W "* | *" -W") ;;
-+    *) CFLAGS="-W $CFLAGS"
-+  esac
-+#  CFLAGS="-Wall -W -Wundef -pedantic $CFLAGS"
-+fi
-+
-+
-+dnl Find GMP and do some sanity checks
-+dnl Tests concerning the include directories.
-+if test -d "$with_gmp_include"; then
-+  dnl AC_CHECK_HEADERS and AC_PREPROC_IFELSE uses CPPFLAGS but not CFLAGS
-+  CPPFLAGS="-I$with_gmp_include $CPPFLAGS"
-+else
-+  with_gmp_include=
-+fi
-+AC_CHECK_HEADERS([gmp.h], [], AC_MSG_ERROR([required header file missing]))
-+
-+dnl This needs to find only the header file so we can do it here, before
-+dnl we start looking for libgmp.a
-+AC_MSG_CHECKING([for recent GMP])
-+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
-+#include <gmp.h>
-+#if (__GNU_MP_VERSION <= 4)
-+#error
-+#IRIXdoesnotexitaterrordirective
-+#endif
-+]])],
-+  [AC_MSG_RESULT(yes)],
-+  [AC_MSG_RESULT(no)
-+   AC_MSG_ERROR([GMP 5.0.0 or newer is required])]
-+)
-+
-+dnl Figure out if GMP is MPIR
-+AC_MSG_CHECKING([if GMP is MPIR])
-+AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
-+#include <gmp.h>
-+#ifndef __MPIR_VERSION
-+#error
-+#IRIXdoesnotexitaterrordirective
-+#endif
-+]])],
-+  [AC_MSG_RESULT(yes)
-+   AC_DEFINE([HAVE_MPIR],1,[Define to 1 if GMP is MPIR])],
-+  [AC_MSG_RESULT(no)])
-+
-+dnl Now choose how to link the GMP library. If we can, we'd prefer to
-+dnl link it statically since that makes for faster function calls. To
-+dnl link it statically, we mustn't build a dynamic GMP-ECM library and
-+dnl we need to find the libgmp.a file. At the moment, we only look for
-+dnl it at the path specified by the user (i.e. --with-gmp) but make no
-+dnl attempt to find it in the default system lib directories.
-+
-+dnl If GMP is linked statically, we pass its path/filename to the Makefile
-+dnl via GMPLIB, otherwise -lgmp is passed via GMPLIB.
-+dnl The search path to the dynamic GMP library is added to LDFLAGS,
-+dnl if GMP is not specified by full pathname.
-+
-+GMPLDFLAGS=""
-+if test -d "$with_gmp_lib"; then
-+  GMPLDFLAGS="-L$with_gmp_lib"
-+fi
-+GMPLIB="-lgmp"
-+if test "x$enable_shared" != xyes; then
-+  if test -r "$with_gmp_lib/libgmp.a"; then
-+    GMPLIB="$with_gmp_lib/libgmp.a"
-+    dnl Don't need -L flag since we give full path to libgmp.a
-+    GMPLDFLAGS=""
-+  fi
-+fi
-+AC_SUBST([GMPLIB])
-+LDFLAGS="$LDFLAGS $GMPLDFLAGS"
-+
-+
-+dnl Test linking against GMP. This tests, for example, that the compiler
-+dnl and GMP agree on the ABI (32 or 64 bit). AC_CHECK_LIB() does not work,
-+dnl as it requires linking the library with -lgmp, whereas we may want
-+dnl to specify it by full pathname as we do in the Makefile
-+
-+AC_MSG_CHECKING([whether we can link against GMP])
-+LIBS_BACKUP="$LIBS"
-+LIBS="$LIBS $GMPLIB"
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+#ifdef HAVE_GMP_H
-+#include <gmp.h>
-+#endif]],[[
-+  mpz_t t;
-+  mpz_init(t);
-+  mpz_clear(t);
-+  return 0;
-+]])], [AC_MSG_RESULT(yes)],
-+   [AC_MSG_RESULT(no)
-+    AC_MSG_ERROR([Could not link against GMP library.])]
-+)
-+
-+dnl Check for corresponding 'gmp.h' and libgmp.a
-+dnl This requires running a program linked against GMP,
-+dnl so is done after the link-only test.
-+AC_MSG_CHECKING([if gmp.h version and libgmp version are the same])
-+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+#include <stdio.h>
-+#include <string.h>
-+#include <gmp.h>
-+]],[[
-+char buffer[100];
-+if (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR <= 2 &&
-+    __GNU_MP_VERSION_PATCHLEVEL == 0)
-+  sprintf (buffer, "%d.%d", __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR);
-+else
-+  sprintf (buffer, "%d.%d.%d", __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR,
-+   __GNU_MP_VERSION_PATCHLEVEL);
-+printf ("(%s/%s) ", buffer, gmp_version);
-+return strcmp (buffer, gmp_version);
-+]])], [AC_MSG_RESULT([yes])],
-+   [AC_MSG_RESULT([no])
-+    AC_MSG_ERROR(['gmp.h' and 'libgmp' have different versions, you have to reinstall GMP properly.])],
-+   [AC_MSG_RESULT([cross-compiling: cannot test])]
-+)
-+
-+AC_CHECK_FUNCS([__gmpn_add_nc __gmpn_mod_34lsub1 __gmpn_redc_1 __gmpn_redc_2])
-+AC_CHECK_FUNCS([__gmpn_mullo_n __gmpn_redc_n __gmpn_preinv_mod_1])
-+
-+LIBS="$LIBS_BACKUP"
-+
-+dnl Check if the compiler understands some __attribute__ directives
-+AC_MSG_CHECKING([whether compiler knows __attribute__((hot))])
-+dnl The AC_LANG_WERROR directive causes configure to consider a test
-+dnl compilation unsuccessful if it produced any output on stderr.
-+dnl We use it since unknown __attribute__ only cause a warning, not an
-+dnl error. Unfortunately there seems to be no way to switch it off again,
-+dnl so this test is at the end of the configure script
-+AC_LANG_WERROR
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([void foo() __attribute__ ((hot));
-+void foo() {return;}], [foo()])],
-+[AC_DEFINE([ATTRIBUTE_HOT],[__attribute__ ((hot))], [How to specify hot-spot attribute, if available])
-+ AC_MSG_RESULT([yes])
-+],
-+[AC_DEFINE([ATTRIBUTE_HOT],[ ], [How to specify hot-spot attribute, if available])
-+ AC_MSG_RESULT([no])
-+])
-+
-+dnl Check for xsltproc
-+AC_CHECK_PROG([XSLTPROC],[xsltproc],[xsltproc])
-+if test "x$XSLTPROC" != x; then
-+  AC_MSG_CHECKING([for docbook.xsl])
-+  if test "x$XSLDIR" = x; then
-+    if test -d "/usr/local/share/sgml/docbook/xsl-stylesheets"; then
-+      XSLDIR="/usr/local/share/sgml/docbook/xsl-stylesheets"
-+    elif test -d "/usr/share/sgml/docbook/xsl-stylesheets"; then
-+      XSLDIR="/usr/share/sgml/docbook/xsl-stylesheets"
-+    elif test -d "/usr/local/share/docbook/"; then
-+      XSLDIR="/usr/local/share/docbook/"
-+    elif test -d "/usr/share/docbook/"; then
-+      XSLDIR="/usr/share/docbook/"
-+    fi
-+  fi
-+  if test -r "$XSLDIR/manpages/docbook.xsl"; then
-+    AC_MSG_RESULT([yes])
-+    make_manpage="yes"
-+  else
-+    AC_MSG_RESULT([no])
-+  fi
-+fi
-+AM_CONDITIONAL([MAKE_MANPAGE], [test "x$make_manpage" = xyes])
-+
-+dnl Check for valgrind. GMP-ECM uses exit code 1 to signal error,
-+dnl so we make valgrind use that code to signal error, too
-+AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind -q --error-exitcode=1])
-+
-+case $host in
-+  athlon*-*-*) config_arch="athlon" ;;
-+  x86_64*-*-*) config_arch="athlon64" ;;
-+  pentium3-*-*) config_arch="pentium3" ;;
-+  pentium4-*-*) config_arch="pentium4" ;;
-+  pentium-m-*-*) config_arch="pentium-m" ;;
-+  alphaev6*-*-*) config_arch="alpha-ev6" ;;
-+  alphaev56*-*-*) config_arch="alpha-ev56" ;;
-+  alphaev5*-*-*) config_arch="alpha-ev5" ;;
-+  powerpc7450-*-*) config_arch="powerpc7450" ;;
-+  powerpc-apple-darwin* | powerpc64-*-*) config_arch="powerpc970" ;;
-+  mips64el-*-*) config_arch="mips64el" ;;
-+  armv5tel-*-*) config_arch="armv5tel" ;;
-+  sparc64-*-*) config_arch="sparc64" ;;
-+  ia64-*-*) config_arch="ia64" ;;
-+  hppa2.0-*-*) config_arch="hppa2.0" ;;
-+  *) config_arch="default" ;;
-+esac
-+
-+# See if this is a Core 2, if we have /proc/cpuinfo
-+core2warn=no
-+if test x"$config_arch" = xathlon64; then
-+  if test -f /proc/cpuinfo; then
-+    if $EGREP -q "Core\(TM\)2" /proc/cpuinfo; then
-+      config_arch=core2
-+    elif $EGREP -q "Core\(TM\) i5" /proc/cpuinfo; then
-+      config_arch=corei5
-+    fi;
-+  else
-+    # No /proc/cpuinfo, tell user about ecm-params.h.core2
-+    core2warn=yes
-+  fi;
-+fi
-+
-+# See if this is a Pentium 4, if we have /proc/cpuinfo
-+pentium4warn=no
-+if test x"$config_arch" = xdefault; then
-+  if test -f /proc/cpuinfo; then
-+    if $EGREP -q "Pentium\(R\) 4" /proc/cpuinfo; then
-+      config_arch=pentium4
-+    fi;
-+  else
-+    # No /proc/cpuinfo, tell user about ecm-params.h.pentium4
-+    pentium4warn=yes
-+  fi;
-+fi
-+
-+LIBS="$LIBS $GWLIB"
-+
-+GMP_FINISH
-+AC_CONFIG_FILES([Makefile athlon/Makefile pentium4/Makefile x86_64/Makefile powerpc64/Makefile build.vc10/Makefile build.vc10/assembler/Makefile build.vc10/ecm/Makefile build.vc10/libecm/Makefile build.vc10/tune/Makefile build.vc10/bench_mulredc/Makefile])
-+AC_CONFIG_LINKS([ecm-params.h:ecm-params.h.$config_arch])
-+MUL_FFT_PARAMS="mul_fft-params.h.$config_arch"
-+if ! test -f "$MUL_FFT_PARAMS"
-+then
-+  MUL_FFT_PARAMS="mul_fft-params.h.default"
-+fi
-+AC_CONFIG_LINKS([mul_fft-params.h:"$MUL_FFT_PARAMS"])
-+
-+AC_SUBST([XSLDIR])
-+AC_SUBST([ASMPATH])
-+AC_SUBST([GSL_LD_FLAGS])
-+
-+AC_OUTPUT
-+
-+AC_MSG_NOTICE([Configuration:])
-+AC_MSG_NOTICE([Build for host type $host])
-+
-+AC_MSG_NOTICE([CC=$CC, CFLAGS=$CFLAGS])
-+AC_MSG_NOTICE([Linking GMP with $GMPLIB])
-+
-+if test "x$enable_asm_redc" = xyes; then
-+  AC_MSG_NOTICE([Using asm redc code from directory $ASMPATH])
-+else
-+  AC_MSG_NOTICE([Not using asm redc code])
-+fi
-+
-+if test "x$enable_sse2" = xyes; then
-+  AC_MSG_NOTICE([Using SSE2 instructions in NTT code])
-+else
-+  AC_MSG_NOTICE([Not using SSE2 instructions in NTT code])
-+fi
-+
-+if test "x$with_gwnum" != "x"; then
-+  AC_MSG_NOTICE([Linking with George Woltman's GWNUM])
-+fi
-+
-+if test "x$enable_assert" = xyes; then
-+  AC_MSG_NOTICE([Assertions enabled])
-+else
-+  AC_MSG_NOTICE([Assertions disabled])
-+fi
-+
-+if test "x$enable_shellcmd" = xyes; then
-+  AC_MSG_NOTICE([Shell command execution enabled])
-+else
-+  AC_MSG_NOTICE([Shell command execution disabled])
-+fi
-+
-+if test "x$enable_openmp" = xyes; then
-+  AC_MSG_NOTICE([OpenMP enabled])
-+else
-+  AC_MSG_NOTICE([OpenMP disabled])
-+fi
-+
-+if test "x$enable_memory_debug" = xyes; then
-+  AC_MSG_NOTICE([Memory debugging enabled])
-+else
-+  AC_MSG_NOTICE([Memory debugging disabled])
-+fi
-+
-+if test x"$core2warn" = xyes; then
-+  AC_MSG_NOTICE([Your cpu was detected as x86_64; if it is a Core 2, please either use the ecm-params.h.core2 file by executing the commands:])
-+  AC_MSG_NOTICE([rm ecm-params.h])
-+  AC_MSG_NOTICE([ln -s ecm-params.h.core2 ecm-params.h])
-+  AC_MSG_NOTICE([or generate a custom ecm-params.h file for your system as described in INSTALL.])
-+fi
-+
-+if test x"$pentium4warn" = xyes; then
-+  AC_MSG_NOTICE([Your cpu was detected as default; if it is a Pentium 4, please either use the ecm-params.h.pentium4 file by executing the commands:])
-+  AC_MSG_NOTICE([rm ecm-params.h])
-+  AC_MSG_NOTICE([ln -s ecm-params.h.pentium4 ecm-params.h])
-+  AC_MSG_NOTICE([or generate a custom ecm-params.h file for your system as described in INSTALL.])
-+fi
---- a/configure.in
-+++ /dev/null
-@@ -1,710 +0,0 @@
--m4_define([ECM_VERSION], [6.4.4])
--
--AC_PREREQ([2.57])
--AC_INIT([ecm], ECM_VERSION, [ecm-discuss at lists.gforge.inria.fr])
--AC_CONFIG_HEADER([config.h])
--AC_CONFIG_MACRO_DIR([m4])
--GMP_INIT([config.m4])
--AM_INIT_AUTOMAKE([1.10])
--AM_INIT_AUTOMAKE([ecm], ECM_VERSION)
--AC_CANONICAL_HOST
--
--dnl Copied from MPFR 2.4.2:
--unset GMP_CFLAGS GMP_CC user_redefine_cc
--dnl Check if user request his CC and CFLAGS
--if test -n "$CFLAGS" || test -n "$CC" ; then
--  user_redefine_cc=yes
--fi
--
--dnl the following is required to compile auxi.c according to autoconf 2.61
--AC_PROG_EGREP
--AC_PROG_SED
--
--AC_ARG_WITH([gmp],         [  --with-gmp=DIR          GMP install directory ],  [with_gmp_include=$withval/include with_gmp_lib=$withval/lib])
--AC_ARG_WITH([gmp_include], [  --with-gmp-include=DIR  GMP include directory ],  [with_gmp_include=$withval])
--AC_ARG_WITH([gmp_lib],     [  --with-gmp-lib=DIR      GMP lib directory ],      [with_gmp_lib=$withval])
--AC_ARG_WITH([gwnum],       [  --with-gwnum=DIR        GWNUM source directory ], [with_gwnum=$withval])
--
--if test x"$with_gmp_include" != "x" 
--then
--  if ! test -d "$with_gmp_include"
--  then
--    AC_MSG_ERROR([Specified GMP include directory "$with_gmp_include" does not exist])
--  fi
--  CPPFLAGS="-I$with_gmp_include"
--fi
--
--if test x"$with_gmp_lib" != "x" 
--then
--  if ! test -d "$with_gmp_lib"
--  then
--    AC_MSG_ERROR([Specified GMP library directory "$with_gmp_lib" does not exist])
--  fi
--fi
--
--############################
--# Parse --enable-* options #
--############################
--
--dnl Assertions are enabled by default for beta/rc releases. The last parameter
--dnl of AC_ARG_ENABLE() sets the default value (change also default=...).
--AC_ARG_ENABLE([assert],
--[AS_HELP_STRING([--enable-assert], [enable ASSERT checking [[default=no]]])],[],[enable_assert=no])
--if test "x$enable_assert" = xyes; then
--  AC_DEFINE([WANT_ASSERT],1,[Define to 1 if you want assertions enabled])
--  GMP_DEFINE([WANT_ASSERT], 1)
--fi
--
--AC_ARG_ENABLE([shellcmd],
--[AS_HELP_STRING([--enable-shellcmd], [enable shell command execution [[default=no]]])])
--if test "x$enable_shellcmd" = xyes; then
--  AC_DEFINE([WANT_SHELLCMD],1,[Define to 1 if you want shell command execution])
--fi
--
--AC_ARG_ENABLE([gmp-cflags],
--[AS_HELP_STRING([--enable-gmp-cflags], [enable importing CFLAGS from gmp.h [[default=yes]]])],[],[enable_gmp_cflags=yes])
--
--AC_ARG_ENABLE([openmp],
--[AS_HELP_STRING([--enable-openmp], [enable OpenMP multi-threading [[default=no]]])])
--
--AC_ARG_ENABLE([sse2],
--[AS_HELP_STRING([--enable-sse2], [use SSE2 instructions in NTT code (default=yes for 32-bit x86 systems, if supported)])])
--
--AC_ARG_ENABLE([asm-redc],
--[AS_HELP_STRING([--enable-asm-redc], [use an asm redc (default=yes on x86_64 and powerpc64, no on others)])])
--
--AC_ARG_ENABLE([memory-debug],
--[AS_HELP_STRING([--enable-memory-debug], [enable memory debugging [[default=no]]])])
--if test "x$enable_memory_debug" = xyes; then
--  AC_DEFINE([MEMORY_DEBUG], 1, [Define to 1 if you want memory debugging])
--fi
--AM_CONDITIONAL([MEMORY_DEBUG], [test "x$enable_memory_debug" = xyes])
--
--AC_ARG_ENABLE([mulredc-svoboda],
--[AS_HELP_STRING([--enable-mulredc-svoboda], [enable Svoboda mulredc [[default=no]]])])
--if test "x$enable_mulredc_svoboda" = xyes; then
--  AC_DEFINE([MULREDC_SVOBODA],1,[Define to 1 if you want Svoboda mulredc])
--  GMP_DEFINE([MULREDC_SVOBODA], 1)
--fi
--
--
--
--dnl Use C language for test programs
--AC_LANG([C])
--
--dnl Copied from MPFR 2.4.1 and modified
--dnl We need to guess the C preprocessor instead of using AC_PROG_CPP,
--dnl since AC_PROG_CPP implies AC_PROG_CC, which chooses a compiler
--dnl (before we have the chance to get it from gmp.h) and does some
--dnl checking related to this compiler (such as dependency tracking
--dnl options); if the compiler changes due to __GMP_CC in gmp.h, one
--dnl would have incorrect settings.
--dnl FIXME: Move this in aclocal ?
--
--if test "x$user_redefine_cc" = x && test "x$enable_gmp_cflags" = xyes && test "x$cross_compiling" != xyes; then
--if test "x$GMP_CC$GMP_CFLAGS" = x; then
--   AC_MSG_CHECKING([for CC and CFLAGS in gmp.h])
--   GMP_CC=__GMP_CC
--   GMP_CFLAGS=__GMP_CFLAGS
--   for cpp in /lib/cpp gcc cc c99
--   do
--     test $cpp = /lib/cpp || cpp="$cpp -E"
--     echo "Trying to run $cpp" >&AS_MESSAGE_LOG_FD
--     AC_LANG_CONFTEST([AC_LANG_SOURCE([foo])])
--     if $cpp $CPPFLAGS conftest.$ac_ext > /dev/null 2> /dev/null ; then
--       # Get CC and CFLAGS
--       AC_LANG_CONFTEST([AC_LANG_SOURCE([#include "gmp.h"
--MPFR_OPTION_CC __GMP_CC
--MPFR_OPTION_CFLAGS __GMP_CFLAGS])])
--       echo "Trying to parse gmp.h with: $cpp $CPPFLAGS conftest.$ac_ext" >&AS_MESSAGE_LOG_FD
--       if $cpp $CPPFLAGS conftest.$ac_ext 2> /dev/null > conftest.out; then
--         GMP_CC="`$EGREP MPFR_OPTION_CC conftest.out | $SED -e 's/MPFR_OPTION_CC //g' | $SED -e 's/"//g'`"
--         GMP_CFLAGS="`$EGREP MPFR_OPTION_CFLAGS conftest.out | $SED -e 's/MPFR_OPTION_CFLAGS //g'| $SED -e 's/"//g'`"
--         echo "Success, GMP_CC=$GMP_CC, GMP_CFLAGS=$GMP_CFLAGS" >&AS_MESSAGE_LOG_FD
--         break
--       else
--         echo "Could not parse gmp.h with $cpp" >&AS_MESSAGE_LOG_FD
--       fi
--     else
--       echo "Could not run $cpp" >&AS_MESSAGE_LOG_FD
--     fi
--   done
--   rm -f conftest*
--   if test "x$GMP_CC" = "x__GMP_CC" || test "x$GMP_CFLAGS" = "x__GMP_CFLAGS" ; then
--      AC_MSG_RESULT([no])
--      GMP_CFLAGS=
--      GMP_CC=
--   else
--      AC_MSG_RESULT([yes CC=$GMP_CC CFLAGS=$GMP_CFLAGS])
--   fi
--fi
--
--dnl But these variables may be invalid, so we must check them first.
--dnl Note: we do not use AC_RUN_IFELSE, as it implies AC_PROG_CC.
--if test "x$GMP_CC$GMP_CFLAGS" != x; then
--   AC_MSG_CHECKING([whether CC=$GMP_CC and CFLAGS=$GMP_CFLAGS works])
--   AC_LANG_CONFTEST([AC_LANG_SOURCE([int main (void) { return 0; }])])
--   if $GMP_CC $GMP_CFLAGS -o conftest conftest.$ac_ext 2> /dev/null ; then
--     AC_MSG_RESULT([yes])
--     CFLAGS=$GMP_CFLAGS
--     CC=$GMP_CC
--   else
--     AC_MSG_RESULT([no, reverting to default])
--   fi
--   rm -f conftest*
--fi
--
--fi
--
--
--dnl Checks for programs.
--AC_PROG_CC
--AM_PROG_AS
--AM_PROG_CC_C_O
--
--
--# Now that we have decided on CC and CFLAGS, init libtool
--# Don't make a shared library by default. Enable building a shared library
--# by specifying "--enable-shared" on the ./configure command line
--LT_PREREQ([2.2.6])
--LT_INIT([disable-shared])
--
--
--dnl Checks for typedefs, structures, and compiler characteristics.
--AC_TYPE_INT64_T
--AC_TYPE_UINT64_T
--AC_TYPE_LONG_LONG_INT
--
--dnl Check if compiler supports "const," if not define it to empty string
--AC_C_CONST
--
--dnl Check if compiler supports "inline," if not define it to 
--dnl __inline__ or __inline or the empty string
--AC_C_INLINE
--
--dnl Check if both time.h and sys/time.h can be included
--AC_HEADER_TIME
--
--dnl Define size_t to something useable if standard headers don't
--AC_TYPE_SIZE_T
--
--
--dnl If OpenMP is enabled, check which command line parameter (if any)
--dnl if required to make the compiler enable OpenMP
--if test "x$enable_openmp" = xyes; then
--  AC_OPENMP
--fi
--
--########################
--# Enable asm redc code #
--########################
--# If --(en|dis)able-asm-redc not specified, choose default value
--# Test if asm redc code is available for this cpu.
--# Point ASMPATH to the correct subdirectory.
--
--# asm_redc enabled by default for x86_64 and 64 bit PowerPC
--if test "x$enable_asm_redc" = x; then
--  case $host in
--    x86_64*-*-* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
--    *) enable_asm_redc=no;;
--  esac
--fi
--
--if test "x$enable_asm_redc" = xyes; then
--  case $host in
--    pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
--    x86_64*-*-*)
--# In case GMP has been compiled with a 32-bit ABI...
--# Use AC_COMPILE_IFELSE instead of AC_PREPROC_IFELSE, otherwise
--# GMP's CFLAGS doesn't seem to be taken into account.
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
--#if defined(__i386__)
--#error
--#endif])], [], [AC_MSG_NOTICE([32-bit ABI (i386), disabling asm-redc])
--                enable_asm_redc=no])
--                          ASMPATH=x86_64;;
--# warning: with powerpc-apple-darwin* we can have ABI=32
--# see bug #10646 on the bug tracker, where config.guess says
--# powerpc-apple-darwin8.11.0 (this a 64-bit machine, but most applications
--# are compiled in 32 bits). It works with --disable-asm-redc.
--    powerpc-apple-darwin*)
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
--#if defined(__ppc__)
--#error
--#endif])], [], [AC_MSG_NOTICE([32-bit PowerPC, disabling asm-redc])
--                enable_asm_redc=no])
--                          ASMPATH=powerpc64;;
--    powerpc64-*-linux*)
--			  ECM_INCLUDE([<"$srcdir"/powerpc64/powerpc-defs.m4>])
--			  ASMPATH=powerpc64;;
--    i[[56]]86-*-* | k[[78]]*-*-* | athlon*-*-* | pentiumpro-*-* | \
--    pentium2-*-* | viac3*-*-* | i686-apple-darwin*)
--    		   	  ASMPATH=athlon;;
--    *) AC_MSG_ERROR([[asm redc not available on this machine $host]]);;
--  esac
--fi
--
--if test "x$enable_asm_redc" = xyes; then
--# do the necessary definitions and includes
--  AC_DEFINE([USE_ASM_REDC],1,[Define to 1 to use asm redc])
--  test "x$CCAS" != x || CCAS="$CC -c"
--  AC_SUBST([CCAS])
--  GMP_PROG_M4
--  GMP_ASM_UNDERSCORE
--  GMP_ASM_TEXT
--  GMP_ASM_GLOBL
--  GMP_ASM_TYPE 
--
--  case $host in
--    *-*-mingw32) GMP_DEFINE([WINDOWS64_ABI], 1)
--                 AC_DEFINE([WINDOWS64_ABI], 1,[Define to 1 if x86_64 mulredc*() functions should be called with Windows ABI]);;
--    *) ;;
--  esac
--
--  case $host in
--    pentium3-*-*)
--      echo "WARNING: Your processor is recognized as Pentium3."
--      echo "         The asm code uses SSE2, and therefore it might"
--      echo "         fail if your proc is indeed a P3, and not a"
--      echo "         Pentium M. If you have compilation problems,"
--      echo "         consider using --disable-asm-redc." ;;
--    *)
--  esac
--fi
--AM_CONDITIONAL([ENABLE_ASM_REDC], [test "x$enable_asm_redc" = xyes])
--
--
--############################
--# Enable SSE2 instructions #
--############################
--# Test if we should use SSE2 instructions and if the cpu supports them
--if test "x$enable_sse2" = "x"; then
--dnl Default: if we build for Pentium 4, enable SSE2 code for the NTT
--dnl Some SSE2 enabled cpus are identified as i686, we enables SSE2 
--dnl for them by default and let the tests below check if it works
--  case $host in
--    pentium4-*-* | viac7-*-* | i686-*-* | i786-*-*) 
--      enable_sse2=yes
--    ;;
--  esac
--fi
--# If the necessary predefines (__GNUC__ or __ICL, and __i386__)
--# are not set, SSE2 will never be compiled in, and we switch off
--# the SSE2 flag
--if test "x$enable_sse2" = xyes; then
--  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
--#if !defined(__GNUC__) && !defined(__ICL) || !defined(__i386__)
--#error
--#IRIXdoesnotexitaterrordirective
--#endif])], [], dnl Necessary predefines are present. Nothing to do
--  [ dnl Necessary predefines are not present. Switch off SSE2
--    AC_MSG_NOTICE([Not using GCC or ICC, or not a 32-bit x86. SSE2 disabled])
--    enable_sse2=no])
--fi
--if test "x$enable_sse2" = xyes; then
--  # See if we need -msse2 to enable SSE2 instructions
--  AC_MSG_CHECKING([for SSE2 support])
--  m4_define([SSE2_TEST_PROG], [AC_LANG_PROGRAM([], dnl
--[#if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
--/* On some machines, a program without constraints may pass without -msse2 but
--   those with constraints in spv.c fail, thus we test with constraints here. */
--asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
--#else
--#error
--#IRIXdoesnotexitaterrordirective
--#endif])])
--  AC_COMPILE_IFELSE([SSE2_TEST_PROG], dnl
--   [ dnl SSE2 works, nothing to be done
--     AC_MSG_RESULT([yes])], dnl
--   [ dnl SSE2 does not work, try again with -msse2
--    OLDCFLAGS="$CFLAGS"
--    CFLAGS="$CFLAGS -msse2"
--    AC_COMPILE_IFELSE([SSE2_TEST_PROG], dnl
--      [ dnl works now, keep CFLAGS like this
--        AC_MSG_RESULT([yes, with -msse2])], dnl
--      [ dnl still didn't work, switch off SSE2
--       CFLAGS="$OLDCFLAGS"
--       enable_sse2=no
--       AC_MSG_RESULT([not supported, SSE2 disabled])
--      ])])
--fi
--if test "x$enable_sse2" = xyes; then
--  AC_DEFINE([HAVE_SSE2],1,[Define to 1 to enable SSE2 instructions in NTT code])
--fi
--
--########################
--# Add GWNUM if desired #
--########################
--dnl If user wants GWNUM, check if the file exists (either as .a or .lib)
--if test "x$with_gwnum" != "x"; then
--  if test "x$enable_openmp" = xyes; then
--      AC_MSG_ERROR([Woltman's GWNUM currently cannot be used together with OpenMP])
--  fi
--  AC_CHECK_FILE([$with_gwnum/gwnum.a], [
--    AC_DEFINE([HAVE_GWNUM], 1, [Define to 1 if gwnum.a or gwnum.lib exist])
--    GWLIB="$with_gwnum/gwnum.a -lpthread"
--    CPPFLAGS="$CPPFLAGS -I$with_gwnum"
--  ],[
--    AC_CHECK_FILE([$with_gwnum/gwnum.lib], [
--      AC_DEFINE([HAVE_GWNUM], 1, [Define to 1 if gwnum.a or gwnum.lib exist])
--      GWLIB="$with_gwnum/gwnum.lib -lpthread"
--      CPPFLAGS="$CPPFLAGS -I$with_gwnum"
--    ],[
--      with_gwnum=
--      AC_MSG_ERROR([Woltman's GWNUM library not found])
--    ])
--  ])
--fi
--AM_CONDITIONAL([WITH_GWNUM], [test "x$with_gwnum" != "x"])
--
--
--dnl Checks for header files.
--AC_FUNC_ALLOCA
--AC_HEADER_STDC
--AC_CHECK_HEADERS([math.h limits.h malloc.h strings.h sys/time.h unistd.h io.h signal.h fcntl.h])
--AC_CHECK_HEADERS([windows.h])
--AC_CHECK_HEADERS([ctype.h sys/types.h sys/resource.h])
--
--dnl Checks for library functions that are not in GMP
--AC_FUNC_STRTOD
--
--dnl Check functions in the math library
--AC_CHECK_LIB(m,pow,,AC_MSG_ERROR(required function missing))
--AC_CHECK_LIB(m,floor,,AC_MSG_ERROR(required function missing))
--AC_CHECK_LIB(m,sqrt,,AC_MSG_ERROR(required function missing))
--AC_CHECK_LIB(m,fmod,,AC_MSG_ERROR(required function missing))
--AC_CHECK_LIB(m,cos)
--
--dnl Check for GSL but don't add it to LIBS, since only rho uses it and
--dnl we don't want all other binaries to depend on it. 
--dnl If found, pass link flags to Makefile via GSL_LD_FLAGS
--GSL_LD_FLAGS=
--dnl Check if "-lgslcblas" works. If yes, check if "-lgsl -lgslcblas" works.
--dnl If both work, put "-lgsl -lgslcblas" in GSL_LD_FLAGS
--AC_CHECK_LIB([gslcblas],[cblas_dgemm], dnl
-- [AC_CHECK_LIB([gsl],[gsl_blas_dgemm], dnl
--  [AC_DEFINE([HAVE_LIBGSL],1,[Define to 1 if you have the `gsl' library (-lgsl).])
--   AC_DEFINE([HAVE_LIBGSLCBLAS],1,[Define to 1 if you have the `gslcblas' library (-lgslcblas).])
--   GSL_LD_FLAGS="-lgsl -lgslcblas"], [], dnl
--   dnl Here comes the "OTHER-LIBRARIES" field for AC_CHECK_LIB [gsl]:
--   [-lgslcblas])])
--
--AC_CHECK_FUNCS([isascii memset strchr strlen strncasecmp strstr], [], [AC_MSG_ERROR([required function missing])])
--AC_CHECK_FUNCS([access unlink], [], [AC_MSG_ERROR([required function missing])])
--AC_CHECK_FUNCS([isspace isdigit isxdigit], [], [AC_MSG_ERROR([required function missing])])
--AC_CHECK_FUNCS([time ctime], [], [AC_MSG_ERROR([required function missing])])
--AC_CHECK_FUNCS([setpriority nice gethostname gettimeofday getrusage memmove signal fcntl fileno])
--
--dnl FIXME: which win32 library contains these functions?
--dnl AC_CHECK_FUNCS([GetCurrentProcess GetProcessTimes])
--AC_CHECK_FUNCS([malloc_usable_size])
--
--
--dnl If we use GCC and user has not specified his own CFLAGS, 
--dnl add some warning flags, avoiding duplication
--if test "x$GCC" = xyes && test "x$user_redefine_cc" != xyes; then
--  case $CFLAGS in
--    "-pedantic "* | *" -pedantic "* | *" -pedantic") ;;
--    *) CFLAGS="-pedantic $CFLAGS"
--  esac
--  case $CFLAGS in
--    "-Wundef "* | *" -Wundef "* | *" -Wundef") ;;
--    *) CFLAGS="-Wundef $CFLAGS"
--  esac
--  case $CFLAGS in
--    "-Wall "* | *" -Wall "* | *" -Wall") ;;
--    *) CFLAGS="-Wall $CFLAGS"
--  esac
--  case $CFLAGS in
--    "-W "* | *" -W "* | *" -W") ;;
--    *) CFLAGS="-W $CFLAGS"
--  esac
--#  CFLAGS="-Wall -W -Wundef -pedantic $CFLAGS"
--fi
--
--
--dnl Find GMP and do some sanity checks
--dnl Tests concerning the include directories.
--if test -d "$with_gmp_include"; then
--  dnl AC_CHECK_HEADERS and AC_PREPROC_IFELSE uses CPPFLAGS but not CFLAGS
--  CPPFLAGS="-I$with_gmp_include $CPPFLAGS"
--else
--  with_gmp_include=
--fi
--AC_CHECK_HEADERS([gmp.h], [], AC_MSG_ERROR([required header file missing]))
--
--dnl This needs to find only the header file so we can do it here, before
--dnl we start looking for libgmp.a
--AC_MSG_CHECKING([for recent GMP])
--AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
--#include <gmp.h>
--#if (__GNU_MP_VERSION <= 4)
--#error
--#IRIXdoesnotexitaterrordirective
--#endif
--]])],
--  [AC_MSG_RESULT(yes)],
--  [AC_MSG_RESULT(no)
--   AC_MSG_ERROR([GMP 5.0.0 or newer is required])]
--)
--
--dnl Figure out if GMP is MPIR
--AC_MSG_CHECKING([if GMP is MPIR])
--AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
--#include <gmp.h>
--#ifndef __MPIR_VERSION
--#error
--#IRIXdoesnotexitaterrordirective
--#endif
--]])],
--  [AC_MSG_RESULT(yes)
--   AC_DEFINE([HAVE_MPIR],1,[Define to 1 if GMP is MPIR])],
--  [AC_MSG_RESULT(no)])
--
--dnl Now choose how to link the GMP library. If we can, we'd prefer to
--dnl link it statically since that makes for faster function calls. To
--dnl link it statically, we mustn't build a dynamic GMP-ECM library and
--dnl we need to find the libgmp.a file. At the moment, we only look for
--dnl it at the path specified by the user (i.e. --with-gmp) but make no
--dnl attempt to find it in the default system lib directories.
--
--dnl If GMP is linked statically, we pass its path/filename to the Makefile
--dnl via GMPLIB, otherwise -lgmp is passed via GMPLIB.
--dnl The search path to the dynamic GMP library is added to LDFLAGS, 
--dnl if GMP is not specified by full pathname.
--
--GMPLDFLAGS=""
--if test -d "$with_gmp_lib"; then
--  GMPLDFLAGS="-L$with_gmp_lib"
--fi
--GMPLIB="-lgmp"
--if test "x$enable_shared" != xyes; then
--  if test -r "$with_gmp_lib/libgmp.a"; then
--    GMPLIB="$with_gmp_lib/libgmp.a"
--    dnl Don't need -L flag since we give full path to libgmp.a
--    GMPLDFLAGS=""
--  fi
--fi
--AC_SUBST([GMPLIB])
--LDFLAGS="$LDFLAGS $GMPLDFLAGS"
--
--
--dnl Test linking against GMP. This tests, for example, that the compiler
--dnl and GMP agree on the ABI (32 or 64 bit). AC_CHECK_LIB() does not work,
--dnl as it requires linking the library with -lgmp, whereas we may want
--dnl to specify it by full pathname as we do in the Makefile
--
--AC_MSG_CHECKING([whether we can link against GMP])
--LIBS_BACKUP="$LIBS"
--LIBS="$LIBS $GMPLIB"
--AC_LINK_IFELSE([AC_LANG_PROGRAM([[
--#ifdef HAVE_GMP_H
--#include <gmp.h>
--#endif]],[[
--  mpz_t t;
--  mpz_init(t);
--  mpz_clear(t);
--  return 0;
--]])], [AC_MSG_RESULT(yes)],
--   [AC_MSG_RESULT(no)
--    AC_MSG_ERROR([Could not link against GMP library.])]
--)
--
--dnl Check for corresponding 'gmp.h' and libgmp.a
--dnl This requires running a program linked against GMP, 
--dnl so is done after the link-only test.
--AC_MSG_CHECKING([if gmp.h version and libgmp version are the same])
--AC_RUN_IFELSE([AC_LANG_PROGRAM([[
--#include <stdio.h>
--#include <string.h>
--#include <gmp.h>
--]],[[
--char buffer[100];
--if (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR <= 2 && 
--    __GNU_MP_VERSION_PATCHLEVEL == 0)
--  sprintf (buffer, "%d.%d", __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR);
--else
--  sprintf (buffer, "%d.%d.%d", __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR,
--   __GNU_MP_VERSION_PATCHLEVEL);
--printf ("(%s/%s) ", buffer, gmp_version);
--return strcmp (buffer, gmp_version);
--]])], [AC_MSG_RESULT([yes])],
--   [AC_MSG_RESULT([no])
--    AC_MSG_ERROR(['gmp.h' and 'libgmp' have different versions, you have to reinstall GMP properly.])],
--   [AC_MSG_RESULT([cross-compiling: cannot test])]
--)
--
--AC_CHECK_FUNCS([__gmpn_add_nc __gmpn_mod_34lsub1 __gmpn_redc_1 __gmpn_redc_2])
--AC_CHECK_FUNCS([__gmpn_mullo_n __gmpn_redc_n __gmpn_preinv_mod_1])
--
--LIBS="$LIBS_BACKUP"
--
--dnl Check if the compiler understands some __attribute__ directives
--AC_MSG_CHECKING([whether compiler knows __attribute__((hot))])
--dnl The AC_LANG_WERROR directive causes configure to consider a test 
--dnl compilation unsuccessful if it produced any output on stderr.
--dnl We use it since unknown __attribute__ only cause a warning, not an 
--dnl error. Unfortunately there seems to be no way to switch it off again, 
--dnl so this test is at the end of the configure script
--AC_LANG_WERROR
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([void foo() __attribute__ ((hot));
--void foo() {return;}], [foo()])],
--[AC_DEFINE([ATTRIBUTE_HOT],[__attribute__ ((hot))], [How to specify hot-spot attribute, if available])
-- AC_MSG_RESULT([yes])
--],
--[AC_DEFINE([ATTRIBUTE_HOT],[ ], [How to specify hot-spot attribute, if available])
-- AC_MSG_RESULT([no])
--])
--
--dnl Check for xsltproc
--AC_CHECK_PROG([XSLTPROC],[xsltproc],[xsltproc])
--if test "x$XSLTPROC" != x; then
--  AC_MSG_CHECKING([for docbook.xsl])
--  if test "x$XSLDIR" = x; then
--    if test -d "/usr/local/share/sgml/docbook/xsl-stylesheets"; then
--      XSLDIR="/usr/local/share/sgml/docbook/xsl-stylesheets"
--    elif test -d "/usr/share/sgml/docbook/xsl-stylesheets"; then
--      XSLDIR="/usr/share/sgml/docbook/xsl-stylesheets"
--    elif test -d "/usr/local/share/docbook/"; then
--      XSLDIR="/usr/local/share/docbook/"
--    elif test -d "/usr/share/docbook/"; then
--      XSLDIR="/usr/share/docbook/"
--    fi
--  fi
--  if test -r "$XSLDIR/manpages/docbook.xsl"; then
--    AC_MSG_RESULT([yes])
--    make_manpage="yes"
--  else
--    AC_MSG_RESULT([no])
--  fi
--fi  
--AM_CONDITIONAL([MAKE_MANPAGE], [test "x$make_manpage" = xyes])
--
--dnl Check for valgrind. GMP-ECM uses exit code 1 to signal error,
--dnl so we make valgrind use that code to signal error, too
--AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind -q --error-exitcode=1])
--
--case $host in
--  athlon*-*-*) config_arch="athlon" ;;
--  x86_64*-*-*) config_arch="athlon64" ;;
--  pentium3-*-*) config_arch="pentium3" ;;
--  pentium4-*-*) config_arch="pentium4" ;;
--  pentium-m-*-*) config_arch="pentium-m" ;;
--  alphaev6*-*-*) config_arch="alpha-ev6" ;;
--  alphaev56*-*-*) config_arch="alpha-ev56" ;;
--  alphaev5*-*-*) config_arch="alpha-ev5" ;;
--  powerpc7450-*-*) config_arch="powerpc7450" ;;
--  powerpc-apple-darwin* | powerpc64-*-*) config_arch="powerpc970" ;;
--  mips64el-*-*) config_arch="mips64el" ;;
--  armv5tel-*-*) config_arch="armv5tel" ;;
--  sparc64-*-*) config_arch="sparc64" ;;
--  ia64-*-*) config_arch="ia64" ;;
--  hppa2.0-*-*) config_arch="hppa2.0" ;;
--  *) config_arch="default" ;;
--esac
--
--# See if this is a Core 2, if we have /proc/cpuinfo 
--core2warn=no
--if test x"$config_arch" = xathlon64; then
--  if test -f /proc/cpuinfo; then
--    if $EGREP -q "Core\(TM\)2" /proc/cpuinfo; then
--      config_arch=core2
--    elif $EGREP -q "Core\(TM\) i5" /proc/cpuinfo; then
--      config_arch=corei5
--    fi;
--  else
--    # No /proc/cpuinfo, tell user about ecm-params.h.core2
--    core2warn=yes
--  fi;
--fi
--
--# See if this is a Pentium 4, if we have /proc/cpuinfo 
--pentium4warn=no
--if test x"$config_arch" = xdefault; then
--  if test -f /proc/cpuinfo; then
--    if $EGREP -q "Pentium\(R\) 4" /proc/cpuinfo; then
--      config_arch=pentium4
--    fi;
--  else
--    # No /proc/cpuinfo, tell user about ecm-params.h.pentium4
--    pentium4warn=yes
--  fi;
--fi
--
--LIBS="$LIBS $GWLIB"
--
--GMP_FINISH
--AC_CONFIG_FILES([Makefile athlon/Makefile pentium4/Makefile x86_64/Makefile powerpc64/Makefile build.vc10/Makefile build.vc10/assembler/Makefile build.vc10/ecm/Makefile build.vc10/libecm/Makefile build.vc10/tune/Makefile build.vc10/bench_mulredc/Makefile])
--AC_CONFIG_LINKS([ecm-params.h:ecm-params.h.$config_arch])
--MUL_FFT_PARAMS="mul_fft-params.h.$config_arch"
--if ! test -f "$MUL_FFT_PARAMS"
--then
--  MUL_FFT_PARAMS="mul_fft-params.h.default"
--fi
--AC_CONFIG_LINKS([mul_fft-params.h:"$MUL_FFT_PARAMS"])
--
--AC_SUBST([XSLDIR])
--AC_SUBST([ASMPATH])
--AC_SUBST([GSL_LD_FLAGS])
--
--AC_OUTPUT
--
--AC_MSG_NOTICE([Configuration:])
--AC_MSG_NOTICE([Build for host type $host])
--
--AC_MSG_NOTICE([CC=$CC, CFLAGS=$CFLAGS])
--AC_MSG_NOTICE([Linking GMP with $GMPLIB])
--
--if test "x$enable_asm_redc" = xyes; then
--  AC_MSG_NOTICE([Using asm redc code from directory $ASMPATH])
--else
--  AC_MSG_NOTICE([Not using asm redc code])
--fi
--
--if test "x$enable_sse2" = xyes; then
--  AC_MSG_NOTICE([Using SSE2 instructions in NTT code])
--else
--  AC_MSG_NOTICE([Not using SSE2 instructions in NTT code])
--fi
--
--if test "x$with_gwnum" != "x"; then
--  AC_MSG_NOTICE([Linking with George Woltman's GWNUM])
--fi
--
--if test "x$enable_assert" = xyes; then
--  AC_MSG_NOTICE([Assertions enabled])
--else
--  AC_MSG_NOTICE([Assertions disabled])
--fi
--
--if test "x$enable_shellcmd" = xyes; then
--  AC_MSG_NOTICE([Shell command execution enabled])
--else
--  AC_MSG_NOTICE([Shell command execution disabled])
--fi
--
--if test "x$enable_openmp" = xyes; then
--  AC_MSG_NOTICE([OpenMP enabled])
--else
--  AC_MSG_NOTICE([OpenMP disabled])
--fi
--
--if test "x$enable_memory_debug" = xyes; then
--  AC_MSG_NOTICE([Memory debugging enabled])
--else
--  AC_MSG_NOTICE([Memory debugging disabled])
--fi
--
--if test x"$core2warn" = xyes; then
--  AC_MSG_NOTICE([Your cpu was detected as x86_64; if it is a Core 2, please either use the ecm-params.h.core2 file by executing the commands:])
--  AC_MSG_NOTICE([rm ecm-params.h])
--  AC_MSG_NOTICE([ln -s ecm-params.h.core2 ecm-params.h])
--  AC_MSG_NOTICE([or generate a custom ecm-params.h file for your system as described in INSTALL.])
--fi
--
--if test x"$pentium4warn" = xyes; then
--  AC_MSG_NOTICE([Your cpu was detected as default; if it is a Pentium 4, please either use the ecm-params.h.pentium4 file by executing the commands:])
--  AC_MSG_NOTICE([rm ecm-params.h])
--  AC_MSG_NOTICE([ln -s ecm-params.h.pentium4 ecm-params.h])
--  AC_MSG_NOTICE([or generate a custom ecm-params.h file for your system as described in INSTALL.])
--fi
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -39,8 +39,8 @@
- # Link the asm redc code (if we use it) into libecm.la
- libecm_la_CPPFLAGS = $(MULREDCINCPATH)
- libecm_la_CFLAGS = $(OPENMP_CFLAGS)
--libecm_la_LDFLAGS = '-version-info 0:0:0'
--libecm_la_LIBADD = $(MULREDCLIBRARY)
-+libecm_la_LDFLAGS = -version-info 0:0:0
-+libecm_la_LIBADD = $(MULREDCLIBRARY) $(GMPLIB)
- 
- bin_PROGRAMS = ecm
- noinst_PROGRAMS = tune ecmfactor bench_mulredc
diff --git a/debian/patches/upstream-bug-793012-mips_longlong_sp.patch b/debian/patches/upstream-bug-793012-mips_longlong_sp.patch
deleted file mode 100644
index 3b85d1c..0000000
--- a/debian/patches/upstream-bug-793012-mips_longlong_sp.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Description: upstream -- RC bug fix 793012 -- faulty assembly on mips[el] arch
- Patch provided by Jurica Stanojkovic <Jurica.Stanojkovic at imgtec.com> :
- the first part of patch is taken from upstream (file longlong.h); [...]
- a second part (file sp.h) [had to be added] in order to build package
- successfully. (The patch tested with 'gcc (Debian 5.2.1-22) 5.2.1 20151010' on
- both mips and mipsel Debain porterboxes (and commented) on behalf of the
- Debian Science Team by Jerome Benoit <calculus at rezozer.net>).
-Origin: debian
-Author: Jurica Stanojkovic <Jurica.Stanojkovic at imgtec.com>
-Last-Update: 2015-10-20
-
---- gmp-ecm-6.4.4+ds.orig/longlong.h
-+++ gmp-ecm-6.4.4+ds/longlong.h
-@@ -931,10 +931,19 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
- #endif /* __m88000__ */
- 
- #if defined (__mips) && W_TYPE_SIZE == 32
--#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
-+#if __GMP_GNUC_PREREQ (4,4)
-+ #define umul_ppmm(w1, w0, u, v) \
-+   do {                                                                  \
-+     UDItype __ll = (UDItype)(u) * (v);                                  \
-+     w1 = __ll >> 32;                                                    \
-+     w0 = __ll;                                                          \
-+   } while (0)
-+#endif
-+#if !defined (umul_ppmm) && __GMP_GNUC_PREREQ (2,7)
- #define umul_ppmm(w1, w0, u, v) \
-   __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
--#else
-+#endif
-+#if !defined (umul_ppmm)
- #define umul_ppmm(w1, w0, u, v) \
-   __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1"				\
- 	   : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
---- gmp-ecm-6.4.4+ds.orig/sp.h
-+++ gmp-ecm-6.4.4+ds/sp.h
-@@ -69,7 +69,7 @@ extern size_t MPZSPV_NORMALISE_STRIDE;
-  * note that a small prime must be the size of a GMP limb */
- typedef mp_limb_t UWtype;
- typedef unsigned int UHWtype;
--#if (defined(_PA_RISC1_1) && defined(__GNUC__))
-+#if ((defined(_PA_RISC1_1) || defined(__mips)) && defined(__GNUC__))
- /* this seems to be needed, otherwise umul_ppmm() does not work properly */
- typedef mp_limb_t USItype __attribute__ ((mode (SI)));
- typedef mp_limb_t UDItype __attribute__ ((mode (DI)));
diff --git a/debian/patches/upstream-lintian-spelling-error-silence.patch b/debian/patches/upstream-lintian-spelling-error-silence.patch
new file mode 100644
index 0000000..c28d948
--- /dev/null
+++ b/debian/patches/upstream-lintian-spelling-error-silence.patch
@@ -0,0 +1,20 @@
+Description: source typo
+ Correct spelling error as reported by lintian in some material;
+ meant to silence lintian and eventually to be submitted to the
+ upstream maintainer.
+Origin: debian
+Comment: spelling-error-in-binary
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2016-03-19
+
+--- a/ecm.1
++++ b/ecm.1
+@@ -429,7 +429,7 @@
+ .PP
+ Bit 0
+ .RS 4
+-0 if normal program termination, 1 if error occured
++0 if normal program termination, 1 if error occurred
+ .RE
+ .PP
+ Bit 1
diff --git a/debian/patches/upstream-longcheck-neutralize-forgotten-code.patch b/debian/patches/upstream-longcheck-neutralize-forgotten-code.patch
new file mode 100644
index 0000000..4dc393d
--- /dev/null
+++ b/debian/patches/upstream-longcheck-neutralize-forgotten-code.patch
@@ -0,0 +1,23 @@
+Description: longcheck: neutralize forgotten code
+ Mainly neutralize forgotten code in longcheck scripts
+ to render them runnable; meant to be submitted to the
+ upstream maintainer.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2016-03-20
+
+--- a/testlong.ecm
++++ b/testlong.ecm
+@@ -86,9 +86,9 @@
+ $ECM -resume test_M877.save 0 819632383
+ checkcode $? 6
+ 
+-# exercise estimated memory usage in Gb
+-$ECM -v -k 1 1 8e11 < c155
++## # exercise estimated memory usage in Gb
++## $ECM -v -k 1 1 8e11 < c155
+ 
+-rm test_M877.save
++rm test_M877.save M997.save
+ 
+ echo "All ECM tests are ok."
diff --git a/debian/rules b/debian/rules
index 1f9e018..60ace5c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
 default:
 	@uscan --no-conf --dehs --report || true
 
@@ -19,15 +21,11 @@ override_dh_auto_install-indep:
 	$(MAKE) -C _build install-data-am DESTDIR=$(CURDIR)/debian/tmp
 
 override_dh_installdocs:
-	dh_installdocs -plibecm0-dbg --link-doc=libecm0
-	dh_installdocs -plibecm0-dev --link-doc=libecm0-dev-common
+	dh_installdocs -plibecm1-dev --link-doc=libecm1-dev-common
 	dh_installdocs --remaining-packages
 
 override_dh_compress-indep:
 	dh_compress -Xexamples
 
-override_dh_strip:
-	dh_strip --dbg-package=libecm0-dbg
-
 get-orig-source:
 	uscan --no-conf --download-current-version --compression xz --verbose
diff --git a/debian/tests/build-examples b/debian/tests/build-examples
index c441629..ee14080 100755
--- a/debian/tests/build-examples
+++ b/debian/tests/build-examples
@@ -3,7 +3,7 @@
 set -ue
 cd $ADTTMP
 
-cp -prd /usr/share/doc/libecm0-dev/examples .
+cp -prd /usr/share/doc/libecm1-dev/examples .
 cd examples
 
 make
diff --git a/debian/tests/control b/debian/tests/control
index f90aa8d..70947aa 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,5 +1,6 @@
 Tests: build-examples
-Depends: libecm0-dev, build-essential
+Depends: libecm1-dev, build-essential
 
 Tests: make-longcheck
-Depends: gmp-ecm, make, valgrind
+Depends: gmp-ecm, make
+Restrictions: allow-stderr
diff --git a/debian/tests/make-longcheck b/debian/tests/make-longcheck
index 6bf331a..9e4e151 100755
--- a/debian/tests/make-longcheck
+++ b/debian/tests/make-longcheck
@@ -1,7 +1,7 @@
 #!/bin/sh
 # autopkgtest check based on upstream longcheck check ($ make longcheck)
 # written for Debian by Jerome Benoit <calculus at rezozer.net> on behalf of the Debian Science Team
-# copyright: 2015 Jerome Benoit <calculus at rezozer.net>
+# copyright: 2015-2016 Jerome Benoit <calculus at rezozer.net>
 # distributed under the terms and conditions of GPL version 3 or later
 
 # comments:
@@ -17,7 +17,6 @@ cat << EOF > $ADTTMP/Makefile
 abs_top_pkgdir = $PWD
 
 GMPECM = /usr/bin/ecm
-##VALGRIND = /usr/bin/valgrind --quiet --error-exitcode=1
 
 
 LISTOFMETHODS = pp1 pm1 ecm
@@ -26,11 +25,20 @@ LISTOFVARIANTS = + -no-ntt -modmuln -redc -mpzmod
 
 default:
 
-longcheck: \$(foreach _m,\$(LISTOFMETHODS),\$(foreach _v,\$(LISTOFVARIANTS),longcheck+\$(_m)+\$(_v)))
+longcheck: \$(foreach _m,\$(LISTOFMETHODS),\$(foreach _v,\$(LISTOFVARIANTS),longcheck+test+\$(_m)+\$(_v))) \$(foreach _m,\$(LISTOFMETHODS),longcheck+testlong+\$(_m)) longcheck+testtree+ecm
 	@
 
-longcheck+%:
-	\$(abs_top_pkgdir)/test.\$(word 2,\$(subst +, ,\$@)) "\$(VALGRIND) \$(GMPECM) \$(word 3,\$(subst +, ,\$@))"
+longcheck+test+%:
+	@mkdir \$@
+	( cd \$@ ; \$(abs_top_pkgdir)/test.\$(word 3,\$(subst +, ,\$@)) "\$(GMPECM) \$(word 4,\$(subst +, ,\$@))" ;)
+
+longcheck+testlong+%:
+	@mkdir \$@
+	( cd \$@ ; \$(abs_top_pkgdir)/testlong.\$(word 3,\$(subst +, ,\$@)) "\$(GMPECM)" ;)
+
+longcheck+testtree+ecm:
+	@mkdir \$@
+	( cd \$@ ; \$(abs_top_pkgdir)/test.\$(word 3,\$(subst +, ,\$@)) "\$(GMPECM) -treefile tree" ;)
 
 EOF
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gmp-ecm.git



More information about the debian-science-commits mailing list