[PPL-devel] [GIT] ppl/ppl(master): New configuration option `--with-gmp-build=DIR'.

Roberto Bagnara bagnara at cs.unipr.it
Tue May 12 21:51:19 CEST 2009


Module: ppl/ppl
Branch: master
Commit: 1c8a74aea14bce95dc1916df66995dd5a163eb2b
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=1c8a74aea14bce95dc1916df66995dd5a163eb2b

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Tue May 12 21:50:25 2009 +0200

New configuration option `--with-gmp-build=DIR'.
This allows to use a non-installed build of GMP in DIR.

---

 NEWS               |    3 +++
 README.configure   |    5 +++++
 m4/ac_check_gmp.m4 |   14 ++++++++++++++
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index 94c8f0e..15fd2ae 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,9 @@ o  The Java interface has to be explicitly initialized before use by
 
 o  The C and Java interfaces now support timeout computation facilities.
 
+o  New configuration option `--with-gmp-build=DIR' allows to use a
+   non-installed build of GMP in DIR.
+
 
 Deprecated and removed methods
 ------------------------------
diff --git a/README.configure b/README.configure
index 9b97730..0db173a 100644
--- a/README.configure
+++ b/README.configure
@@ -109,6 +109,11 @@ how to make sure that GMP's shared library will be found at run-time
 "<GMP prefix>/lib64:$LD_LIBRARY_PATH" is the most commonly used
 solution).
 
+It is also possible to use a non-installed build of GMP.  In order to
+do that you should configure the PPL with, among others, the option
+
+  --with-gmp-build=<GMP build directory>
+
 
 3. Using the Right C and C++ Compilers
 --------------------------------------
diff --git a/m4/ac_check_gmp.m4 b/m4/ac_check_gmp.m4
index 4dc3bc8..62bb1a9 100644
--- a/m4/ac_check_gmp.m4
+++ b/m4/ac_check_gmp.m4
@@ -32,6 +32,20 @@ else
   fi
 fi
 
+AC_ARG_WITH(gmp-build,
+  AS_HELP_STRING([--with-gmp-build=DIR],
+                 [use a non-installed build of GMP in DIR]),
+  gmp_build_dir=$with_gmp_build)
+
+if test -z "$with_libgmp_prefix"
+then
+  CPPFLAGS="$CPPFLAGS -I$gmp_build_dir -I$gmp_build_dir/tune"
+  LDFLAGS="$LDFLAGS -L$gmp_build_dir -L$gmp_build_dir/.libs"
+  LDFLAGS="$LDFLAGS -L$gmp_build_dir/tune"
+else
+  AC_MSG_ERROR([cannot use --with-gmp-build and --with-libgmp* together])
+fi
+
 dnl Check how to link with libgmp.
 AC_LIB_LINKFLAGS([gmp])
 




More information about the PPL-devel mailing list