summaryrefslogtreecommitdiff
path: root/cloog-0.16.3/isl
diff options
context:
space:
mode:
Diffstat (limited to 'cloog-0.16.3/isl')
-rwxr-xr-xcloog-0.16.3/isl/configure23
-rw-r--r--cloog-0.16.3/isl/configure.ac2
-rw-r--r--cloog-0.16.3/isl/isl_config.h.in7
-rw-r--r--cloog-0.16.3/isl/isl_config_post.h4
-rw-r--r--cloog-0.16.3/isl/isl_hash.c1
5 files changed, 37 insertions, 0 deletions
diff --git a/cloog-0.16.3/isl/configure b/cloog-0.16.3/isl/configure
index a35e911..4b7f26e 100755
--- a/cloog-0.16.3/isl/configure
+++ b/cloog-0.16.3/isl/configure
@@ -12476,6 +12476,29 @@ else
NEED_GET_MEMORY_FUNCTIONS_FALSE=
fi
+ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "#include <strings.h>
+"
+if test "x$ac_cv_have_decl_ffs" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFS $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "__builtin_ffs" "ac_cv_have_decl___builtin_ffs" "$ac_includes_default"
+if test "x$ac_cv_have_decl___builtin_ffs" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___BUILTIN_FFS $ac_have_decl
+_ACEOF
+
diff --git a/cloog-0.16.3/isl/configure.ac b/cloog-0.16.3/isl/configure.ac
index 6b59807..8df2cbe 100644
--- a/cloog-0.16.3/isl/configure.ac
+++ b/cloog-0.16.3/isl/configure.ac
@@ -39,6 +39,8 @@ AC_CHECK_DECLS(mp_get_memory_functions,[],[
],[#include <gmp.h>])
CPPFLAGS="$SAVE_CPPFLAGS"
AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS, test x$need_get_memory_functions = xtrue)
+AC_CHECK_DECLS(ffs,[],[],[#include <strings.h>])
+AC_CHECK_DECLS(__builtin_ffs,[],[],[])
AX_SUBMODULE(piplib,no|system|build,no)
diff --git a/cloog-0.16.3/isl/isl_config.h.in b/cloog-0.16.3/isl/isl_config.h.in
index 2c1c0c9..b63f626 100644
--- a/cloog-0.16.3/isl/isl_config.h.in
+++ b/cloog-0.16.3/isl/isl_config.h.in
@@ -4,10 +4,17 @@
*/
#undef GCC_WARN_UNUSED_RESULT
+/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
+#undef HAVE_DECL_FFS
+
/* Define to 1 if you have the declaration of `mp_get_memory_functions', and
to 0 if you don't. */
#undef HAVE_DECL_MP_GET_MEMORY_FUNCTIONS
+/* Define to 1 if you have the declaration of `__builtin_ffs', and to 0 if you
+ don't. */
+#undef HAVE_DECL___BUILTIN_FFS
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
diff --git a/cloog-0.16.3/isl/isl_config_post.h b/cloog-0.16.3/isl/isl_config_post.h
index 86a094d..a9c23f4 100644
--- a/cloog-0.16.3/isl/isl_config_post.h
+++ b/cloog-0.16.3/isl/isl_config_post.h
@@ -1,3 +1,7 @@
#ifndef HAVE___ATTRIBUTE__
#define __attribute__(x)
#endif
+
+#if (HAVE_DECL_FFS==0) && (HAVE_DECL___BUILTIN_FFS==1)
+# define ffs __builtin_ffs
+#endif
diff --git a/cloog-0.16.3/isl/isl_hash.c b/cloog-0.16.3/isl/isl_hash.c
index c997402..52e3135 100644
--- a/cloog-0.16.3/isl/isl_hash.c
+++ b/cloog-0.16.3/isl/isl_hash.c
@@ -11,6 +11,7 @@
#include <strings.h>
#include <isl/hash.h>
#include <isl/ctx.h>
+#include "isl_config.h"
uint32_t isl_hash_string(uint32_t hash, const char *s)
{