diff --git a/develop/ppl/ppl-0.11.2-update-ac_check_gmp.m4.patch b/develop/ppl/ppl-0.11.2-update-ac_check_gmp.m4.patch new file mode 100644 index 000000000..80d372255 --- /dev/null +++ b/develop/ppl/ppl-0.11.2-update-ac_check_gmp.m4.patch @@ -0,0 +1,190 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../ppl/ppl-0.11.2-update-ac_check_gmp.m4.patch +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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. +# --- SDE-COPYRIGHT-NOTE-END --- + +get a more decent way to specify gmp libdir and includedir + +--- ppl-0.11.2/m4/ac_check_gmp.m4 2011-02-27 10:07:47.000000000 +0100 ++++ ppl-1.0/m4/ac_check_gmp.m4 2012-06-28 12:50:33.000000000 +0200 +@@ -1,6 +1,6 @@ + dnl A function to check for the existence and usability of GMP. + dnl Copyright (C) 2001-2010 Roberto Bagnara +-dnl Copyright (C) 2010-2011 BUGSENG srl (http://bugseng.com) ++dnl Copyright (C) 2010-2012 BUGSENG srl (http://bugseng.com) + dnl + dnl This file is part of the Parma Polyhedra Library (PPL). + dnl +@@ -19,45 +19,72 @@ + dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. + dnl + dnl For the most up-to-date information see the Parma Polyhedra Library +-dnl site: http://www.cs.unipr.it/ppl/ . ++dnl site: http://bugseng.com/products/ppl/ . + + AC_DEFUN([AC_CHECK_GMP], + [ +-dnl Since libgmp and libgmpxx are usually installed in the same location, +-dnl let the prefixes default from each other. +-if test -n "$with_libgmpxx_prefix" && test -z "$with_libgmp_prefix"; then +- with_libgmp_prefix="$with_libgmpxx_prefix" +-else +- if test -n "$with_libgmp_prefix" && test -z "$with_libgmpxx_prefix"; then +- with_libgmpxx_prefix="$with_libgmp_prefix" +- fi ++AC_ARG_WITH(gmp, ++ AS_HELP_STRING([--with-gmp=DIR], ++ [search for libgmp/libgmpxx in DIR/include and DIR/lib])) ++ ++AC_ARG_WITH(gmp-include, ++ AS_HELP_STRING([--with-gmp-include=DIR], ++ [search for libgmp/libgmpxx headers in DIR])) ++ ++AC_ARG_WITH(gmp-lib, ++ AS_HELP_STRING([--with-gmp-lib=DIR], ++ [search for libgmp/libgmpxx library objects in DIR])) ++ ++if test -n "$with_gmp" ++then ++ gmp_include_options="-I$with_gmp/include" ++ gmp_library_paths="$with_gmp/lib" ++ gmp_library_options="-L$gmp_library_paths" ++fi ++ ++if test -n "$with_gmp_include" ++then ++ gmp_include_options="-I$with_gmp_include" ++fi ++ ++if test -n "$with_gmp_lib" ++then ++ gmp_library_paths="$with_gmp_lib" ++ gmp_library_options="-L$gmp_library_paths" + fi + ++gmp_libs="-lgmpxx -lgmp" ++ + 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" ++ if test -n "$with_gmp" \ ++ || test -n "$with_gmp_include" || test -n "$with_gmp_lib" + 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" ++ AC_MSG_ERROR([cannot use --with-gmp-build and other --with-gmp* options together]) + else +- AC_MSG_ERROR([cannot use --with-gmp-build and --with-gmp-prefix together]) ++ gmp_srcdir=`echo @abs_srcdir@ | $gmp_build_dir/config.status --file=-` ++ gmp_include_options="-I$gmp_build_dir -I$gmp_build_dir/tune -I$gmp_srcdir" ++ gmp_libs="$gmp_build_dir/libgmp.la $gmp_build_dir/libgmpxx.la" + fi) + +-dnl Both libgmp and libbmpxx come from the gmp package. +-AC_LIB_FROMPACKAGE([gmp], [gmp]) +-AC_LIB_FROMPACKAGE([gmpxx], [gmp]) ++gmp_library_options="$gmp_library_options $gmp_libs" + +-dnl Check how to link with libgmp. +-AC_LIB_LINKFLAGS([gmp]) +- +-dnl Check how to link with libgmpxx. +-AC_LIB_LINKFLAGS([gmpxx], [gmp]) ++if test -n "$with_gmp_build" ++then ++ ac_save_CXX="$CXX" ++ CXX="libtool --mode=link --tag=CXX $CXX" ++fi + ++ac_save_CPPFLAGS="$CPPFLAGS" ++CPPFLAGS="$CPPFLAGS $gmp_include_options" + ac_save_LIBS="$LIBS" +-LIBS="$LIBS $LIBGMPXX" ++LIBS="$LIBS $gmp_library_options" ++eval ac_save_shared_library_path="\$$shared_library_path_env_var" ++eval $shared_library_path_env_var=\"$gmp_library_paths:$ac_save_shared_library_path\" ++export $shared_library_path_env_var ++ + AC_LANG_PUSH(C++) + + AC_MSG_CHECKING([for the GMP library version 4.1.3 or above]) +@@ -96,7 +123,7 @@ + + if (header_version != library_version) { + std::cerr +- << "GMP header (gmp.h) and library (ligmp.*) version mismatch:\n" ++ << "GMP header (gmpxx.h) and library (ligmpxx.*) version mismatch:\n" + << "header gives " << header_version << ";\n" + << "library gives " << library_version << "." << std::endl; + return 1; +@@ -105,7 +132,7 @@ + if (sizeof(mp_limb_t)*CHAR_BIT != BITS_PER_MP_LIMB + || BITS_PER_MP_LIMB != mp_bits_per_limb) { + std::cerr +- << "GMP header (gmp.h) and library (ligmp.*) bits-per-limb mismatch:\n" ++ << "GMP header (gmpxx.h) and library (ligmpxx.*) bits-per-limb mismatch:\n" + << "header gives " << BITS_PER_MP_LIMB << ";\n" + << "library gives " << mp_bits_per_limb << ".\n" + << "This probably means you are on a bi-arch system and\n" +@@ -197,8 +224,12 @@ + fi + + AC_LANG_POP(C++) ++eval $shared_library_path_env_var=\"$ac_save_shared_library_path\" + LIBS="$ac_save_LIBS" ++CPPFLAGS="$ac_save_CPPFLAGS" + +-dnl We use libtool, therefore we take $LTLIBGMPXX, not $LIBGMPXX. +-gmp_library_option="$LTLIBGMPXX" ++if test -n "$with_gmp_build" ++then ++ CXX="$ac_save_CXX" ++fi + ]) +--- ppl-0.11.2/m4/lib-prefix.m4.orig 2012-08-07 16:08:22.686543774 +0200 ++++ ppl-0.11.2/m4/lib-prefix.m4 2012-08-07 16:09:39.651742841 +0200 +@@ -199,7 +199,7 @@ + fi + ;; + *) +- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` ++ # searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do +--- ppl-0.11.2/configure.ac.orig 2012-08-07 14:44:02.350070691 +0200 ++++ ppl-0.11.2/configure.ac 2012-08-07 14:45:50.050986072 +0200 +@@ -777,8 +777,8 @@ + *** Please report this to ppl-devel@cs.unipr.it.]) + fi + +-extra_includes="${extra_includes}${extra_includes:+ }${gmp_includes_option}" +-extra_libraries="${extra_libraries}${extra_libraries:+ }${gmp_library_option}" ++extra_includes="${extra_includes}${extra_includes:+ }${gmp_includes_options}" ++extra_libraries="${extra_libraries}${extra_libraries:+ }${gmp_library_options}" + + enableval=yes + AC_MSG_CHECKING([whether to build the Parma Watchdog Library]) +@@ -1291,7 +1291,7 @@ + required_instantiations=`echo "${enableval}" | sed -e 's/[[ ]][[ ]]*/ /g' -e 's/[[ ]]*\([[@<>,]]\)/\1/g' -e 's/\([[@<>,]]\)[[ ]]*/\1/g' -e 's/>>/> >/g' -e 's/^[[ ]]//g' -e 's/[[ ]]$//g'` + # Check the specified instantiations for validity. + ac_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$CPPFLAGS -I${srcdir}" ++ CPPFLAGS="$CPPFLAGS -I${srcdir} ${gmp_include_options}" + old_IFS="${IFS}" + IFS=@ + set -- ${required_instantiations} diff --git a/develop/ppl/ppl.conf b/develop/ppl/ppl.conf index caa060569..8e247e8b0 100644 --- a/develop/ppl/ppl.conf +++ b/develop/ppl/ppl.conf @@ -12,11 +12,15 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- +# we patch configure.ac and m4 files for getting a more decent way to specify +# gmp libdir and includedir +hook_add preconf 9 'autoreconf -vfis' + # use the host g++ and the native libs and headers we have in tools.cross if atstage toolchain; then export CXX=g++ export LDFLAGS="-Wl,-rpath,${root}${libdir}" var_append SYSGCC_WRAPPER_INSERT " " "-I${root}${includedir}" - var_append extraconfopt ' ' "--with-libgmp-prefix=$( pkgprefix -r gmp )" - var_append extraconfopt ' ' "--with-libgmpxx-prefix=$( pkgprefix -r gmp )" + var_append extraconfopt ' ' "--with-gmp-lib=$( pkgprefix -r libdir gmp )" + var_append extraconfopt ' ' "--with-gmp-include=$( pkgprefix -r includedir gmp )" fi