isl_map.c: div_involves_vars: use isl_basic_map_var_offset
[isl.git] / configure.ac
blob117d5f6cf959733a213cc05e1ecf9f912f94b677
1 AC_INIT([isl], [0.26], [isl-development@googlegroups.com])
2 AC_CONFIG_AUX_DIR([.])
3 AC_CONFIG_MACRO_DIR([m4])
4 AM_INIT_AUTOMAKE([foreign])
5 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
6 AC_SUBST(versioninfo)
7 versioninfo=26:0:3
9 if test "x$prefix" != "xNONE"; then
10         prefix_wd=`cd $prefix && pwd`
11         srcdir_wd=`cd $srcdir && pwd`
12         wd=`pwd`
13         if test "x$prefix_wd" = "x$srcdir_wd"; then
14                 AC_MSG_ERROR(Installation in source directory not supported)
15         fi
16         if test "x$prefix_wd" = "x$wd"; then
17                 AC_MSG_ERROR(Installation in build directory not supported)
18         fi
21 AC_PROG_CC
22 AC_PROG_CXX
23 AX_PROG_CC_FOR_BUILD
25 AX_CC_MAXOPT
26 AX_GCC_WARN_UNUSED_RESULT
27 AX_C___ATTRIBUTE__
29 AX_CXX_COMPILE_STDCXX_11_NO_OVERRIDE
30 AX_CXX_COMPILE_STDCXX_17([], [optional])
32 AC_PROG_GREP
33 LT_INIT
34 AC_PROG_SED
35 AM_PATH_PYTHON([3.6], [], [:])
36 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
38 AC_CHECK_PROG(CYGPATH, cygpath, cygpath, [])
39 AC_CHECK_PROG(PERL, perl, perl, [])
40 AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, [])
41 AC_CHECK_PROG(POD2HTML, pod2html, pod2html, [])
43 AC_SUBST(OS_SRCDIR)
44 if test "$host_os" = "mingw32" -a -n "$CYGPATH"; then
45         OS_SRCDIR=`$CYGPATH -m "$srcdir"`
46 else
47         OS_SRCDIR="$srcdir"
50 AM_CONDITIONAL(GENERATE_DOC, test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML")
52 AX_CREATE_STDINT_H(include/isl/stdint.h)
54 AC_ARG_WITH([int],
55             [AS_HELP_STRING([--with-int=gmp|imath|imath-32],
56                             [Which package to use to represent
57                                 multi-precision integers [default=gmp]])],
58             [], [with_int=gmp])
59 case "$with_int" in
60 gmp|imath|imath-32)
61         ;;
63         AC_MSG_ERROR(
64             [bad value ${withval} for --with-int (use gmp, imath or imath-32)])
65 esac
67 AC_SUBST(MP_CPPFLAGS)
68 AC_SUBST(MP_CFLAGS)
69 AC_SUBST(MP_LDFLAGS)
70 AC_SUBST(MP_LIBS)
71 case "$with_int" in
72 gmp)
73         AX_DETECT_GMP
74         ;;
75 imath|imath-32)
76         AX_DETECT_IMATH
77         ;;
78 esac
79 if test "x$with_int" = "ximath-32" -a "x$GCC" = "xyes"; then
80         MP_CFLAGS="-std=gnu99 $MP_CFLAGS"
83 AM_CONDITIONAL(IMATH_FOR_MP, test x$with_int = ximath -o x$with_int = ximath-32)
84 AM_CONDITIONAL(GMP_FOR_MP, test x$with_int = xgmp)
86 AM_CONDITIONAL(HAVE_CXX11, test "x$HAVE_CXX11" = "x1")
87 AM_CONDITIONAL(HAVE_CXX17, test "x$HAVE_CXX17" = "x1")
88 AM_CONDITIONAL(SMALL_INT_OPT, test "x$with_int" = "ximath-32")
89 AS_IF([test "x$with_int" = "ximath-32"], [
90         AC_DEFINE([USE_SMALL_INT_OPT], [], [Use small integer optimization])
93 AC_CHECK_DECLS(ffs,[],[],[#include <strings.h>])
94 AC_CHECK_DECLS(__builtin_ffs,[],[],[])
95 AC_CHECK_DECLS([_BitScanForward],[],[],[#include <intrin.h>])
96 if test "x$ac_cv_have_decl_ffs" = xno -a \
97                 "x$ac_cv_have_decl___builtin_ffs" = xno -a \
98                 "x$ac_cv_have_decl__BitScanForward" = xno; then
99         AC_MSG_ERROR([No ffs implementation found])
101 AC_CHECK_DECLS([strcasecmp,strncasecmp],[],[],[#include <strings.h>])
102 AC_CHECK_DECLS([_stricmp,_strnicmp],[],[],[#include <string.h>])
103 if test "x$ac_cv_have_decl_strcasecmp" = xno -a \
104                 "x$ac_cv_have_decl__stricmp" = xno; then
105         AC_MSG_ERROR([No strcasecmp implementation found])
107 if test "x$ac_cv_have_decl_strncasecmp" = xno -a \
108                 "x$ac_cv_have_decl__strnicmp" = xno; then
109         AC_MSG_ERROR([No strncasecmp implementation found])
111 AC_CHECK_DECLS([snprintf,_snprintf],[],[],[#include <stdio.h>])
112 if test "x$ac_cv_have_decl_snprintf" = xno -a \
113                 "x$ac_cv_have_decl__snprintf" = xno; then
114         AC_MSG_ERROR([No snprintf implementation found])
117 AX_SUBMODULE(clang,system|no,no)
118 AM_CONDITIONAL(HAVE_CLANG, test $with_clang = system)
120 AX_SET_WARNING_FLAGS
122 AC_SUBST(WARNING_FLAGS)
124 PACKAGE_CFLAGS="$MP_CPPFLAGS"
125 PACKAGE_LDFLAGS="$MP_LDFLAGS"
126 PACKAGE_LIBS="-lisl $MP_LIBS"
127 AX_CREATE_PKGCONFIG_INFO
129 AX_DETECT_GIT_HEAD
131 AH_BOTTOM([#include <isl_config_post.h>])
132 AC_CONFIG_HEADERS(isl_config.h)
133 AC_CONFIG_FILES(isl_srcdir.c)
134 AC_CONFIG_FILES(Makefile)
135 AC_CONFIG_FILES(doc/Makefile)
136 if test $with_clang = system; then
137         AC_CONFIG_SUBDIRS(interface)
139 AC_CONFIG_FILES([bound_test.sh], [chmod +x bound_test.sh])
140 AC_CONFIG_FILES([codegen_test.sh], [chmod +x codegen_test.sh])
141 AC_CONFIG_FILES([pip_test.sh], [chmod +x pip_test.sh])
142 AC_CONFIG_FILES([flow_test.sh], [chmod +x flow_test.sh])
143 AC_CONFIG_FILES([schedule_test.sh], [chmod +x schedule_test.sh])
144 AC_OUTPUT