Add test coverage for isl_[union_]set_get_basic_set_list
[isl.git] / configure.ac
blobdf46c8624778637364f14380891dc4bf01fd51dd
1 AC_INIT([isl], [0.19], [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=19:0:0
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
24 AX_CC_MAXOPT
25 AX_GCC_WARN_UNUSED_RESULT
26 AX_C___ATTRIBUTE__
28 AC_PROG_GREP
29 AC_PROG_LIBTOOL
30 AC_PROG_SED
31 AM_PATH_PYTHON([2.5], [], [:])
32 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
34 AC_CHECK_PROG(PERL, perl, perl, [])
35 AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex, [])
36 AC_CHECK_PROG(POD2HTML, pod2html, pod2html, [])
38 AM_CONDITIONAL(GENERATE_DOC, test -n "$PERL" -a -n "$PDFLATEX" -a -n "$POD2HTML")
40 AX_CREATE_STDINT_H(include/isl/stdint.h)
42 AC_ARG_WITH([int],
43             [AS_HELP_STRING([--with-int=gmp|imath|imath-32],
44                             [Which package to use to represent
45                                 multi-precision integers [default=gmp]])],
46             [], [with_int=gmp])
47 case "$with_int" in
48 gmp|imath|imath-32)
49         ;;
51         AC_MSG_ERROR(
52             [bad value ${withval} for --with-int (use gmp, imath or imath-32)])
53 esac
55 AC_SUBST(MP_CPPFLAGS)
56 AC_SUBST(MP_LDFLAGS)
57 AC_SUBST(MP_LIBS)
58 case "$with_int" in
59 gmp)
60         AX_DETECT_GMP
61         ;;
62 imath|imath-32)
63         AX_DETECT_IMATH
64         ;;
65 esac
66 if test "x$with_int" = "ximath-32" -a "x$GCC" = "xyes"; then
67         MP_CPPFLAGS="-std=gnu99 $MP_CPPFLAGS"
70 AM_CONDITIONAL(IMATH_FOR_MP, test x$with_int = ximath -o x$with_int = ximath-32)
71 AM_CONDITIONAL(GMP_FOR_MP, test x$with_int = xgmp)
73 AM_CONDITIONAL(SMALL_INT_OPT, test "x$with_int" == "ximath-32")
74 AS_IF([test "x$with_int" == "ximath-32"], [
75         AC_DEFINE([USE_SMALL_INT_OPT], [], [Use small integer optimization])
78 AC_CHECK_DECLS(ffs,[],[],[#include <strings.h>])
79 AC_CHECK_DECLS(__builtin_ffs,[],[],[])
80 AC_CHECK_DECLS([_BitScanForward],[],[],[#include <intrin.h>])
81 if test "x$ac_cv_have_decl_ffs" = xno -a \
82                 "x$ac_cv_have_decl___builtin_ffs" = xno -a \
83                 "x$ac_cv_have_decl__BitScanForward" = xno; then
84         AC_MSG_ERROR([No ffs implementation found])
86 AC_CHECK_DECLS([strcasecmp,strncasecmp],[],[],[#include <strings.h>])
87 AC_CHECK_DECLS([_stricmp,_strnicmp],[],[],[#include <string.h>])
88 if test "x$ac_cv_have_decl_strcasecmp" = xno -a \
89                 "x$ac_cv_have_decl__stricmp" = xno; then
90         AC_MSG_ERROR([No strcasecmp implementation found])
92 if test "x$ac_cv_have_decl_strncasecmp" = xno -a \
93                 "x$ac_cv_have_decl__strnicmp" = xno; then
94         AC_MSG_ERROR([No strncasecmp implementation found])
96 AC_CHECK_DECLS([snprintf,_snprintf],[],[],[#include <stdio.h>])
97 if test "x$ac_cv_have_decl_snprintf" = xno -a \
98                 "x$ac_cv_have_decl__snprintf" = xno; then
99         AC_MSG_ERROR([No snprintf implementation found])
102 AX_SUBMODULE(clang,system|no,no)
103 case "$with_clang" in
104 system)
105         AX_DETECT_CLANG
106         ;;
107 esac
108 AM_CONDITIONAL(HAVE_CLANG, test $with_clang = system)
110 AX_SET_WARNING_FLAGS
112 AC_SUBST(WARNING_FLAGS)
114 PACKAGE_CFLAGS="$MP_CPPFLAGS"
115 PACKAGE_LDFLAGS="$MP_LDFLAGS"
116 PACKAGE_LIBS="-lisl $MP_LIBS"
117 AX_CREATE_PKGCONFIG_INFO
119 AX_DETECT_GIT_HEAD
121 AH_BOTTOM([#include <isl_config_post.h>])
122 AC_CONFIG_HEADERS(isl_config.h)
123 AC_CONFIG_FILES(isl_srcdir.c)
124 AC_CONFIG_FILES(Makefile)
125 AC_CONFIG_FILES(doc/Makefile)
126 if test $with_clang = system; then
127         AC_CONFIG_FILES(interface/Makefile)
129 AC_CONFIG_FILES([bound_test.sh], [chmod +x bound_test.sh])
130 AC_CONFIG_FILES([codegen_test.sh], [chmod +x codegen_test.sh])
131 AC_CONFIG_FILES([pip_test.sh], [chmod +x pip_test.sh])
132 AC_CONFIG_FILES([flow_test.sh], [chmod +x flow_test.sh])
133 AC_CONFIG_FILES([schedule_test.sh], [chmod +x schedule_test.sh])
134 AC_CONFIG_COMMANDS_POST([
135         dnl pass on arguments to subdir configures, but don't
136         dnl add them to config.status
137         ac_configure_args="$ac_configure_args $isl_configure_args"
139 AC_OUTPUT