add packaging
[platform/upstream/isl.git] / configure.ac
index bb19dde..e49d712 100644 (file)
@@ -1,10 +1,10 @@
-AC_INIT([isl], [0.11.2], [isl-development@googlegroups.com])
+AC_INIT([isl], [0.12], [isl-development@googlegroups.com])
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([foreign])
 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 AC_SUBST(versioninfo)
-versioninfo=11:2:1
+versioninfo=12:0:2
 
 if test "x$prefix" != "xNONE"; then
        prefix_wd=`cd $prefix && pwd`
@@ -71,13 +71,39 @@ build)
        ;;
 esac
 SAVE_CPPFLAGS="$CPPFLAGS"
+SAVE_LDFLAGS="$LDFLAGS"
+SAVE_LIBS="$LIBS"
 CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS"
+LDFLAGS="$GMP_LDFLAGS $LDFLAGS"
+LIBS="$GMP_LIBS $LIBS"
 need_get_memory_functions=false
 AC_CHECK_DECLS(mp_get_memory_functions,[],[
        need_get_memory_functions=true
 ],[#include <gmp.h>])
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <gmp.h>]], [[
+       mpz_t x,y,g,a,b;
+       mpz_init(x);
+       mpz_init(y);
+       mpz_init(g);
+       mpz_init(a);
+       mpz_init(b);
+       mpz_set_si(x, -1);
+       mpz_set_si(y, 9);
+       mpz_gcdext(g, a, b, x, y);
+       if (mpz_get_si(a) == -1 && mpz_get_si(b) == 0)
+               return 0;
+       else
+               return 1;
+]])], [need_normalized_gcdext=false], [need_normalized_gcdext=true],
+[need_normalized_gcdext=true])
 CPPFLAGS="$SAVE_CPPFLAGS"
+LDFLAGS="$SAVE_LDFLAGS"
+LIBS="$SAVE_LIBS"
 AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, test x$need_get_memory_functions = xtrue)
+if test $need_normalized_gcdext = true; then
+AC_DEFINE([GMP_NORMALIZE_GCDEXT], [],
+       [result of mpz_gcdext needs to be normalized])
+fi
 
 AX_SUBMODULE(piplib,no|system|build,no)