2 dnl CLAY : the Chunky Loop Alteration wizardrY
4 dnl Copyright (C) 2011 Soufiane BAGHDADI
6 dnl This is free software; you can redistribute it and/or modify it under
7 dnl the terms of the GNU General Public License as published by the Free
8 dnl Software Foundation; either version 2 of the License, or (at your
9 dnl option) any later version.
11 dnl This software is distributed in the hope that it will be useful, but
12 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License along
17 dnl with software; if not, write to the Free Software Foundation, Inc.,
18 dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 dnl the Chunky Loop Alteration wizardrY:
21 dnl a scripting system for high-level loop transformations
22 dnl Written by Soufiane BAGHDADI <soufiane.baghdadi@inria.fr>
25 #############################################################################
26 ## Require for autoconf >= 2.54.
29 #############################################################################
30 ## Fill here the @bug email adress.
31 AC_INIT([clay], [0.1.0], [soufiane.baghdadi@inria.fr])
32 ## Automatic generation of config.h
33 AC_CONFIG_HEADERS([include/clay/config.h:include/clay/config-h.in])
34 ## Put as most as possible configuration files to an auxialiry
36 AC_CONFIG_AUX_DIR([config])
37 ## Initialize automake. Here, a special tar version that enables
38 ## (very) long filenames.
39 AM_INIT_AUTOMAKE([1.9 tar-ustar no-define foreign dist-bzip2])
41 #############################################################################
44 ## Use libtool to generate libraries.
47 ## Check for some essential headers.
49 AC_CHECK_HEADERS([errno.h stddef.h stdlib.h string.h strings.h unistd.h])
51 ## Check for some essential C properties.
57 ## Add support for LEX & YACC
61 #############################################################################
62 ## Configure Makefiles.
70 [test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h.in])
72 #############################################################################
73 dnl * Where is OpenScop? *
74 dnl *********************************************************************
76 dnl Offer --with-openscop.
78 AC_HELP_STRING([--with-openscop=DIR],
79 [DIR Location of OpenScop package]),
80 [with_openscop=$withval;
81 CPPFLAGS="${CPPFLAGS} -I$withval/include";
82 LDFLAGS="${LDFLAGS} -L$withval/lib"],
83 [with_openscop=check])
85 dnl Check for openscop existence.
86 AS_IF([test "x$with_openscop" != xno],
87 [AC_CHECK_LIB([openscop], [openscop_scop_read],
88 [LIBS="-lopenscop $LIBS"],
89 [if test "x$with_openscop" != xcheck; then
90 AC_MSG_FAILURE([Test for OpenScop failed. \ Use --with-openscop to specify libopenscop path.])