remove PolyLib backend
[cloog/uuh.git] / configure.in
blob7680824396057a3bf10d625de68d8860c182723e
2 dnl /**-------------------------------------------------------------------**
3 dnl  **                              CLooG                                **
4 dnl  **-------------------------------------------------------------------**
5 dnl  **                           configure.in                            **
6 dnl  **-------------------------------------------------------------------**
7 dnl  **                   First version: august 7th 2002                  **
8 dnl  **-------------------------------------------------------------------**/
9 dnl
10 dnl Input file for autoconf to build a configuration shellscript.
11 dnl To build the configure script from the CLooG's top-level directory, use
12 dnl autoconf -l autoconf autoconf/configure.in > configure
13 dnl if it doesn't work (invalid option -l) try -I instead
14 dnl autoconf -I autoconf autoconf/configure.in > configure
16 dnl /**************************************************************************
17 dnl *               CLooG : the Chunky Loop Generator (experimental)          *
18 dnl ***************************************************************************
19 dnl *                                                                         *
20 dnl * Copyright (C) 2001 Cedric Bastoul                                       *
21 dnl *                                                                         *
22 dnl * This library is free software; you can redistribute it and/or           *
23 dnl * modify it under the terms of the GNU Lesser General Public              *
24 dnl * License as published by the Free Software Foundation; either            *
25 dnl * version 2.1 of the License, or (at your option) any later version.      *
26 dnl *                                                                         *
27 dnl * This library is distributed in the hope that it will be useful,         *
28 dnl * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
29 dnl * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
30 dnl * Lesser General Public License for more details.                         *
31 dnl *                                                                         *
32 dnl * You should have received a copy of the GNU Lesser General Public        *
33 dnl * License along with this library; if not, write to the Free Software     *
34 dnl * Foundation, Inc., 51 Franklin Street, Fifth Floor,                      *
35 dnl * Boston, MA  02110-1301  USA                                             *
36 dnl *                                                                         *
37 dnl * CLooG, the Chunky Loop Generator                                        *
38 dnl * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr                      *
39 dnl *                                                                         *
40 dnl ***************************************************************************/
42 AC_PREREQ(2.13)
43 AC_INIT(source/cloog.c)
44 AC_CONFIG_AUX_DIR(autoconf)
45 AC_CONFIG_MACRO_DIR([m4])
46 AM_INIT_AUTOMAKE(cloog, 0.14.0)
48 dnl /**************************************************************************
49 dnl  *                              Checking                                  *
50 dnl  **************************************************************************/
52 dnl Checks for programs.
53 AC_PROG_CC
54 AC_PROG_LN_S
55 AC_PROG_MAKE_SET
56 AC_CHECK_PROG(CD, cd)
57 dnl Configure needs an empty install.sh file with this, i HATE that...
58 AC_PROG_INSTALL
59 AC_PROG_LIBTOOL
60 AC_CHECK_PROG(TEXI2DVI, texi2dvi, texi2dvi, [])
61 AM_CONDITIONAL(HAVE_TEXI2DVI, test -n "$TEXI2DVI")
63 AX_CC_MAXOPT
64 AC_SUBST(CFLAGS_WARN)
65 AX_CFLAGS_WARN_ALL(CFLAGS_WARN)
67 dnl Checks for typedefs, structures, and compiler characteristics.
68 AC_C_CONST
69 AC_TYPE_SIZE_T
73 dnl Checks for header files.
74 AC_HEADER_STDC
77 dnl Checks for library functions.
78 AC_CHECK_FUNCS(strtol)
81 dnl /**************************************************************************
82 dnl  *                             Option setting                             *
83 dnl  **************************************************************************/
85 AC_CHECK_HEADERS([sys/resource.h],
86         [AC_DEFINE([CLOOG_RUSAGE], [], [Print time required to generate code])])
88 AX_SUBMODULE(isl,system|build|bundled,bundled)
89 BITS="gmp"
91 dnl /**************************************************************************
92 dnl  *                            Where is GMP?                               *
93 dnl  **************************************************************************/
95 AX_SUBMODULE(gmp,system,system)
97 need_get_memory_functions=false
98 case "$with_gmp" in
99 system)
100     if test "x$with_gmp_prefix" != "x"; then
101         CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS"
102     fi
103     
104     if test "$with_gmp_exec_prefix" != "yes" ; then
105         LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS"
106     fi
107      
108     AC_CHECK_HEADER(gmp.h,
109                     [],
110                     [AC_MSG_ERROR(Can't find gmp headers.)])
111     AC_CHECK_LIB(gmp,
112                  __gmpz_init,
113                  [LIBS="$LIBS -lgmp"],
114                  [AC_MSG_ERROR(Can't find gmp library.)])
115     AC_CHECK_DECLS(mp_get_memory_functions,[],[
116             need_get_memory_functions=true
117     ],[#include <gmp.h>])
118     ;;
119 esac
120 AM_CONDITIONAL(NEED_GET_MEMORY_FUNCTIONS,
121                 test x$need_get_memory_functions = xtrue)
123 dnl /**************************************************************************
124 dnl  *                          Where is isl?                                 *
125 dnl  **************************************************************************/
127 AC_SUBST(ISL_CPPFLAGS)
128 AC_SUBST(ISL_LDFLAGS)
129 AC_SUBST(ISL_LIBS)
130 case "$with_isl" in
131 bundled)
132         ISL_CPPFLAGS="-I$srcdir/isl/include -Iisl/include"
133         ;;
134 build)
135         ISL_CPPFLAGS="-I$isl_srcdir/include -I$with_isl_builddir/include"
136         ISL_LIBS="$with_isl_builddir/libisl.la"
137         ;;
138 system)
139         if test "x$with_isl_prefix" != "x"; then
140                 ISL_CPPFLAGS="-I$with_isl_prefix/include"
141         fi
142         if test "x$with_isl_exec_prefix" != "x"; then
143                 ISL_LDFLAGS="-L$with_isl_exec_prefix/lib"
144         fi
145         ISL_LIBS="-lisl"
146 esac
147 AM_CONDITIONAL(BUNDLED_ISL, test $with_isl = bundled)
150 AC_DEFINE([CLOOG_INT_GMP], 1, [Use arbitrary precision integers])
152 AC_SUBST(GIT_INDEX)
153 if test -f $srcdir/.git/HEAD; then
154         GIT_INDEX="\$(top_srcdir)/.git/index"
158 dnl /**************************************************************************
159 dnl  *                            Substitutions                               *
160 dnl  **************************************************************************/
163 dnl Substitutions to do in Makefile.in.
164 AC_SUBST(CC)
165 AC_SUBST(LN_S)
167 AC_SUBST(prefix)
168 AC_SUBST(exec_prefix)
169 AC_SUBST(INSTALL)
171 AC_SUBST(BITS)
173 PACKAGE_NAME="cloog-isl"
174 PACKAGE_CFLAGS="-DCLOOG_INT_GMP=1"
175 AX_CREATE_PKGCONFIG_INFO
177 AC_CONFIG_FILES(Makefile test/Makefile)
178 AC_CONFIG_FILES(autoconf/Doxyfile)
179 AC_CONFIG_FILES(doc/Makefile)
180 AC_CONFIG_FILES(source/version.c)
181 AC_CONFIG_FILES([genversion.sh], [chmod +x genversion.sh])
182 AC_CONFIG_COMMANDS([version.h],
183         [echo '#define CLOOG_HEAD "'`./genversion.sh`'"' > version.h])
184 AC_CONFIG_COMMANDS([doc/gitversion.texi],
185         [echo '@set VERSION '`./genversion.sh`'' > doc/gitversion.texi])
186 if test $with_isl = bundled; then
187         AC_CONFIG_SUBDIRS(isl)
189 AC_CONFIG_COMMANDS_POST([
190         ac_configure_args="$ac_configure_args $cloog_configure_args"
192 AC_OUTPUT
195 echo "             /*-----------------------------------------------*"
196 echo "              *           CLooG configuration is OK           *"
197 echo "              *-----------------------------------------------*/"
198 echo "It appears that your system is OK to start CLooG compilation. You need"
199 echo "now to type \"make\". After compilation, you should check CLooG by typing"
200 echo "\"make check\". If no problem occur, you can type \"make uninstall\" if"
201 echo "you are upgrading an old version. Lastly type \"make install\" to install"
202 echo "CLooG on your system (log as root if necessary)."