1dnl 2dnl /*+------------------------------------------------------------------** 3dnl ** OpenScop Library ** 4dnl **------------------------------------------------------------------** 5dnl ** configure.in ** 6dnl **------------------------------------------------------------------** 7dnl ** First version: 30/04/2008 ** 8dnl **------------------------------------------------------------------** 9dnl 10dnl 11dnl ************************************************************************** 12dnl * OpenScop: Structures and formats for polyhedral tools to talk together * 13dnl ************************************************************************** 14dnl * ,___,,_,__,,__,,__,,__,,_,__,,_,__,,__,,___,_,__,,_,__, * 15dnl * / / / // // // // / / / // // / / // / /|,_, * 16dnl * / / / // // // // / / / // // / / // / / / /\ * 17dnl * |~~~|~|~~~|~~~|~~~|~~~|~|~~~|~|~~~|~~~|~~~|~|~~~|~|~~~|/_/ \ * 18dnl * | G |C| P | = | L | P |=| = |C| = | = | = |=| = |=| C |\ \ /\ * 19dnl * | R |l| o | = | e | l |=| = |a| = | = | = |=| = |=| L | \# \ /\ * 20dnl * | A |a| l | = | t | u |=| = |n| = | = | = |=| = |=| o | |\# \ \ * 21dnl * | P |n| l | = | s | t |=| = |d| = | = | = | | |=| o | | \# \ \ * 22dnl * | H | | y | | e | o | | = |l| | | = | | | | G | | \ \ \ * 23dnl * | I | | | | e | | | | | | | | | | | | | \ \ \ * 24dnl * | T | | | | | | | | | | | | | | | | | \ \ \ * 25dnl * | E | | | | | | | | | | | | | | | | | \ \ \ * 26dnl * | * |*| * | * | * | * |*| * |*| * | * | * |*| * |*| * | / \* \ \ * 27dnl * | O |p| e | n | S | c |o| p |-| L | i | b |r| a |r| y |/ \ \ / * 28dnl * '---'-'---'---'---'---'-'---'-'---'---'---'-'---'-'---' '--' * 29dnl * * 30dnl * Copyright (C) 2008 University Paris-Sud 11 and INRIA * 31dnl * * 32dnl * (3-clause BSD license) * 33dnl * Redistribution and use in source and binary forms, with or without * 34dnl * modification, are permitted provided that the following conditions * 35dnl * are met: * 36dnl * * 37dnl * 1. Redistributions of source code must retain the above copyright * 38dnl * notice, this list of conditions and the following disclaimer. * 39dnl * 2. Redistributions in binary form must reproduce the above copyright * 40dnl * notice, this list of conditions and the following disclaimer in the * 41dnl * documentation and/or other materials provided with the distribution.* 42dnl * 3. The name of the author may not be used to endorse or promote * 43dnl * products derived from this software without specific prior written * 44dnl * permission. * 45dnl * * 46dnl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * 47dnl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * 48dnl * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * 49dnl * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * 50dnl * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * 51dnl * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * 52dnl * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * 53dnl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * 54dnl * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * 55dnl * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * 56dnl * POSSIBILITY OF SUCH DAMAGE. * 57dnl * * 58dnl * OpenScop Library, a library to manipulate OpenScop formats and data * 59dnl * structures. Written by: * 60dnl * Cedric Bastoul <Cedric.Bastoul@u-psud.fr> and * 61dnl * Louis-Noel Pouchet <Louis-Noel.pouchet@inria.fr> * 62dnl * * 63dnl **************************************************************************/ 64dnl 65dnl Input file for autoconf to build a configuration shellscript. 66 67m4_define([version_major], [0]) 68m4_define([version_minor], [8]) 69m4_define([version_revision], [3]) 70 71AC_PREREQ(2.53) 72dnl Fill here the @bug email adress. 73AC_INIT([osl], [version_major.version_minor.version_revision], 74 [cedric.bastoul@u-psud.fr,pouchet@cse.ohio-state.edu]) 75dnl A common file, which serve as a test. 76AC_CONFIG_SRCDIR([include/osl/macros.h]) 77dnl Put as most as possible configuration files to an auxialiry 78dnl directory. 79AC_CONFIG_AUX_DIR([autoconf]) 80AC_CONFIG_MACRO_DIR([m4]) 81 82dnl Initialize automake. 83AM_INIT_AUTOMAKE([foreign]) 84m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) 85 86 87dnl /************************************************************************** 88dnl * Checking * 89dnl **************************************************************************/ 90 91 92dnl Checks for programs. 93AC_PROG_CC 94AC_PROG_LN_S 95AC_PROG_MAKE_SET 96AC_CHECK_PROG(CD, cd) 97AC_PROG_INSTALL 98AC_PROG_LIBTOOL 99AC_CHECK_PROGS(DOXYGEN,doxygen,doxygen) 100 101AX_CC_MAXOPT 102AC_SUBST(CFLAGS_WARN) 103AX_CFLAGS_WARN_ALL(CFLAGS_WARN) 104 105dnl Checks for typedefs, structures, and compiler characteristics. 106AC_C_CONST 107AC_TYPE_SIZE_T 108 109dnl Checks for header files. 110AC_HEADER_STDC 111AC_CHECK_HEADERS([errno.h stddef.h stdlib.h string.h strings.h unistd.h]) 112 113dnl Checks for library functions. 114AC_CHECK_FUNCS(strtol) 115 116 117dnl /************************************************************************** 118dnl * Option setting * 119dnl **************************************************************************/ 120 121dnl /************************************************************************** 122dnl * Where is GMP? * 123dnl **************************************************************************/ 124 125gmp_flag="OSL_GMP_IS_HERE" 126AX_SUBMODULE(gmp,no|system|build,system) 127 128case "$with_gmp" in 129build) 130 CPPFLAGS="-D$gmp_flag -I$with_gmp_builddir $CPPFLAGS" 131 LDFLAGS="-L$with_gmp_builddir/$lt_cv_objdir $LDFLAGS" 132 ;; 133system) 134 CPPFLAGS="-D$gmp_flag $CPPFLAGS" 135 if test "x$with_gmp_prefix" != "x"; then 136 CPPFLAGS="-I$with_gmp_prefix/include $CPPFLAGS" 137 fi 138 139 if test "$with_gmp_exec_prefix" != "yes" ; then 140 LDFLAGS="-L$with_gmp_exec_prefix/lib $LDFLAGS" 141 fi 142 ;; 143esac 144case "$with_gmp" in 145build|system) 146 AC_CHECK_HEADER(gmp.h, 147 [], 148 [AC_MSG_ERROR("Can't find gmp headers.")]) 149 AC_CHECK_LIB(gmp, 150 __gmpz_init, 151 [LIBS="$LIBS -lgmp"], 152 [AC_MSG_ERROR("Can't find gmp library.")]) 153 ;; 154esac 155 156 157dnl /************************************************************************** 158dnl * Substitutions * 159dnl **************************************************************************/ 160 161 162dnl Substitutions to do. 163AC_SUBST(ac_aux_dir) 164AC_SUBST(abs_top_srcdir) 165 166AC_SUBST(VERSION_MAJOR) 167AC_SUBST(VERSION_MINOR) 168AC_SUBST(VERSION_REVISION) 169 170dnl Configure Makefiles. 171AC_CONFIG_FILES([ 172 Makefile 173 doc/Makefile 174 doc/Doxyfile 175 include/osl/scop.h 176 tests/Makefile 177 ], 178 [test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in]) 179 180AC_OUTPUT 181 182 183echo " /*-----------------------------------------------*" 184echo " * OpenScop Library configuration is OK *" 185echo " *-----------------------------------------------*/" 186echo "It appears that your system is OK to start the OpenScop Library compilation." 187echo "You need now to type \"make\". Then type \"make install\" to install it on your" 188echo "system (log as root if necessary)." 189