[PPL-devel] [GIT] ppl/ppl(master): Make sure the run-time tests for GMP can find GMP' s shared libraries.
Roberto Bagnara
bagnara at cs.unipr.it
Sun Jul 24 17:13:24 CEST 2011
Module: ppl/ppl
Branch: master
Commit: 5436da20afde0109292c5cfda908b9c96622fe97
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5436da20afde0109292c5cfda908b9c96622fe97
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Sun Jul 24 17:12:53 2011 +0200
Make sure the run-time tests for GMP can find GMP's shared libraries.
---
configure.ac | 10 ++++++++++
m4/ac_check_gmp.m4 | 11 +++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 25951a9..8a675d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -501,23 +501,33 @@ case "${host_os}" in
cygwin*)
cygwin=yes
no_undefined=yes
+ shared_library_path_env_var=PATH
;;
darwin*)
darwin=yes
+ shared_library_path_env_var=DYLD_LIBRARY_PATH
+ ;;
+hpux*)
+ hpux=yes
+ shared_library_path_env_var=SHLIB_PATH
;;
mingw*)
mingw=yes
no_undefined=yes
+ shared_library_path_env_var=PATH
;;
solaris*)
solaris=yes
+ shared_library_path_env_var=LD_LIBRARY_PATH
;;
*)
+ shared_library_path_env_var=LD_LIBRARY_PATH
;;
esac
AM_CONDITIONAL(HOST_OS_CYGWIN, test x$cygwin = xyes)
AM_CONDITIONAL(HOST_OS_DARWIN, test x$darwin = xyes)
+AM_CONDITIONAL(HOST_OS_HPUX, test x$hpux = xyes)
AM_CONDITIONAL(HOST_OS_MINGW, test x$mingw = xyes)
AM_CONDITIONAL(HOST_OS_SOLARIS, test x$solaris = xyes)
diff --git a/m4/ac_check_gmp.m4 b/m4/ac_check_gmp.m4
index f00cb6d..03a37fb 100644
--- a/m4/ac_check_gmp.m4
+++ b/m4/ac_check_gmp.m4
@@ -38,7 +38,8 @@ AC_ARG_WITH(gmp-lib,
if test -n "$with_gmp"
then
gmp_include_options="-I$with_gmp/include"
- gmp_library_options="-L$with_gmp/lib"
+ gmp_library_paths="$with_gmp/lib"
+ gmp_library_options="-L$gmp_library_paths"
fi
if test -n "$with_gmp_include"
@@ -48,7 +49,8 @@ fi
if test -n "$with_gmp_lib"
then
- gmp_library_options="-L$with_gmp_lib"
+ gmp_library_paths="$with_gmp_lib/lib"
+ gmp_library_options="-L$gmp_library_paths"
fi
AC_ARG_WITH(gmp-build,
@@ -59,6 +61,7 @@ AC_ARG_WITH(gmp-build,
|| test -n "$with_gmp_include" || test -n "$with_gmp_lib"
then
gmp_include_options="-I$gmp_build_dir -I$gmp_build_dir/tune"
+ gmp_library_paths="$gmp_build_dir:$gmp_build_dir/.libs:$gmp_build_dir/tune"
gmp_library_options="-L$gmp_build_dir -L$gmp_build_dir/.libs"
gmp_library_options="$gmp_library_options -L$gmp_build_dir/tune"
else
@@ -71,6 +74,9 @@ ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $gmp_include_options"
ac_save_LIBS="$LIBS"
LIBS="$LIBS $gmp_library_options"
+eval ac_save_shared_library_path_env_var="\$$shared_library_path_env_var"
+eval $shared_library_path_env_var=$gmp_library_paths
+
AC_LANG_PUSH(C++)
AC_MSG_CHECKING([for the GMP library version 4.1.3 or above])
@@ -210,6 +216,7 @@ AC_DEFINE_UNQUOTED(PPL_GMP_SUPPORTS_EXCEPTIONS, $value,
fi
AC_LANG_POP(C++)
+eval $shared_library_path_env_var=$ac_save_shared_library_path_env_var
LIBS="$ac_save_LIBS"
CPPFLAGS="$ac_save_CPPFLAGS"
])
More information about the PPL-devel
mailing list