[packages/candl] - updated to recent 0.6.3 release; release 2
qboosh
qboosh at pld-linux.org
Thu Jun 29 21:52:01 CEST 2023
commit 541c7eb2667b2ef13c4d826f68c5aaa48c339a24
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Jun 29 21:41:14 2023 +0200
- updated to recent 0.6.3 release; release 2
candl-0.6.3.patch | 58 -
candl-git.patch | 13861 ----------------------------------------------
candl-piplib.patch | 11 +
candl-system-libs.patch | 20 -
candl.spec | 40 +-
5 files changed, 24 insertions(+), 13966 deletions(-)
---
diff --git a/candl.spec b/candl.spec
index 0b6b37f..729cc7b 100644
--- a/candl.spec
+++ b/candl.spec
@@ -2,22 +2,16 @@ Summary: Candl - Data Dependence Analysis Tool in the Polyhedral Model
Summary(pl.UTF-8): Candl - narzędzie do analizy zależności danych w modelu wielościennym
Name: candl
Version: 0.6.3
-%define snap 20140806
-%define rel 1
-Release: 1.%{snap}.%{rel}
+Release: 2
License: LGPL v3+
Group: Libraries
-#Source0: http://web.cse.ohio-state.edu/~pouchet/software/pocc/download/modules/%{name}-0.6.3.tar.gz
-Source0: http://web.cse.ohio-state.edu/~pouchet/software/pocc/download/modules/%{name}-0.6.2.tar.gz
-# Source0-md5: 4e86392fa46a514b03532f93d9c83f8d
-# git clone git://repo.or.cz/candl.git
-# git diff 0.6.2
-Patch0: %{name}-git.patch
+#Source0: http://web.cse.ohio-state.edu/~pouchet/software/pocc/download/modules/%{name}-0.6.2.tar.gz
+#Source0Download: https://github.com/periscop/candl/tags
+Source0: https://github.com/periscop/candl/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 392176a94ee0c99cdb45797568cda786
+Patch0: %{name}-piplib.patch
Patch1: %{name}-isl.patch
Patch2: %{name}-info.patch
-Patch3: %{name}-system-libs.patch
-# diff -Nur candl-0.6.2 candl-0.6.3 ; with autogenerated files removed, updated to apply on top of git patch
-Patch4: %{name}-0.6.3.patch
URL: http://icps.u-strasbg.fr/people/bastoul/public_html/development/candl/
BuildRequires: autoconf >= 2.53
BuildRequires: automake >= 1:1.9
@@ -25,8 +19,8 @@ BuildRequires: gmp-devel
# 0.12.x originally, 0.13 with isl patch
BuildRequires: isl-devel >= 0.13
BuildRequires: libtool
-BuildRequires: osl-devel
-BuildRequires: piplib-devel
+BuildRequires: osl-devel >= 0.9.4
+BuildRequires: piplib-devel >= 1.4.0
BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -46,8 +40,8 @@ Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gmp-devel
Requires: isl-devel >= 0.13
-Requires: osl-devel
-Requires: piplib-devel
+Requires: osl-devel >= 0.9.4
+Requires: piplib-devel >= 1.4.0
%description devel
Header files for Candl library.
@@ -68,20 +62,10 @@ Static Candl library.
Statyczna biblioteka Candl.
%prep
-%setup -q -n %{name}-0.6.2
-# clean after make dist to allow git patch
-%{__rm} include/candl/candl.h
+%setup -q
%patch0 -p1
-%patch4 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
-
-# because of tests subdir stripped from git patch
-> tests/Makefile.am
-
-%{__rm} osl piplib
-install -d osl piplib
%build
%{__libtoolize}
@@ -124,6 +108,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libcandl.so
%{_libdir}/libcandl.la
%{_includedir}/candl
+%dir %{_libdir}/candl
+%{_libdir}/candl/candl-config.cmake
%{_infodir}/candl.info*
%files static
diff --git a/candl-0.6.3.patch b/candl-0.6.3.patch
deleted file mode 100644
index 0174e29..0000000
--- a/candl-0.6.3.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-diff -Nur candl-0.6.2/ChangeLog candl-0.6.3/ChangeLog
---- candl-0.6.2/ChangeLog 2012-03-12 17:19:38.000000000 +0100
-+++ candl-0.6.3/ChangeLog 2013-02-19 06:27:35.000000000 +0100
-@@ -1,3 +1,11 @@
-+2013-02-18 Louis-Noel Pouchet <pouchet at cs.ucla.edu>
-+
-+ * configure.ac: Bump to candl-0.6.3.
-+
-+2012-10-26 Louis-Noel Pouchet <pouchet at cse.ohio-state.edu>
-+
-+ * source/dependence.c: Fix 2 bugs in scalar privatization.
-+
- 2012-03-09 Louis-Noel Pouchet <pouchet at cse.ohio-state.edu>
-
- * configure.in: Bump to candl-0.6.2.
---- candl-0.6.2/configure.ac.orig 2015-12-02 21:54:57.513138868 +0100
-+++ candl-0.6.3/configure.ac 2015-12-02 21:57:50.153131623 +0100
-@@ -38,7 +38,7 @@
- AC_PREREQ(2.53)
-
- dnl Fill here the @bug email adress.
--AC_INIT([candl], [0.6.2], [cedric.bastoul at inria.fr,pouchet at cse.ohio-state.edu])
-+AC_INIT([candl], [0.6.3], [cedric.bastoul at inria.fr,pouchet at cs.ucla.edu])
-
- AC_CONFIG_SRCDIR([include/candl/candl.h])
-
---- candl-0.6.2/source/dependence.c.orig 2015-12-02 21:54:57.516472201 +0100
-+++ candl-0.6.3/source/dependence.c 2015-12-02 22:01:56.763121274 +0100
-@@ -1899,14 +1899,15 @@
- pred->next = next;
- free(tmp);
- }
-- pred = tmp;
-+ else
-+ pred = tmp;
- tmp = next;
-
-- continue;
-+ } else {
-+ /* Go to the next victim. */
-+ pred = tmp;
-+ tmp = tmp->next;
- }
-- /* Go to the next victim. */
-- pred = tmp;
-- tmp = tmp->next;
- }
- }
-
-@@ -2122,7 +2123,7 @@
- scop_usr->scalars_privatizable[k] = -1;
- }
-
-- if (nb_priv == priv_buff_size) {
-+ if (nb_priv == priv_buff_size - 2) {
- CANDL_realloc(scop_usr->scalars_privatizable,
- int*, (priv_buff_size *= 2) * sizeof(int));
- for (k = nb_priv; k < priv_buff_size; ++k)
diff --git a/candl-git.patch b/candl-git.patch
deleted file mode 100644
index cd74220..0000000
--- a/candl-git.patch
+++ /dev/null
@@ -1,13861 +0,0 @@
-diff --git a/.gitmodules b/.gitmodules
-new file mode 100644
-index 0000000..3279daf
---- /dev/null
-+++ b/.gitmodules
-@@ -0,0 +1,6 @@
-+[submodule "osl"]
-+ path = osl
-+ url = https://github.com/periscop/openscop.git
-+[submodule "piplib"]
-+ path = piplib
-+ url = https://github.com/periscop/piplib.git
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-new file mode 100755
-index 0000000..a16d5e4
---- /dev/null
-+++ b/CMakeLists.txt
-@@ -0,0 +1,249 @@
-+cmake_minimum_required(VERSION 2.8)
-+
-+
-+set(PACKAGE_VERSION "0.6.2")
-+set(RELEASE "${PACKAGE_VERSION}")
-+set(BITS "32")
-+set(DEFINE_HAS_ISL_LIB "")
-+set(top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
-+
-+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-+
-+
-+# User's settings - C Flags
-+
-+# set(release "TRUE")
-+ set(release "FALSE")
-+
-+ # Release
-+ if (release)
-+ set(CMAKE_C_FLAGS "-O3")
-+ # Debug # valgrind --show-reachable=yes --leak-check=full -v exe
-+ else()
-+ set(CMAKE_C_FLAGS "-O0 -g3")
-+ endif()
-+
-+# User's settings - General C Flags
-+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99")
-+
-+
-+# Build doxygen
-+ find_package(Doxygen)
-+ if (DOXYGEN_FOUND)
-+ configure_file("doc/Doxyfile.in" "Doxyfile")
-+ add_custom_target(
-+ doxygen
-+ ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
-+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-+ COMMENT "Generating API documentation with Doxygen" VERBATIM
-+ )
-+ else()
-+ message (STATUS "Doxygen not found :( API documentation can not be built")
-+ endif()
-+
-+# Build documentation
-+
-+ # doc
-+ find_program(texi2pdf_exe texi2pdf)
-+ if (texi2pdf_exe)
-+ add_custom_target(
-+ doc
-+ ${texi2pdf_exe} ${CMAKE_CURRENT_SOURCE_DIR}/doc/candl.texi --output=${CMAKE_CURRENT_BINARY_DIR}/candl.pdf
-+ WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-+ COMMENT "Generating documentation (pdf) (with texi2pdf)" VERBATIM
-+ )
-+ else()
-+ message (STATUS "texi2pdf not found :( Documentation can not be built")
-+ endif()
-+
-+
-+# osl
-+ find_package(osl REQUIRED)
-+
-+# GMP & piplib
-+ message(STATUS "---")
-+ find_library(gmp_LIB gmp)
-+ if (gmp_LIB)
-+ message (STATUS "Library gmp found =) ${gmp_LIB}")
-+ set(BITS "MP")
-+ # piplibMP
-+ find_package(piplibMP REQUIRED)
-+ else()
-+ message(STATUS "Library gmp not found :(")
-+ # piplib64
-+ find_package(piplib64 REQUIRED)
-+ endif()
-+
-+# Include directories (to use #include <> instead of #include "")
-+
-+ # include/candl/macros.h
-+ configure_file("include/candl/macros.h.in" "include/candl/macros.h")
-+ include_directories("${CMAKE_CURRENT_BINARY_DIR}/include")
-+ # candl
-+ include_directories("./include")
-+
-+
-+# Compiler log
-+ message(STATUS "---")
-+ message(STATUS "C compiler = ${CMAKE_C_COMPILER}")
-+ if (release)
-+ message(STATUS "Mode Release")
-+ else()
-+ message(STATUS "Mode Debug")
-+ endif()
-+ message(STATUS "C flags = ${CMAKE_C_FLAGS}")
-+
-+
-+# Library
-+
-+ message(STATUS "---")
-+
-+ # files .c
-+ file(
-+ GLOB_RECURSE
-+ sources
-+ source/*
-+ )
-+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/source/candl.c;" "" sources "${sources}") # with ;
-+ string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/source/candl.c" "" sources "${sources}") # without ;
-+
-+ # Shared
-+ add_library(
-+ candl
-+ SHARED
-+ ${sources}
-+ )
-+ target_link_libraries(candl ${OSL_LIBRARY})
-+ if (gmp_LIB)
-+ target_link_libraries(candl ${PIPLIBMP_LIBRARY})
-+ else()
-+ target_link_libraries(candl ${PIPLIB64_LIBRARY})
-+ endif()
-+ get_property(candl_lib_location TARGET candl PROPERTY LOCATION)
-+ message(STATUS "Add candl library (shared) ${candl_lib_location}")
-+
-+ # Static
-+ add_library(
-+ candl_static
-+ STATIC
-+ ${sources}
-+ )
-+ set_target_properties(candl_static PROPERTIES OUTPUT_NAME candl)
-+ if (gmp_LIB)
-+ target_link_libraries(candl_static ${PIPLIBMP_LIBRARY})
-+ else()
-+ target_link_libraries(candl_static ${PIPLIB64_LIBRARY})
-+ endif()
-+ target_link_libraries(candl_static ${OSL_LIBRARY})
-+ get_property(candl_static_lib_location TARGET candl_static PROPERTY LOCATION)
-+ message(STATUS "Add candl library (static) ${candl_static_lib_location}")
-+
-+
-+# Executables & tests
-+
-+ message(STATUS "---") # candl
-+
-+ message(STATUS "Add executable candl")
-+ add_executable(candl_exe "source/candl.c")
-+ set_target_properties(candl_exe PROPERTIES OUTPUT_NAME "candl")
-+ target_link_libraries(candl_exe candl_static ${OSL_LIBRARY})
-+ if (gmp_LIB)
-+ target_link_libraries(candl_exe candl_static ${gmp_LIB})
-+ endif()
-+
-+ # candl test
-+ find_program(bash_exe bash)
-+ if (bash_exe)
-+
-+ message(STATUS "---")
-+
-+ enable_testing()
-+
-+ file(
-+ GLOB_RECURSE
-+ tests_unitary
-+ tests/unitary/*.c
-+ )
-+
-+ foreach(test ${tests_unitary})
-+ message(STATUS "Add Unitary test ${test}")
-+ add_test(
-+ "tests_unitary_${test}"
-+ "${bash_exe}"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/tests/checker.sh"
-+ "${test}"
-+ "${test}"
-+ "0"
-+ )
-+ endforeach()
-+
-+ file(
-+ GLOB_RECURSE
-+ tests_transformations_must_fail
-+ tests/transformations/must_fail/*.c
-+ )
-+
-+ foreach(test ${tests_transformations_must_fail})
-+ message(STATUS "Add Transformation must fail test ${test}")
-+ add_test(
-+ "tests_transformations_must_fail_${test}"
-+ "${bash_exe}"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/tests/checker.sh"
-+ "${test}"
-+ "${test}"
-+ "1"
-+ )
-+ endforeach()
-+
-+ file(
-+ GLOB_RECURSE
-+ tests_transformations_working
-+ tests/transformations/working/*.c
-+ )
-+
-+ foreach(test ${tests_transformations_working})
-+ message(STATUS "Add Transformation working test ${test}")
-+ add_test(
-+ "tests_transformations_working_${test}"
-+ "${bash_exe}"
-+ "${CMAKE_CURRENT_SOURCE_DIR}/tests/checker.sh"
-+ "${test}"
-+ "${test}"
-+ "1"
-+ )
-+ endforeach()
-+
-+ endif()
-+
-+
-+# Install
-+
-+ install(TARGETS candl LIBRARY DESTINATION lib)
-+ install(TARGETS candl_static ARCHIVE DESTINATION lib)
-+ install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h")
-+ install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.hpp")
-+ install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include/" DESTINATION include FILES_MATCHING PATTERN "*.h")
-+ install(FILES candl-config.cmake DESTINATION lib/candl)
-+ install(TARGETS candl_exe RUNTIME DESTINATION bin)
-+
-+
-+# Little help
-+
-+ message(STATUS "You can execute:")
-+ message(STATUS " make # To compile candl library & candl")
-+ if (bash_exe)
-+ message(STATUS " make test # To execute tests")
-+ message(STATUS " (with the first candl in the $PATH (?))")
-+ endif()
-+ message(STATUS " make install # To install library, include and CMake module")
-+ message(STATUS " # If you need root access:")
-+ message(STATUS " # sudo make install")
-+ message(STATUS " # su -c \"make install\"")
-+ if (DOXYGEN_FOUND)
-+ message(STATUS " make doxygen # To generate the Doxygen")
-+ endif()
-+ if( texi2pdf_exe)
-+ message(STATUS " make doc # To generate the documentation")
-+ endif()
-+
-+ message(STATUS "---")
-diff --git a/Makefile.am b/Makefile.am
-index fefbf45..6839b4b 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -32,39 +32,90 @@
- # * *
- # *****************************************************************************/
-
-+#############################################################################
-+
-+if BUNDLED_OSL
-+ MAYBE_OSL = osl
-+ OSL_LA = $(top_builddir)/osl/libosl.la
-+endif
-+if BUNDLED_PIPLIB
-+ MAYBE_PIPLIB = piplib
-+ PIPLIB_LA = $(top_builddir)/piplib/libpiplib$(BITS).la
-+endif
-+
-+SUBDIRS = $(MAYBE_OSL) $(MAYBE_PIPLIB) doc tests
-+DIST_SUBDIRS = $(MAYBE_OSL) $(MAYBE_PIPLIB) doc tests
-+ACLOCAL_AMFLAGS = -I m4
-+
-+#############################################################################
-+
-+bin_PROGRAMS = candl
-+lib_LTLIBRARIES = libcandl.la
-
- #############################################################################
--SUBDIRS = doc source include tests
-
-+pkginclude_HEADERS = \
-+ include/candl/candl.h \
-+ include/candl/dependence.h \
-+ include/candl/scop.h \
-+ include/candl/statement.h \
-+ include/candl/macros.h \
-+ include/candl/util.h \
-+ include/candl/ddv.h \
-+ include/candl/matrix.h \
-+ include/candl/options.h \
-+ include/candl/piplib.h \
-+ include/candl/piplib-wrapper.h \
-+ include/candl/violation.h
-+
-+DEFAULT_INCLUDES = -I.
-+INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
-+AM_CFLAGS = $(CFLAGS_WARN)
-
- #############################################################################
--ACLOCAL_AMFLAGS = -I autoconf
-
--m4datadir = $(datadir)/aclocal
-+EXTRA_DIST = COPYING.LESSER AUTHORS
-+
-+libcandl_la_LIBADD = @OSL_LIBS@ @PIPLIB_LIBS@ $(OSL_LA) $(PIPLIB_LA)
-+libcandl_la_CPPFLAGS = @OSL_CPPFLAGS@ @PIPLIB_CPPFLAGS@ -g
-+libcandl_la_LDFLAGS = @OSL_LDFLAGS@ @PIPLIB_LDFLAGS@
-+libcandl_la_SOURCES = \
-+ source/dependence.c \
-+ source/ddv.c \
-+ source/scop.c \
-+ source/statement.c \
-+ source/util.c \
-+ source/isl-wrapper.c \
-+ source/matrix.c \
-+ source/options.c \
-+ source/piplib-wrapper.c \
-+ source/pruning.c \
-+ source/violation.c
-
--EXTRA_DIST = COPYING.LESSER AUTHORS
-+#############################################################################
-
--AUX_DIST = \
-- $(ac_aux_dir)/config.guess \
-- $(ac_aux_dir)/config.sub \
-- $(ac_aux_dir)/install-sh \
-- $(ac_aux_dir)/ltmain.sh \
-- $(ac_aux_dir)/missing \
-- $(ac_aux_dir)/depcomp \
-- $(ac_aux_dir)/texinfo.tex
-+LDADD = @CANDL_LIBS@ @OSL_LIBS@ @PIPLIB_LIBS@
-+candl_CPPFLAGS = @OSL_CPPFLAGS@ @PIPLIB_CPPFLAGS@ -g -Wall
-+candl_LDFLAGS = #@OSL_LDFLAGS@ @PIPLIB_LDFLAGS@ # TO BE REMOVED
-+candl_DEPENDENCIES = libcandl.la
-+candl_SOURCES = source/candl.c
-
-+#############################################################################
-
--MAINTAINERCLEANFILES = \
-- Makefile.in \
-- aclocal.m4 \
-- configure \
-- source/stamp-h.in \
-+MAINTAINERCLEANFILES = \
-+ Makefile.in \
-+ aclocal.m4 \
-+ configure \
- $(AUX_DIST)
-
- #############################################################################
-+
- dist-hook:
- (cd $(distdir) && mkdir -p $(ac_aux_dir))
- for file in $(AUX_DIST); do \
- cp $$file $(distdir)/$$file; \
- done
- #############################################################################
-+
-+valcheck:
-+ $(MAKE) valcheck -C tests
-diff --git a/README b/README
-index 1b20de6..864d102 100644
---- a/README
-+++ b/README
-@@ -5,7 +5,7 @@
- Install
- -------
-
--To install candl, PIPLib must be installed. Optionally, scoplib must
-+To install candl, PIPLib must be installed. Optionally, OpenScop library must
- be installed to enable SCoP support.
-
- $> ./configure --with-piplib=/path/to/piplib/install --with-scoplib=/path/to/scoplib/install
-@@ -15,6 +15,32 @@ $> make
- $> make install
-
-
-+Alternatively, to use bunled PIPLib and OpenScop library, follow following command
-+sequence:
-+
-+$> ./get_submodules.sh
-+
-+$> ./autogen.sh
-+
-+$> ./configure --with-piplib=bundled --with-scoplib=bundled
-+
-+$> make
-+
-+$> make install
-+
-+Alternative: Install with CMake
-+-------------------------------
-+
-+$> mkdir build
-+$> cd build
-+$> cmake .. # -DCMAKE_INSTALL_PREFIX="/your/install/directory"
-+$> make
-+$> make test
-+$> # make install # sudo make install # su -c "make install"
-+$> make doc
-+$> make doxygen
-+
-+
- Support
- -------
-
-diff --git a/TODO b/TODO
-new file mode 100644
-index 0000000..74b6087
---- /dev/null
-+++ b/TODO
-@@ -0,0 +1,59 @@
-+
-+- unchecked -commute
-+
-+- lastwriter not finished
-+ see the FIXME in the function candl_dep_compute_lastwriter
-+
-+- compilation error with ISL :
-+ To test it, in isl-wrapper change #ifdef CANDL_SUPPORTS_ISL to
-+ #ifndef CANDL_SUPPORTS_ISL
-+
-+ The error is :
-+ source/isl-wrapper.c: In function ‘isl_constraint_read_from_matrix’:
-+ source/isl-wrapper.c:79: warning: passing argument 1 of ‘isl_equality_alloc’ from incompatible pointer type
-+ /home/jpoudroux/usr/include/isl/constraint.h:28: note: expected ‘struct isl_local_space *’ but argument is of type ‘struct isl_space *’
-+ source/isl-wrapper.c:81: warning: passing argument 1 of ‘isl_inequality_alloc’ from incompatible pointer type
-+ /home/jpoudroux/usr/include/isl/constraint.h:29: note: expected ‘struct isl_local_space *’ but argument is of type ‘struct isl_space *’
-+
-+- prunnning not finish (prunning.c: line 258 to 328)
-+ Uncomment the CANDL_COMPILE_PRUNNING in candl.h, or remove the ifdef in
-+ prunning.c
-+
-+- change the type of the dependence/violation domain
-+ (at the end of candl_dependence_build_system and candl_matrix_violation)
-+ today it's : OSL_UNDEFINED
-+
-+- candl_usr_init
-+ the statements must be sorted to compute the statement label
-+ the problem is if the scop is reordered, the second transformed scop
-+ must be "aligned" with it (the first statement need to corresponds to the first
-+ statement of the second scop, but the scattering could be different)
-+
-+ Functions of clay, which could return a non ordered scop :
-+ (they create new statements)
-+ iss, unroll, peel
-+
-+- in pip_has_rational_point:
-+ -> FIXME (dependence.c:2243)
-+
-+- autocorrect not implemented yet
-+
-+- compilation warning with gmp :
-+ /usr/bin/ld: warning: libgmp.so.3, needed by /home/jpoudroux/usr/lib/libosl.so, may conflict with libgmp.so.10
-+
-+- autoreconf error in the piplib module
-+ -> piplib must be installed in /
-+
-+ or execute these commands :
-+ $ cd piplib
-+ $ echo "AM_PROG_CC_C_O" >>configure.in
-+ $ touch NEWS AUTHORS ChangeLog
-+ $ cd ..
-+ $ ./redo.sh
-+
-+ If you want to set piplib as "bundled", uncomment these lines in the
-+ configure.ac :
-+ 295: if test $with_piplib = bundled; then
-+ 296: AC_CONFIG_SUBDIRS(piplib)
-+ 297: fi
-+
-diff --git a/autoconf/.gitignore b/autoconf/.gitignore
-new file mode 100644
-index 0000000..e69de29
-diff --git a/autoconf/candl.m4 b/autoconf/candl.m4
-deleted file mode 100644
-index 2d1347e..0000000
---- a/autoconf/candl.m4
-+++ /dev/null
-@@ -1,81 +0,0 @@
--AC_DEFUN([CANDL_ARG_LIBS_DEPENDENCIES],
--[
--dnl Add $prefix to the library path (convenience).
-- if test -e ${prefix}/include; then
-- CPPFLAGS="${CPPFLAGS} -I${prefix}/include"
-- fi;
-- if test -e ${prefix}/lib; then
-- LDFLAGS="${LDFLAGS} -L${prefix}/lib"
-- fi;
--dnl Offer --with-piplib.
-- AC_ARG_WITH(piplib,
-- AC_HELP_STRING([--with-piplib=DIR],
-- [DIR Location of PIPLib package]),
-- [with_piplib=$withval;
-- CPPFLAGS="${CPPFLAGS} -I$withval/include";
-- LDFLAGS="${LDFLAGS} -L$withval/lib"
-- ],
-- [with_piplib=yes])
--dnl Check for piplib existence.
-- AS_IF([test "x$with_piplib" != xno],
-- [AC_SEARCH_LIBS([pip_solve], [piplib$BITS],
-- [LIBS="-lpiplib$BITS $LIBS";
-- AC_DEFINE([HAVE_LIBPIPLIB], [1], [Define if you have libpiplib$BITS])
-- ],
-- [if test "x$with_piplib" != xcheck; then
-- AC_MSG_FAILURE([--with-piplib was given, but test for piplib failed])
-- fi
-- ])
-- ])
--dnl Offer --with-scoplib.
-- AC_ARG_WITH(scoplib,
-- AC_HELP_STRING([--with-scoplib=DIR],
-- [DIR Location of ScopLib package]),
-- [with_scoplib=$withval;
-- CPPFLAGS="${CPPFLAGS} -I$withval/include";
-- LDFLAGS="${LDFLAGS} -L$withval/lib"
-- ],
-- [with_scoplib=check])
--dnl Check for scoplib existence.
-- AS_IF([test "x$with_scoplib" != xno],
-- [AC_SEARCH_LIBS([scoplib_scop_read], [scoplib],
-- [LIBS="-lscoplib $LIBS";
-- DEFINE_HAS_SCOPLIB_LIB="# define CANDL_SUPPORTS_SCOPLIB"
-- ],
-- [DEFINE_HAS_SCOPLIB_LIB=""
-- if test "x$with_scoplib" != xcheck; then
-- AC_MSG_FAILURE([Test for ScopLib failed. Use --with-scoplib to specify libscoplib path.])
-- fi
-- ])
-- ])
--dnl Offer --with-gmp-prefix.
-- AC_ARG_WITH(gmp-prefix,
-- AC_HELP_STRING([--with-gmp-prefix=DIR],
-- [DIR Location of GMP package (only headers are needed)]),
-- [CPPFLAGS="${CPPFLAGS} -I$withval/include";
-- LDFLAGS="${LDFLAGS} -L$withval/lib";
-- ])
--dnl Offer --with-isl.
-- AC_ARG_WITH(isl,
-- AC_HELP_STRING([--with-isl=DIR],
-- [DIR Location of Isl package]),
-- [with_isl=$withval;
-- CPPFLAGS="${CPPFLAGS} -I$withval/include";
-- LDFLAGS="${LDFLAGS} -L$withval/lib"
-- ],
-- [with_isl=check])
--dnl Check for isl existence.
-- AS_IF([test "x$with_isl" != xno],
-- [AC_SEARCH_LIBS([isl_version], [isl],
-- [LIBS="-lisl $LIBS";
-- DEFINE_HAS_ISL_LIB="# define CANDL_SUPPORTS_ISL"
-- ],
-- [DEFINE_HAS_ISL_LIB=""
-- if test "x$with_isl" != xcheck; then
-- AC_MSG_FAILURE([Test for Isl failed. Use --with-isl to specify libisl path.])
-- fi
-- ])
-- ])
--])
--
--
-#diff --git a/autogen.sh b/autogen.sh
-#index b67de1f..c27fa40 100755
-#--- a/autogen.sh
-#+++ b/autogen.sh
-#@@ -1,5 +1,8 @@
-#-#! /bin/sh
-#-
-#-aclocal -I autoconf
-#-libtoolize --force --copy
-#-autoreconf -vfi
-#+#!/bin/sh
-#+autoreconf -i
-#+if test -f osl/autogen.sh; then
-#+ (cd osl; ./autogen.sh)
-#+fi
-#+if test -f piplib/autogen.sh; then
-#+ (cd piplib; ./autogen.sh)
-#+fi
-diff --git a/candl-config.cmake b/candl-config.cmake
-new file mode 100644
-index 0000000..c1047d0
---- /dev/null
-+++ b/candl-config.cmake
-@@ -0,0 +1,25 @@
-+# Try to find the candl library
-+
-+# CANDL_FOUND - System has candl lib
-+# CANDL_INCLUDE_DIR - The candl include directory
-+# CANDL_LIBRARY - Library needed to use candl
-+
-+
-+if (CANDL_INCLUDE_DIR AND CANDL_LIBRARY)
-+ # Already in cache, be silent
-+ set(CANDL_FIND_QUIETLY TRUE)
-+endif()
-+
-+find_path(CANDL_INCLUDE_DIR NAMES candl/candl.h)
-+find_library(CANDL_LIBRARY NAMES candl)
-+
-+if (CANDL_LIBRARY AND CANDL_INCLUDE_DIR)
-+ message(STATUS "Library candl found =) ${CANDL_LIBRARY}")
-+else()
-+ message(STATUS "Library candl not found =(")
-+endif()
-+
-+include(FindPackageHandleStandardArgs)
-+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CANDL DEFAULT_MSG CANDL_INCLUDE_DIR CANDL_LIBRARY)
-+
-+mark_as_advanced(CANDL_INCLUDE_DIR CANDL_LIBRARY)
-diff --git a/configure.ac b/configure.ac
-new file mode 100644
-index 0000000..03c9ce4
---- /dev/null
-+++ b/configure.ac
-@@ -0,0 +1,320 @@
-+dnl /**-------------------------------------------------------------------**
-+dnl ** CAnDL **
-+dnl **-------------------------------------------------------------------**
-+dnl ** configure.in **
-+dnl **-------------------------------------------------------------------**
-+dnl ** First version: september 8th 2003 **
-+dnl **-------------------------------------------------------------------**/
-+dnl
-+dnl /**************************************************************************
-+dnl * CAnDL : the Chunky Analyser for Dependences in Loops (experimental) *
-+dnl ***************************************************************************
-+dnl * *
-+dnl * Copyright (C) 2003-2008 Cedric Bastoul *
-+dnl * *
-+dnl * This is free software; you can redistribute it and/or modify it under *
-+dnl * the terms of the GNU General Public License as published by the Free *
-+dnl * Software Foundation; either version 2 of the License, or (at your *
-+dnl * option) any later version. *
-+dnl * *
-+dnl * This software is distributed in the hope that it will be useful, but *
-+dnl * WITHOUT ANY WARRANTY; without even the implied warranty of *
-+dnl * MERCHANTABILITYor FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
-+dnl * General Public License for more details. *
-+dnl * *
-+dnl * You should have received a copy of the GNU General Public License along *
-+dnl * with software; if not, write to the Free Software Foundation, Inc., *
-+dnl * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-+dnl * *
-+dnl * CAnDL, the Chunky Dependence Analyser *
-+dnl * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-+dnl * *
-+dnl ***************************************************************************/
-+
-+m4_define([version_major], [0])
-+m4_define([version_minor], [0])
-+m4_define([version_revision], [1])
-+
-+AC_PREREQ(2.53)
-+
-+dnl Fill here the @bug email adress.
-+AC_INIT([candl], [0.6.2], [cedric.bastoul at inria.fr,pouchet at cse.ohio-state.edu])
-+
-+AC_CONFIG_SRCDIR([include/candl/candl.h])
-+
-+dnl Put as most as possible configuration files to an auxialiry
-+dnl directory.
-+AC_CONFIG_AUX_DIR(autoconf)
-+AC_CONFIG_MACRO_DIR([m4])
-+
-+dnl Initialize automake. Here, a special tar version that enables
-+dnl (very) long filenames.
-+#AM_INIT_AUTOMAKE([1.9 tar-ustar no-define foreign dist-bzip2])
-+AM_INIT_AUTOMAKE([foreign])
-+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
-+
-+dnl default version
-+BITS="MP"
-+CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_MP
-+
-+
-+dnl /**************************************************************************
-+dnl * Checking *
-+dnl **************************************************************************/
-+
-+
-+dnl Checks for programs.
-+AC_PROG_CC
-+AC_PROG_LN_S
-+AC_PROG_MAKE_SET
-+AC_CHECK_PROG(CD, cd)
-+AC_PROG_INSTALL
-+AC_PROG_LIBTOOL
-+AC_CHECK_PROGS(DOXYGEN,doxygen,doxygen)
-+
-+AX_CC_MAXOPT
-+AC_SUBST(CFLAGS_WARN)
-+AX_CFLAGS_WARN_ALL(CFLAGS_WARN)
-+
-+dnl Checks for typedefs, structures, and compiler characteristics.
-+AC_C_CONST
-+AC_TYPE_SIZE_T
-+
-+dnl Checks for header files.
-+AC_HEADER_STDC
-+AC_CHECK_HEADERS([errno.h stddef.h stdlib.h string.h strings.h unistd.h])
-+
-+dnl Checks for library functions.
-+AC_CHECK_FUNCS(strtol)
-+
-+
-+dnl /**************************************************************************
-+dnl * Option setting *
-+dnl **************************************************************************/
-+
-+dnl /**************************************************************************
-+dnl * Where is the OpenScop Library? *
-+dnl **************************************************************************/
-+
-+AX_SUBMODULE(osl,system|build|bundled,system)
-+
-+AC_SUBST(OSL_CPPFLAGS)
-+AC_SUBST(OSL_LDFLAGS)
-+AC_SUBST(OSL_LIBS)
-+case "$with_osl" in
-+bundled)
-+ OSL_CPPFLAGS="-I$srcdir/osl/include -Iosl/include"
-+ OSL_LIBS="$srcdir/osl/libosl.la"
-+ ;;
-+build)
-+ OSL_CPPFLAGS="-I$osl_srcdir/include -I$with_osl_builddir/include"
-+ OSL_LIBS="$with_osl_builddir/libosl.la"
-+ ;;
-+system)
-+ if test "x$with_osl_prefix" != "x"; then
-+ OSL_CPPFLAGS="-I$with_osl_prefix/include"
-+ fi
-+ if test "x$with_osl_exec_prefix" != "x"; then
-+ OSL_LDFLAGS="-L$with_osl_exec_prefix/lib"
-+ fi
-+ OSL_LIBS="$with_osl_prefix/lib/libosl.la -losl"
-+esac
-+AM_CONDITIONAL(BUNDLED_OSL, test $with_osl = bundled)
-+
-+
-+
-+dnl GMP
-+
-+dnl Some default values cause I'm not sure whether autoconf set them, while
-+dnl documentation says it does...
-+gmp_package="yes"
-+gmp_include_package="yes"
-+gmp_library_package="yes"
-+
-+NEED_MP="no"
-+
-+dnl --with-gmp=gmp-path
-+AC_ARG_WITH(gmp,
-+ [ --with-gmp=DIR DIR where the gmp package is installed],
-+ [ echo "Package gmp : $withval" &&
-+ gmp_package=$withval &&
-+ GMP_INC=$gmp_package/include &&
-+ GMP_LIB=$gmp_package/lib &&
-+ CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_MP &&
-+ NEED_MP="yes"])
-+
-+AC_ARG_WITH(gmp-include,
-+ [ --with-gmp-include=DIR DIR where gmp.h is installed],
-+ [ echo "Package gmp-include : $withval" &&
-+ gmp_include_package=$withval &&
-+ GMP_INC=$gmp_include_package &&
-+ CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_MP &&
-+ NEED_MP="yes"])
-+
-+AC_ARG_WITH(gmp-library,
-+ [ --with-gmp-library=DIR DIR where the gmp library is installed],
-+ [ echo "Package gmp-library : $withval" &&
-+ gmp_library_package=$withval &&
-+ GMP_LIB=$gmp_library_package &&
-+ CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_MP &&
-+ NEED_MP="yes"])
-+
-+AC_ARG_ENABLE(int-version,
-+ [ --enable-int-version 'int' (32 bits) version is built],
-+ [ echo "Package int : $enableval" &&
-+ BITS="32" &&
-+ CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_LONG])
-+
-+AC_ARG_ENABLE(llint-version,
-+ [ --enable-llint-version 'long long int' (64 bits) version is built],
-+ [ echo "Package long long int : $enableval" &&
-+ BITS="64" &&
-+ CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_LONGLONG])
-+
-+AC_ARG_ENABLE(mp-version,
-+ [ --enable-mp-version 'MP' (multiple precision) version is built],
-+ [ echo "Package mp : $enableval" &&
-+ BITS="MP" &&
-+ CPPFLAGS=-DCANDL_LINEAR_VALUE_IS_MP &&
-+ NEED_MP="yes"])
-+
-+AC_ARG_ENABLE(piplib-hybrid,
-+ [ --enable-piplib-hybrid Link with piplib-hybrid],
-+ [ echo "Piplib-hybrid support : $enableval" &&
-+ if test "x$enableval" = "xyes"; then
-+ CPPFLAGS=-DCANDL_HAS_PIPLIB_HYBRID
-+ fi])
-+
-+
-+dnl /**************************************************************************
-+dnl * Where is the PipLib Library? *
-+dnl **************************************************************************/
-+
-+AX_SUBMODULE(piplib,system|build|bundled,system)
-+
-+AC_SUBST(PIPLIB_CPPFLAGS)
-+AC_SUBST(PIPLIB_LDFLAGS)
-+AC_SUBST(PIPLIB_LIBS)
-+case "$with_piplib" in
-+bundled)
-+ PIPLIB_CPPFLAGS="-I$srcdir/piplib/include -Ipiplib/include"
-+ PIPLIB_LIBS="$srcdir/piplib/libpiplib$BITS.la"
-+ ;;
-+build)
-+ PIPLIB_CPPFLAGS="-I$piplib_srcdir/include -I$with_piplib_builddir/include"
-+ PIPLIB_LIBS="$with_piplib_builddir/libpiplib$BITS.la"
-+ ;;
-+system)
-+ if test "x$with_piplib_prefix" != "x"; then
-+ PIPLIB_CPPFLAGS="-I$with_piplib_prefix/include"
-+ fi
-+ if test "x$with_piplib_exec_prefix" != "x"; then
-+ PIPLIB_LDFLAGS="-L$with_piplib_exec_prefix/lib"
-+ fi
-+ PIPLIB_LIBS="$with_piplib_prefix/lib/libpiplib$BITS.la -lpiplib$BITS"
-+esac
-+AM_CONDITIONAL(BUNDLED_PIPLIB, test $with_piplib = bundled)
-+
-+
-+
-+dnl /**************************************************************************
-+dnl * Where is GMP? *
-+dnl **************************************************************************/
-+
-+
-+dnl Checking for gmp
-+AC_MSG_CHECKING(whether gmp works)
-+if test "$gmp_package" = "no"; then
-+ echo "GMP package not defined"
-+ AC_MSG_RESULT(no)
-+ TO_BUILD_MP=""
-+else
-+ if test "$NEED_MP" = "no"; then
-+ echo "Mode normal GMP"
-+ TO_BUILD="$TO_BUILD MP"
-+ AC_CHECK_HEADER(gmp.h,
-+ [AC_SEARCH_LIBS([__gmpz_init], [gmp],
-+ [LIBS="$LIBS -lgmp"],
-+ [echo "Can't find gmp library." &&
-+ echo "MP version will not be built." &&
-+ TO_BUILD_MP=""])],
-+ [echo "Can't find gmp headers." &&
-+ echo "MP version will not be built." &&
-+ TO_BUILD_MP=""])
-+ else
-+ dnl Default given by --with-X is "yes", --without-X is "no". We also
-+ dnl initialized manually all gmp_package* variables to "yes" (thus they are
-+ dnl supposed to be "yes" except if the user set them himself).
-+ if test "$gmp_package" != "yes" ; then
-+ echo "(GMP path has been set by user)"
-+ GMP_DIR=$gmp_package
-+ dnl Useful for AC_CHECK_X to find what we want.
-+ CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
-+ LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
-+ fi
-+
-+ if test "$gmp_include_package" != "yes" ; then
-+ CPPFLAGS="-I$GMP_INC $CPPFLAGS"
-+ fi
-+
-+ if test "$gmp_library_package" != "yes" ; then
-+ LDFLAGS="-L$GMP_LIB $LDFLAGS"
-+ fi
-+
-+ AC_CHECK_HEADER(gmp.h,
-+ [],
-+ [AC_MSG_ERROR(Can't find gmp headers.)])
-+ AC_SEARCH_LIBS([__gmpz_init], [gmp],
-+ [LIBS="$LIBS -lgmp"],
-+ [AC_MSG_ERROR(Can't find gmp library.)])
-+
-+ AC_MSG_RESULT(yes)
-+ fi
-+fi
-+
-+dnl /**************************************************************************
-+dnl * Substitutions *
-+dnl **************************************************************************/
-+
-+
-+dnl Substitutions to do.
-+AC_SUBST(BITS)
-+AC_SUBST(DEFINE_HAS_ISL_LIB)
-+AC_SUBST(ac_aux_dir)
-+AC_SUBST(abs_top_srcdir)
-+
-+
-+dnl Configure Makefiles.
-+AC_CONFIG_FILES([
-+ Makefile
-+ doc/Makefile
-+ doc/Doxyfile
-+ include/candl/macros.h
-+ include/candl/piplib.h
-+ tests/Makefile
-+ ],
-+ [test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in])
-+
-+#if test $with_piplib = system; then
-+# AC_CONFIG_SUBDIRS(piplib)
-+#fi
-+if test $with_osl = bundled; then
-+ AC_CONFIG_SUBDIRS(osl)
-+fi
-+
-+dnl forcing candl to use local libcandl.la
-+dnl if --prefix is not specified
-+CANDL_LIBS="$srcdir/libcandl.la -lcandl"
-+AC_SUBST(CANDL_LIBS)
-+
-+
-+
-+AC_OUTPUT
-+
-+echo " /*-----------------------------------------------*"
-+echo " * Candl configuration is OK *"
-+echo " *-----------------------------------------------*/"
-+echo "It appears that your system is OK to start Candl compilation. You need"
-+echo "now to type \"make\". Lastly type \"make install\" to install Candl on"
-+echo "your system (log as root if necessary)."
-+
-diff --git a/configure.in b/configure.in
-deleted file mode 100644
-index f6cf7ad..0000000
---- a/configure.in
-+++ /dev/null
-@@ -1,233 +0,0 @@
--dnl /**-------------------------------------------------------------------**
--dnl ** CAnDL **
--dnl **-------------------------------------------------------------------**
--dnl ** configure.in **
--dnl **-------------------------------------------------------------------**
--dnl ** First version: september 8th 2003 **
--dnl **-------------------------------------------------------------------**/
--dnl
--dnl /**************************************************************************
--dnl * CAnDL : the Chunky Analyser for Dependences in Loops (experimental) *
--dnl ***************************************************************************
--dnl * *
--dnl * Copyright (C) 2003-2008 Cedric Bastoul *
--dnl * *
--dnl * This is free software; you can redistribute it and/or modify it under *
--dnl * the terms of the GNU General Public License as published by the Free *
--dnl * Software Foundation; either version 2 of the License, or (at your *
--dnl * option) any later version. *
--dnl * *
--dnl * This software is distributed in the hope that it will be useful, but *
--dnl * WITHOUT ANY WARRANTY; without even the implied warranty of *
--dnl * MERCHANTABILITYor FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
--dnl * General Public License for more details. *
--dnl * *
--dnl * You should have received a copy of the GNU General Public License along *
--dnl * with software; if not, write to the Free Software Foundation, Inc., *
--dnl * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
--dnl * *
--dnl * CAnDL, the Chunky Dependence Analyser *
--dnl * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
--dnl * *
--dnl ***************************************************************************/
--
--
--AC_PREREQ(2.13)
--dnl Fill here the @bug email adress.
--AC_INIT([candl], [0.6.2], [cedric.bastoul at inria.fr,pouchet at cse.ohio-state.edu])
--dnl A common file, which serve as a test.
--AC_CONFIG_SRCDIR([include/candl/program.h])
--dnl Put as most as possible configuration files to an auxialiry
--dnl directory.
--AC_CONFIG_AUX_DIR([autoconf])
--dnl Initialize automake. Here, a special tar version that enables
--dnl (very) long filenames.
--AM_INIT_AUTOMAKE([1.9 tar-ustar no-define foreign dist-bzip2])
--
--
--dnl default version
--BITS="64"
--CPPFLAGS=-DLINEAR_VALUE_IS_LONGLONG
--
--
--dnl /**************************************************************************
--dnl * Checking *
--dnl **************************************************************************/
--
--
--dnl Checks for programs.
--AC_PROG_CC
--AC_PROG_LN_S
--AC_PROG_MAKE_SET
--AC_CHECK_PROG(CD, cd)
--AC_PROG_LIBTOOL
--AC_CHECK_PROGS(DOXYGEN,doxygen,doxygen)
--
--dnl Checks for typedefs, structures, and compiler characteristics.
--AC_C_CONST
--AC_TYPE_SIZE_T
--
--dnl Checks for header files.
--AC_HEADER_STDC
--AC_CHECK_HEADERS([errno.h stddef.h stdlib.h string.h strings.h unistd.h])
--
--dnl Checks for library functions.
--AC_CHECK_FUNCS(strtol)
--
--
--dnl /**************************************************************************
--dnl * Option setting *
--dnl **************************************************************************/
--
--dnl Some default values cause I'm not sure whether autoconf set them, while
--dnl documentation says it does...
--gmp_package="yes"
--gmp_include_package="yes"
--gmp_library_package="yes"
--
--NEED_MP="no"
--
--dnl --with-gmp=gmp-path
--AC_ARG_WITH(gmp,
-- [ --with-gmp=DIR DIR where the gmp package is installed],
-- [ echo "Package gmp : $withval" &&
-- gmp_package=$withval &&
-- GMP_INC=$gmp_package/include &&
-- GMP_LIB=$gmp_package/lib &&
-- CPPFLAGS=-DLINEAR_VALUE_IS_MP &&
-- NEED_MP="yes"])
--
--AC_ARG_WITH(gmp-include,
-- [ --with-gmp-include=DIR DIR where gmp.h is installed],
-- [ echo "Package gmp-include : $withval" &&
-- gmp_include_package=$withval &&
-- GMP_INC=$gmp_include_package &&
-- CPPFLAGS=-DLINEAR_VALUE_IS_MP &&
-- NEED_MP="yes"])
--
--AC_ARG_WITH(gmp-library,
-- [ --with-gmp-library=DIR DIR where the gmp library is installed],
-- [ echo "Package gmp-library : $withval" &&
-- gmp_library_package=$withval &&
-- GMP_LIB=$gmp_library_package &&
-- CPPFLAGS=-DLINEAR_VALUE_IS_MP &&
-- NEED_MP="yes"])
--
--AC_ARG_ENABLE(int-version,
-- [ --enable-int-version 'int' (32 bits) version is built],
-- [ echo "Package int : $enableval" &&
-- BITS="32" &&
-- CPPFLAGS=-DLINEAR_VALUE_IS_LONG])
--
--AC_ARG_ENABLE(llint-version,
-- [ --enable-llint-version 'long long int' (64 bits) version is built],
-- [ echo "Package long long int : $enableval" &&
-- BITS="64" &&
-- CPPFLAGS=-DLINEAR_VALUE_IS_LONGLONG])
--
--AC_ARG_ENABLE(mp-version,
-- [ --enable-mp-version 'MP' (multiple precision) version is built],
-- [ echo "Package mp : $enableval" &&
-- BITS="MP" &&
-- CPPFLAGS=-DLINEAR_VALUE_IS_MP &&
-- NEED_MP="yes"])
--
--AC_ARG_ENABLE(piplib-hybrid,
-- [ --enable-piplib-hybrid Link with piplib-hybrid],
-- [ echo "Piplib-hybrid support : $enableval" &&
-- if test "x$enableval" = "xyes"; then
-- CPPFLAGS=-DCANDL_HAS_PIPLIB_HYBRID
-- fi])
--
--
--dnl /**************************************************************************
--dnl * Where is GMP? *
--dnl **************************************************************************/
--
--
--dnl Checking for gmp
--AC_MSG_CHECKING(whether gmp works)
--if test "$gmp_package" = "no"; then
-- echo "GMP package not defined"
-- AC_MSG_RESULT(no)
-- TO_BUILD_MP=""
--else
-- if test "$NEED_MP" = "no"; then
-- echo "Mode normal GMP"
-- TO_BUILD="$TO_BUILD MP"
-- AC_CHECK_HEADER(gmp.h,
-- [AC_SEARCH_LIBS([__gmpz_init], [gmp],
-- [LIBS="$LIBS -lgmp"],
-- [echo "Can't find gmp library." &&
-- echo "MP version will not be built." &&
-- TO_BUILD_MP=""])],
-- [echo "Can't find gmp headers." &&
-- echo "MP version will not be built." &&
-- TO_BUILD_MP=""])
-- else
-- dnl Default given by --with-X is "yes", --without-X is "no". We also
-- dnl initialized manually all gmp_package* variables to "yes" (thus they are
-- dnl supposed to be "yes" except if the user set them himself).
--
-- if test "$gmp_package" != "yes" ; then
-- echo "(GMP path has been set by user)"
-- GMP_DIR=$gmp_package
-- dnl Useful for AC_CHECK_X to find what we want.
-- CPPFLAGS="-I$GMP_DIR/include $CPPFLAGS"
-- LDFLAGS="-L$GMP_DIR/lib $LDFLAGS"
-- fi
--
-- if test "$gmp_include_package" != "yes" ; then
-- CPPFLAGS="-I$GMP_INC $CPPFLAGS"
-- fi
--
-- if test "$gmp_library_package" != "yes" ; then
-- LDFLAGS="-L$GMP_LIB $LDFLAGS"
-- fi
--
-- AC_CHECK_HEADER(gmp.h,
-- [],
-- [AC_MSG_ERROR(Can't find gmp headers.)])
-- AC_SEARCH_LIBS([__gmpz_init], [gmp],
-- [LIBS="$LIBS -lgmp"],
-- [AC_MSG_ERROR(Can't find gmp library.)])
--
-- AC_MSG_RESULT(yes)
-- fi
--fi
--
--CANDL_ARG_LIBS_DEPENDENCIES
--
--
--
--dnl /**************************************************************************
--dnl * Substitutions *
--dnl **************************************************************************/
--
--
--dnl Substitutions to do.
--AC_SUBST(BITS)
--AC_SUBST(DEFINE_HAS_SCOPLIB_LIB)
--AC_SUBST(DEFINE_HAS_ISL_LIB)
--AC_SUBST(ac_aux_dir)
--
--dnl Configure Makefiles.
--AC_CONFIG_FILES([
-- Makefile
-- doc/Makefile
-- doc/Doxyfile
-- include/Makefile
-- include/candl/candl.h
-- source/Makefile
-- tests/Makefile
-- ],
-- [test -z "$CONFIG_HEADERS" || echo timestamp > source/stamp-h.in])
--
--AC_OUTPUT
--
--echo " /*-----------------------------------------------*"
--echo " * Candl configuration is OK *"
--echo " *-----------------------------------------------*/"
--echo "It appears that your system is OK to start Candl compilation. You need"
--echo "now to type \"make\". Lastly type \"make install\" to install Candl on"
--echo "your system (log as root if necessary)."
-diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
-index e172bda..510d8f1 100644
---- a/doc/Doxyfile.in
-+++ b/doc/Doxyfile.in
-@@ -478,7 +478,8 @@ WARN_LOGFILE =
- # with spaces.
-
- INPUT = @top_srcdir@/source \
-- @top_srcdir@/include/candl
-+ @top_srcdir@/include/candl \
-+ include/candl/macros.h
-
- # This tag can be used to specify the character encoding of the source files that
- # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
-diff --git a/get_submodules.sh b/get_submodules.sh
-new file mode 100755
-index 0000000..94842b6
---- /dev/null
-+++ b/get_submodules.sh
-@@ -0,0 +1,9 @@
-+#!/bin/bash
-+git submodule init
-+git submodule update
-+if test -f osl/autogen.sh; then
-+ (cd osl; ./autogen.sh && ./configure)
-+fi
-+if test -f piplib/autogen.sh; then
-+ (cd piplib; ./autogen.sh && ./configure)
-+fi
-diff --git a/include/Makefile.am b/include/Makefile.am
-deleted file mode 100644
-index ed48dcd..0000000
---- a/include/Makefile.am
-+++ /dev/null
-@@ -1,54 +0,0 @@
--#
--# /**-------------------------------------------------------------------**
--# ** CAnDL **
--# **-------------------------------------------------------------------**
--# ** Makefile.am **
--# **-------------------------------------------------------------------**
--# ** First version: september 8th 2003 **
--# **-------------------------------------------------------------------**/
--#
--#/*****************************************************************************
--# * CAnDL : the Chunky Analyser for Dependences in Loops (experimental) *
--# *****************************************************************************
--# * *
--# * Copyright (C) 2003-2008 Cedric Bastoul *
--# * *
--# * This is free software; you can redistribute it and/or modify it under the *
--# * terms of the GNU General Public License as published by the Free Software *
--# * Foundation; either version 2 of the License, or (at your option) any *
--# * later version. *
--# * *
--# * This software is distributed in the hope that it will be useful, but *
--# * WITHOUT ANY WARRANTY; without even the implied warranty of *
--# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
--# * Public License for more details. *
--# * *
--# * You should have received a copy of the GNU General Public License along *
--# * with software; if not, write to the Free Software Foundation, Inc., *
--# * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
--# * *
--# * CAnDL, the Chunky Dependence Analyser *
--# * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
--# * *
--# *****************************************************************************/
--
--
--#############################################################################
--SUBDIRS =
--
--#############################################################################
--MAINTAINERCLEANFILES = Makefile.in
--
--#############################################################################
--
--pkginclude_HEADERS = \
-- candl/candl.h \
-- candl/dependence.h \
-- candl/ddv.h \
-- candl/matrix.h \
-- candl/options.h \
-- candl/piplib-wrapper.h \
-- candl/program.h \
-- candl/pruning.h \
-- candl/statement.h \
-- candl/violation.h
-diff --git a/include/candl/candl.h b/include/candl/candl.h
-new file mode 100644
-index 0000000..926511f
---- /dev/null
-+++ b/include/candl/candl.h
-@@ -0,0 +1,50 @@
-+
-+ /**------ ( ----------------------------------------------------------**
-+ ** )\ CAnDL **
-+ **----- / ) --------------------------------------------------------**
-+ ** ( * ( candl.h **
-+ **---- \#/ --------------------------------------------------------**
-+ ** .-"#'-. First version: september 8th 2003 **
-+ **--- |"-.-"| -------------------------------------------------------**
-+ | |
-+ | |
-+ ******** | | *************************************************************
-+ * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-+ ******************************************************************************
-+ * *
-+ * Copyright (C) 2003-2008 Cedric Bastoul *
-+ * *
-+ * This is free software; you can redistribute it and/or modify it under the *
-+ * terms of the GNU Lesser General Public License as published by the Free *
-+ * Software Foundation; either version 3 of the License, or (at your option) *
-+ * any later version. *
-+ * *
-+ * This software is distributed in the hope that it will be useful, but *
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-+ * for more details. *
-+ * *
-+ * You should have received a copy of the GNU Lesser General Public License *
-+ * along with software; if not, write to the Free Software Foundation, Inc., *
-+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-+ * *
-+ * CAnDL, the Chunky Dependence Analyser *
-+ * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-+ * *
-+ ******************************************************************************/
-+
-+#ifndef CANDL_H
-+#define CANDL_H
-+
-+# include <candl/ddv.h>
-+# include <candl/dependence.h>
-+# include <candl/macros.h>
-+# include <candl/matrix.h>
-+# include <candl/options.h>
-+# include <candl/piplib-wrapper.h>
-+# include <candl/scop.h>
-+# include <candl/statement.h>
-+# include <candl/util.h>
-+# include <candl/violation.h>
-+
-+#endif
-diff --git a/include/candl/candl.h.in b/include/candl/candl.h.in
-deleted file mode 100644
-index 187981e..0000000
---- a/include/candl/candl.h.in
-+++ /dev/null
-@@ -1,160 +0,0 @@
--
-- /**------ ( ----------------------------------------------------------**
-- ** )\ CAnDL **
-- **----- / ) --------------------------------------------------------**
-- ** ( * ( candl.h **
-- **---- \#/ --------------------------------------------------------**
-- ** .-"#'-. First version: september 8th 2003 **
-- **--- |"-.-"| -------------------------------------------------------**
-- | |
-- | |
-- ******** | | *************************************************************
-- * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-- ******************************************************************************
-- * *
-- * Copyright (C) 2003-2008 Cedric Bastoul *
-- * *
-- * This is free software; you can redistribute it and/or modify it under the *
-- * terms of the GNU Lesser General Public License as published by the Free *
-- * Software Foundation; either version 3 of the License, or (at your option) *
-- * any later version. *
-- * *
-- * This software is distributed in the hope that it will be useful, but *
-- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-- * for more details. *
-- * *
-- * You should have received a copy of the GNU Lesser General Public License *
-- * along with software; if not, write to the Free Software Foundation, Inc., *
-- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-- * *
-- * CAnDL, the Chunky Dependence Analyser *
-- * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-- * *
-- ******************************************************************************/
--
--
--/******************************************************************************
-- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM candl.h.in BY configure *
-- ******************************************************************************/
--
--
--#ifndef CANDL_H
--# define CANDL_H
--
--# define CANDL_RELEASE "@PACKAGE_VERSION@"
--# define CANDL_VERSION "@BITS@"
-- at DEFINE_HAS_SCOPLIB_LIB@
-- at DEFINE_HAS_ISL_LIB@
--
--
--# include <piplib/piplib at BITS@.h>
--# include <candl/options.h>
--# include <candl/matrix.h>
--# include <candl/statement.h>
--# include <candl/program.h>
--# include <candl/dependence.h>
--# include <candl/ddv.h>
--# include <candl/violation.h>
--# include <candl/pruning.h>
--
--# define CANDL_UNSET -1 /* Must be negative (we do use that property).
-- * All other constants have to be different.
-- */
--
--# define CANDL_RAW 1
--# define CANDL_WAR 2
--# define CANDL_WAW 3
--# define CANDL_RAR 4
--# define CANDL_RAW_SCALPRIV 5
--
--# define CANDL_ASSIGNMENT 1
--# define CANDL_P_REDUCTION 2
--# define CANDL_M_REDUCTION 3
--# define CANDL_T_REDUCTION 4
--
--# define CANDL_EQUAL 1
--# define CANDL_POSIT 2
--# define CANDL_LATER 3
--# define CANDL_NEVER 4
--
--# define CANDL_NB_INFOS 3
--
--# define CANDL_MAX_STRING 2048
--# define CANDL_TEMP_OUTPUT "candl.temp"
--
--/* Useful macros. */
--# define CANDL_max(x,y) ((x) > (y)? (x) : (y))
--# define CANDL_min(x,y) ((x) < (y)? (x) : (y))
--
--# define CANDL_FAIL(msg) { fprintf(stderr, "[Candl] " msg "\n"); exit(1); }
--
--/******************************************************************************
-- * FORMAT *
-- ******************************************************************************/
--#if defined(LINEAR_VALUE_IS_LONGLONG)
--#define CANDL_FMT "%4lld "
--#elif defined(LINEAR_VALUE_IS_LONG)
--#define CANDL_FMT "%4ld "
--#else /* GNUMP */
--#define CANDL_FMT "%4s"
--#endif
--
--/******************************************************************************
-- * CANDL GMP MACROS *
-- ******************************************************************************/
--#ifdef LINEAR_VALUE_IS_MP
--/* Basic Macros */
--#define CANDL_init(val) (mpz_init((val)))
--#define CANDL_assign(v1,v2) (mpz_set((v1),(v2)))
--#define CANDL_set_si(val,i) (mpz_set_si((val),(i)))
--#define CANDL_get_si(val) (mpz_get_si((val)))
--#define CANDL_clear(val) (mpz_clear((val)))
--#define CANDL_print(Dst,fmt,val) { char *str; \
-- str = mpz_get_str(0,10,(val)); \
-- fprintf((Dst),(fmt),str); free(str); \
-- }
--
--/* Boolean operators on 'Value' or 'Entier' */
--#define CANDL_eq(v1,v2) (mpz_cmp((v1),(v2)) == 0)
--#define CANDL_ne(v1,v2) (mpz_cmp((v1),(v2)) != 0)
--
--/* Binary operators on 'Value' or 'Entier' */
--#define CANDL_increment(ref,val) (mpz_add_ui((ref),(val),1))
--#define CANDL_decrement(ref,val) (mpz_sub_ui((ref),(val),1))
--#define CANDL_subtract(ref,val1,val2) (mpz_sub((ref),(val1),(val2)))
--#define CANDL_oppose(ref,val) (mpz_neg((ref),(val)))
--
--/* Conditional operations on 'Value' or 'Entier' */
--#define CANDL_zero_p(val) (mpz_sgn(val) == 0)
--#define CANDL_notzero_p(val) (mpz_sgn(val) != 0)
--
--/******************************************************************************
-- * CANDL BASIC TYPES MACROS *
-- ******************************************************************************/
--#else
--/* Basic Macros */
--#define CANDL_init(val) ((val) = 0)
--#define CANDL_assign(v1,v2) ((v1) = (v2))
--#define CANDL_set_si(val,i) ((val) = (Entier)(i))
--#define CANDL_get_si(val) ((val))
--#define CANDL_clear(val) ((val) = 0)
--#define CANDL_print(Dst,fmt,val) (fprintf((Dst),(fmt),(val)))
--
--/* Boolean operators on 'Value' or 'Entier' */
--#define CANDL_eq(v1,v2) ((v1)==(v2))
--#define CANDL_ne(v1,v2) ((v1)!=(v2))
--
--/* Binary operators on 'Value' or 'Entier' */
--#define CANDL_increment(ref,val) ((ref) = (val)+(Entier)(1))
--#define CANDL_decrement(ref,val) ((ref) = (val)-(Entier)(1))
--#define CANDL_subtract(ref,val1,val2) ((ref) = (val1)-(val2))
--#define CANDL_oppose(ref,val) ((ref) = (-(val)))
--
--/* Conditional operations on 'Value' or 'Entier' */
--#define CANDL_zero_p(val) CANDL_eq(val,0)
--#define CANDL_notzero_p(val) CANDL_ne(val,0)
--
--#endif
--
--#endif // !CANDL_H
-diff --git a/include/candl/ddv.h b/include/candl/ddv.h
-index bbc97db..8ae9a61 100644
---- a/include/candl/ddv.h
-+++ b/include/candl/ddv.h
-@@ -38,26 +38,18 @@
- * \author Louis-Noel Pouchet
- */
-
--
- #ifndef CANDL_DDV_H
- # define CANDL_DDV_H
-
--
- # include <stdio.h>
--# include <candl/statement.h>
--# include <candl/matrix.h>
--# include <candl/program.h>
--# include <candl/options.h>
--# include <candl/dependence.h>
--
--
-
- # if defined(__cplusplus)
- extern "C"
- {
- # endif
-
--
-+struct osl_scop;
-+struct osl_dependence;
-
- /******************************************************************************
- * Dependence Distance structures *
-@@ -112,9 +104,6 @@ extern "C"
-
- typedef struct candl_ddv CandlDDV;
-
--
--
--
- /******************************************************************************
- * Memory deallocation function *
- ******************************************************************************/
-@@ -127,7 +116,6 @@ extern "C"
- CandlDDV*
- candl_ddv_malloc();
-
--
- /**
- * candl_ddv_alloc: Allocate a ddv for a loop of depth 'size'.
- *
-@@ -136,7 +124,6 @@ candl_ddv_malloc();
- CandlDDV*
- candl_ddv_alloc(int);
-
--
- /**
- * candl_ddv_free: Free a ddv.
- *
-@@ -145,7 +132,6 @@ candl_ddv_alloc(int);
- void
- candl_ddv_free(CandlDDV*);
-
--
- /**
- * candl_ddv_set_type_at: Set the type of a ddv component. Type is one of
- * '=', '>', '<', '*' or 'constant' as defined by the enum e_dv_type.
-@@ -173,12 +159,10 @@ candl_ddv_set_value_at(CandlDDV*, int, int);
- void
- candl_ddv_set_deptype(CandlDDV*, int);
-
--
- /******************************************************************************
- * Structure display function *
- ******************************************************************************/
-
--
- /**
- * candl_ddv_print: print a ddv.
- *
-@@ -186,7 +170,6 @@ candl_ddv_set_deptype(CandlDDV*, int);
- void
- candl_ddv_print(FILE*, CandlDDV*);
-
--
- /******************************************************************************
- * Processing functions *
- ******************************************************************************/
-@@ -199,7 +182,7 @@ candl_ddv_print(FILE*, CandlDDV*);
- *
- */
- CandlDDV*
--candl_ddv_extract_in_loop(CandlProgram*, CandlDependence*, int);
-+candl_ddv_extract_in_loop(struct osl_scop*, struct osl_dependence*, int);
-
- /**
- * candl_loops_are_permutable: output 1 if the 2 loops are permutable.
-@@ -207,10 +190,7 @@ candl_ddv_extract_in_loop(CandlProgram*, CandlDependence*, int);
- *
- */
- int
--candl_loops_are_permutable(CandlProgram* program, CandlDependence* deps,
-- int loop_id1, int loop_id2);
--
--
-+candl_loops_are_permutable(struct osl_scop*, struct osl_dependence*, int, int);
-
- # if defined(__cplusplus)
- }
-diff --git a/include/candl/dependence.h b/include/candl/dependence.h
-index 0f40e65..9205de4 100644
---- a/include/candl/dependence.h
-+++ b/include/candl/dependence.h
-@@ -33,153 +33,99 @@
- * *
- ******************************************************************************/
-
--
- #ifndef CANDL_DEPENDENCE_H
- # define CANDL_DEPENDENCE_H
-
--
- # include <stdio.h>
--# include <candl/statement.h>
--# include <candl/matrix.h>
--# include <candl/program.h>
- # include <candl/options.h>
-
--
--
--# define CANDL_ARRAY_BUFF_SIZE 2048
--# define CANDL_VAR_UNDEF 1
--# define CANDL_VAR_IS_DEF 2
--# define CANDL_VAR_IS_USED 3
--# define CANDL_VAR_IS_DEF_USED 4
--
-+# define CANDL_ARRAY_BUFF_SIZE 2048
-+# define CANDL_VAR_UNDEF 1
-+# define CANDL_VAR_IS_DEF 2
-+# define CANDL_VAR_IS_USED 3
-+# define CANDL_VAR_IS_DEF_USED 4
-
- # if defined(__cplusplus)
- extern "C"
- {
- # endif
-
--
--/**
-- * CandlDependence structure:
-- * this structure contains all the informations about a data dependence, it is
-- * also a node of the linked list of all dependences of the dependence graph.
-- */
--struct candldependence
--{ CandlStatement * source; /**< Pointer to source statement. */
-- CandlStatement * target; /**< Pointer to target statement. */
-- int depth; /**< Dependence level. */
-- int type; /**< Dependence type: a dependence from source
-- * to target can be:
-- * - CANDL_UNSET if the dependence type is
-- * still not set,
-- * - CANDL_RAW if source writes M and
-- * target read M (flow-dependence),
-- * - CANDL_WAR if source reads M and
-- * target writes M (anti-dependence),
-- * - CANDL_WAW if source writes M and
-- * target writes M too (output-dependence)
-- * - CANDL_RAR if source reads M and
-- * target reads M too (input-dependence).
-- */
-- int ref_source; /**< Position of source reference. */
-- int ref_target; /**< Position of target reference. */
-- CandlMatrix * domain; /**< Dependence polyhedron. */
--
-- void* usr; /**< User field, for library users
-- convenience. */
-- struct candldependence * next; /**< Pointer to next dependence */
--};
--typedef struct candldependence CandlDependence;
--typedef struct candldependence candl_dependence_t;
--typedef struct candldependence * candl_dependence_p;
--
--
--/******************************************************************************
-- * Structure display function *
-- ******************************************************************************/
--void candl_dependence_print_structure(FILE *, candl_dependence_p, int);
--void candl_dependence_print(FILE *, candl_dependence_p);
--void candl_dependence_pprint(FILE *, candl_dependence_p);
--void candl_dependence_view(candl_dependence_p);
--# ifdef CANDL_SUPPORTS_SCOPLIB
--CandlDependence* candl_dependence_read_from_scop(scoplib_scop_p, CandlProgram*);
--void candl_dependence_update_scop_with_deps(scoplib_scop_p, CandlDependence*);
--void candl_dependence_print_scop(FILE*, FILE*, CandlDependence*);
--# endif
-+struct osl_relation;
-+struct osl_statement;
-+struct osl_scop;
-+struct osl_dependence;
-
- #ifdef CANDL_SUPPORTS_ISL
--CandlDependence* candl_dependence_isl_simplify(CandlDependence*, CandlProgram*);
-+struct osl_dependence* candl_dependence_isl_simplify(struct osl_dependence*,
-+ struct osl_scop*);
- # endif
-
--
--/******************************************************************************
-- * Memory alloc/dealloc function *
-- ******************************************************************************/
--candl_dependence_p candl_dependence_malloc();
--void candl_dependence_free(candl_dependence_p);
--
-+/*+***************************************************************************
-+ * Structure display function *
-+ *****************************************************************************/
-+void candl_dependence_pprint(FILE*, struct osl_dependence*);
-+void candl_dependence_view(struct osl_dependence*);
-
- /******************************************************************************
- * Processing functions *
- ******************************************************************************/
--int candl_dependence_gcd_test(CandlStatement*,
-- CandlStatement*,
-- CandlMatrix*, int);
--int candl_dependence_check(CandlProgram *,
-- candl_dependence_p,
-- CandlOptions *);
--candl_dependence_p candl_dependence(CandlProgram *, CandlOptions *);
--
-+int candl_dependence_gcd_test(struct osl_statement*,
-+ struct osl_statement*,
-+ struct osl_relation*, int);
-+int candl_dependence_check(struct osl_scop*,
-+ struct osl_dependence*,
-+ candl_options_p);
-+struct osl_dependence* candl_dependence(struct osl_scop*, candl_options_p);
-+void candl_dependence_add_extension(struct osl_scop*,
-+ candl_options_p);
-+
-+/*+***************************************************************************
-+ * Memory allocation/deallocation function *
-+ *****************************************************************************/
-+void candl_dependence_init_fields(struct osl_scop*,
-+ struct osl_dependence*);
-
- /******************************************************************************
- * Scalar analysis functions *
- ******************************************************************************/
--int
--candl_dependence_var_is_scalar (candl_program_p, int);
--
--CandlStatement**
--candl_dependence_refvar_chain(candl_program_p, CandlStatement*, int, int);
--
--int
--candl_dependence_var_is_ref(CandlStatement*, int);
--
--int
--candl_dependence_check_domain_is_included(CandlStatement*, CandlStatement*,
-- CandlMatrix*, int);
--
--int
--candl_dependence_scalar_is_privatizable_at(candl_program_p, int, int);
--
--int
--candl_dependence_is_loop_carried (candl_program_p, CandlDependence*, int);
--
--void
--candl_dependence_prune_scalar_waw (candl_program_p, CandlOptions*,
-- CandlDependence**);
--
--void
--candl_dependence_prune_with_privatization (candl_program_p, CandlOptions*,
-- CandlDependence**);
--
--int
--candl_dependence_scalar_renaming(candl_program_p, CandlOptions*,
-- CandlDependence**);
--
--int
--candl_dependence_analyze_scalars(candl_program_p, CandlOptions*);
-+int candl_dependence_var_is_scalar(struct osl_scop*, int);
-+struct osl_statement** candl_dependence_refvar_chain(struct osl_scop*,
-+ struct osl_statement*, int, int);
-+int candl_dependence_var_is_ref(struct osl_statement*, int);
-+int candl_dependence_check_domain_is_included(
-+ struct osl_statement*,
-+ struct osl_statement*,
-+ struct osl_relation*, int);
-+int candl_dependence_scalar_is_privatizable_at(
-+ struct osl_scop*, int, int);
-+int candl_dependence_is_loop_carried(struct osl_scop*,
-+ struct osl_dependence*, int);
-+void candl_dependence_prune_scalar_waw(struct osl_scop*,
-+ candl_options_p,
-+ struct osl_dependence**);
-+void candl_dependence_prune_with_privatization(
-+ struct osl_scop*,
-+ candl_options_p,
-+ struct osl_dependence**);
-+int candl_dependence_scalar_renaming(struct osl_scop*,
-+ candl_options_p,
-+ struct osl_dependence**);
-+int candl_dependence_analyze_scalars(struct osl_scop*,
-+ candl_options_p);
-
- /******************************************************************************
- * Miscellaneous functions *
- ******************************************************************************/
--int
--candl_num_dependences(CandlDependence *candl_deps);
--
--void
--candl_compute_last_writer (CandlDependence *dep, CandlProgram *prog);
-+struct osl_relation* candl_dependence_get_relation_ref_source_in_dep(
-+ struct osl_dependence*);
-+struct osl_relation* candl_dependence_get_relation_ref_target_in_dep(
-+ struct osl_dependence*);
-+int candl_num_dependences(struct osl_dependence*);
-+void candl_compute_last_writer(struct osl_dependence*,
-+ struct osl_scop*);
-+struct osl_dependence* candl_dependence_prune_transitively_covered(
-+ struct osl_dependence*);
-
--CandlDependence*
--candl_dependence_prune_transitively_covered (CandlDependence* deps);
--
- # if defined(__cplusplus)
- }
- # endif
-diff --git a/include/candl/macros.h.in b/include/candl/macros.h.in
-new file mode 100644
-index 0000000..def4643
---- /dev/null
-+++ b/include/candl/macros.h.in
-@@ -0,0 +1,160 @@
-+
-+ /**------ ( ----------------------------------------------------------**
-+ ** )\ CAnDL **
-+ **----- / ) --------------------------------------------------------**
-+ ** ( * ( candl.h **
-+ **---- \#/ --------------------------------------------------------**
-+ ** .-"#'-. First version: september 8th 2003 **
-+ **--- |"-.-"| -------------------------------------------------------**
-+ | |
-+ | |
-+ ******** | | *************************************************************
-+ * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-+ ******************************************************************************
-+ * *
-+ * Copyright (C) 2003-2008 Cedric Bastoul *
-+ * *
-+ * This is free software; you can redistribute it and/or modify it under the *
-+ * terms of the GNU Lesser General Public License as published by the Free *
-+ * Software Foundation; either version 3 of the License, or (at your option) *
-+ * any later version. *
-+ * *
-+ * This software is distributed in the hope that it will be useful, but *
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-+ * for more details. *
-+ * *
-+ * You should have received a copy of the GNU Lesser General Public License *
-+ * along with software; if not, write to the Free Software Foundation, Inc., *
-+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-+ * *
-+ * CAnDL, the Chunky Dependence Analyser *
-+ * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-+ * *
-+ ******************************************************************************/
-+
-+
-+/******************************************************************************
-+ * THIS FILE HAS BEEN AUTOMATICALLY GENERATED FROM macros.h.in BY configure *
-+ ******************************************************************************/
-+
-+#ifndef CANDL_MACROS_H
-+# define CANDL_MACROS_H
-+
-+# define CANDL_EQUAL 1
-+# define CANDL_POSIT 2
-+# define CANDL_LATER 3
-+# define CANDL_NEVER 4
-+
-+# define CANDL_NB_INFOS 3
-+
-+# define CANDL_MAX_STRING 2048
-+# define CANDL_TEMP_OUTPUT "candl.temp"
-+
-+# define CANDL_RELEASE "@PACKAGE_VERSION@"
-+# define CANDL_VERSION "@BITS@"
-+ at DEFINE_HAS_ISL_LIB@
-+
-+/* Useful macros. */
-+# define CANDL_max(x,y) ((x) > (y)? (x) : (y))
-+# define CANDL_min(x,y) ((x) < (y)? (x) : (y))
-+
-+# define CANDL_info(msg) \
-+ do { \
-+ fprintf(stderr,"[Candl] Info: "msg" (%s).\n", __func__); \
-+ } while (0)
-+
-+# define CANDL_warning(msg) \
-+ do { \
-+ fprintf(stderr,"[Candl] Warning: "msg" (%s).\n", __func__); \
-+ } while (0)
-+
-+# define CANDL_error(msg) \
-+ do { \
-+ fprintf(stderr,"[Candl] Error: "msg" (%s).\n", __func__); \
-+ exit(1); \
-+ } while (0)
-+
-+# define CANDL_malloc(ptr, type, size) \
-+ do { \
-+ if (((ptr) = (type)malloc(size)) == NULL) \
-+ CANDL_error("memory overflow"); \
-+ } while (0)
-+
-+# define CANDL_realloc(ptr, type, size) \
-+ do { \
-+ if (((ptr) = (type)realloc(ptr, size)) == NULL) \
-+ CANDL_error("memory overflow"); \
-+ } while (0)
-+
-+# define CANDL_fail(msg) { fprintf(stderr, "[Candl] " msg "\n"); exit(1); }
-+
-+/******************************************************************************
-+ * FORMAT *
-+ ******************************************************************************/
-+#if defined(CANDL_LINEAR_VALUE_IS_LONGLONG)
-+#define CANDL_FMT "%4lld "
-+#elif defined(CANDL_LINEAR_VALUE_IS_LONG)
-+#define CANDL_FMT "%4ld "
-+#else /* GNUMP */
-+#define CANDL_FMT "%4s"
-+#endif
-+
-+/******************************************************************************
-+ * CANDL GMP MACROS *
-+ ******************************************************************************/
-+#ifdef CANDL_LINEAR_VALUE_IS_MP
-+/* Basic Macros */
-+#define CANDL_init(val) (mpz_init((val)))
-+#define CANDL_assign(v1,v2) (mpz_set((v1),(v2)))
-+#define CANDL_set_si(val,i) (mpz_set_si((val),(i)))
-+#define CANDL_get_si(val) (mpz_get_si((val)))
-+#define CANDL_clear(val) (mpz_clear((val)))
-+#define CANDL_print(Dst,fmt,val) { char *str; \
-+ str = mpz_get_str(0,10,(val)); \
-+ fprintf((Dst),(fmt),str); free(str); \
-+ }
-+
-+/* Boolean operators on 'Value' or 'Entier' */
-+#define CANDL_eq(v1,v2) (mpz_cmp((v1),(v2)) == 0)
-+#define CANDL_ne(v1,v2) (mpz_cmp((v1),(v2)) != 0)
-+
-+/* Binary operators on 'Value' or 'Entier' */
-+#define CANDL_increment(ref,val) (mpz_add_ui((ref),(val),1))
-+#define CANDL_decrement(ref,val) (mpz_sub_ui((ref),(val),1))
-+#define CANDL_subtract(ref,val1,val2) (mpz_sub((ref),(val1),(val2)))
-+#define CANDL_oppose(ref,val) (mpz_neg((ref),(val)))
-+
-+/* Conditional operations on 'Value' or 'Entier' */
-+#define CANDL_zero_p(val) (mpz_sgn(val) == 0)
-+#define CANDL_notzero_p(val) (mpz_sgn(val) != 0)
-+
-+/******************************************************************************
-+ * CANDL BASIC TYPES MACROS *
-+ ******************************************************************************/
-+#else
-+/* Basic Macros */
-+#define CANDL_init(val) ((val) = 0)
-+#define CANDL_assign(v1,v2) ((v1) = (v2))
-+#define CANDL_set_si(val,i) ((val) = (Entier)(i))
-+#define CANDL_get_si(val) ((val))
-+#define CANDL_clear(val) ((val) = 0)
-+#define CANDL_print(Dst,fmt,val) (fprintf((Dst),(fmt),(val)))
-+
-+/* Boolean operators on 'Value' or 'Entier' */
-+#define CANDL_eq(v1,v2) ((v1)==(v2))
-+#define CANDL_ne(v1,v2) ((v1)!=(v2))
-+
-+/* Binary operators on 'Value' or 'Entier' */
-+#define CANDL_increment(ref,val) ((ref) = (val)+(Entier)(1))
-+#define CANDL_decrement(ref,val) ((ref) = (val)-(Entier)(1))
-+#define CANDL_subtract(ref,val1,val2) ((ref) = (val1)-(val2))
-+#define CANDL_oppose(ref,val) ((ref) = (-(val)))
-+
-+/* Conditional operations on 'Value' or 'Entier' */
-+#define CANDL_zero_p(val) CANDL_eq(val,0)
-+#define CANDL_notzero_p(val) CANDL_ne(val,0)
-+
-+#endif
-+
-+#endif // !CANDL_MACROS_H
-diff --git a/include/candl/matrix.h b/include/candl/matrix.h
-index 7bbc13b..60e525f 100644
---- a/include/candl/matrix.h
-+++ b/include/candl/matrix.h
-@@ -33,92 +33,26 @@
- * *
- ******************************************************************************/
-
--
- #ifndef CANDL_MATRIX_H
- # define CANDL_MATRIX_H
-
--# include <stdio.h>
--# include <piplib/piplib.h>
--
--# ifdef LINEAR_VALUE_IS_LONG
--# define CLAN_INT_T_IS_LONG
--# endif
--# ifdef LINEAR_VALUE_IS_LONGLONG
--# define CLAN_INT_T_IS_LONGLONG
--# endif
--# ifdef LINEAR_VALUE_IS_MP
--# define CLAN_INT_T_IS_MP
--# endif
-+# include <candl/violation.h>
-
- # if defined(__cplusplus)
- extern "C"
- {
- # endif
-
-+struct osl_relation;
-+struct osl_dependence;
-
--/**
-- * The matrix structure comes directly from PipLib (defined in piplib/piplib.h)
-- * which is directly the PolyLib Matrix (defined in polylib/types.h)
-- * here is how it looks like (at least in PipLib 1.3.5 version):
-- *
-- * struct pipmatrix
-- * { unsigned NbRows; // The number of rows (= NbConstraints in Polyhedron).
-- * unsigned NbColumns; // The number of columns (= Dimension+2 in Polyhedron).
-- * Value **p; // An array of pointers to the beginning of each row.
-- * Value *p_Init; // The matrix is stored here, contiguously in memory.
-- * int p_Init_size; // Needed to free the memory allocated by mpz_init.
-- * } ;
-- * typedef struct pipmatrix PipMatrix ;
-- */
--
--typedef PipMatrix CandlMatrix;
--
--
--/**
-- * CandlMatrixList structure:
-- * this structure reprensents a node of a linked list of CandlMatrix structures.
-- */
--struct candlmatrixlist
--{ CandlMatrix * matrix; /**< An element of the list. */
-- struct candlmatrixlist * next;/**< Pointer to the next element of the list.*/
--};
--typedef struct candlmatrixlist CandlMatrixList;
--
--
--/******************************************************************************
-- * Structure display function *
-- ******************************************************************************/
--void candl_matrix_print_structure(FILE *, CandlMatrix *, int);
--void candl_matrix_print(FILE *, CandlMatrix *);
--void candl_matrix_print_data(FILE *, CandlMatrix *);
--void candl_matrix_list_print_structure(FILE *, CandlMatrixList *, int);
--void candl_matrix_list_print(FILE *, CandlMatrixList *);
--
--/******************************************************************************
-- * Memory deallocation function *
-- ******************************************************************************/
--void candl_matrix_free(CandlMatrix *);
--void candl_matrix_list_free(CandlMatrixList *);
--
--
--/******************************************************************************
-- * Reading functions *
-- ******************************************************************************/
--CandlMatrix * candl_matrix_read(FILE *);
--CandlMatrixList * candl_matrix_list_read(FILE *);
--
--
--/******************************************************************************
-- * Processing functions *
-- ******************************************************************************/
--CandlMatrix * candl_matrix_malloc(int, int);
--CandlMatrixList * candl_matrix_list_malloc();
--CandlMatrix * candl_matrix_violation(CandlMatrix *, CandlMatrix *,
-- CandlMatrix *, int, int);
--int candl_matrix_check_point (CandlMatrix* , CandlMatrix* );
-+candl_violation_p candl_matrix_violation(struct osl_dependence*,
-+ struct osl_relation*, struct osl_relation*,
-+ int, int);
-+int candl_matrix_check_point(struct osl_relation*,
-+ struct osl_relation*);
-
- # if defined(__cplusplus)
- }
- # endif
--#endif /* define CANDL_DEPENDENCE_H */
--
-+#endif
-diff --git a/include/candl/options.h b/include/candl/options.h
-index e62fddb..7154cb5 100644
---- a/include/candl/options.h
-+++ b/include/candl/options.h
-@@ -33,7 +33,6 @@
- * *
- ******************************************************************************/
-
--
- #ifndef CANDL_OPTIONS_H
- # define CANDL_OPTIONS_H
-
-@@ -44,60 +43,55 @@ extern "C"
- {
- # endif
-
--
- /**
-- * CandlOptions structure:
-+ * candl_options structure:
- * this structure contains all the informations on the state of Candl options.
- */
--struct candloptions
--{ /* OPTIONS FOR DEPENDENCE COMPUTATION */
-+struct candl_options {
-+ /* OPTIONS FOR DEPENDENCE COMPUTATION */
- int waw; /**< 1 if write after write (output) dependences matter. */
- int raw; /**< 1 if read after write (flow) dependences matter. */
- int war; /**< 1 if write after read (anti) dependences matter. */
- int rar; /**< 1 if read after read (input) dependences matter. */
- int commute; /**< 1 to use commutativity to simplify dependences. */
- int fullcheck; /**< 1 to compute all dependence violations. */
-- int depgraph; /**< 1 to print the dependence graph. */
-- int violgraph; /**< 1 to print the violation graph. */
- int scalar_renaming; /**< 1 to enable scalar renaming. */
- int scalar_privatization; /**< 1 to enable scalar privatization. */
- int scalar_expansion; /**< 1 to enable scalar privatization. */
- int lastwriter; /**< 1 to compute last writer */
-- int readscop; /**< 1 to enable reading from a .scop formatted file. */
-- int writescop; /**< 1 to enable writing to a .scop formatted file. */
-- int scoptocandl; /**< 1 to act as a .scop to candl converter. */
- int verbose; /**< 1 to enable verbose output. */
-+ int outscop; /**< 1 to print the scop with dependences. */
-+ int autocorrect; /**< 1 to correct violations. fullcheck is set to 1 and
-+ * the -test is required.
-+ */
- /* UNDOCUMENTED OPTIONS FOR THE AUTHOR ONLY */
- int view; /**< 1 to call dot and gv to visualize the graphs. */
- int structure; /**< 1 to print internal dependence structure. */
- int prune_dups; /**< 1 to use experimental dependence pruning algorithm. */
--} ;
--typedef struct candloptions CandlOptions;
-+};
-
-+typedef struct candl_options candl_options_t;
-+typedef struct candl_options* candl_options_p;
-
- /******************************************************************************
- * Structure display function *
- ******************************************************************************/
--void candl_options_print(FILE *, CandlOptions *);
--
-+void candl_options_print(FILE *, candl_options_p);
-
- /******************************************************************************
- * Memory deallocation function *
- ******************************************************************************/
--void candl_options_free(CandlOptions *);
--
-+void candl_options_free(candl_options_p);
-
- /******************************************************************************
- * Reading function *
- ******************************************************************************/
--void candl_options_read(int, char **, FILE **, FILE **, CandlOptions **);
--
-+void candl_options_read(int, char **, FILE **, FILE **, FILE**, candl_options_p*);
-
- /******************************************************************************
- * Processing functions *
- ******************************************************************************/
--CandlOptions * candl_options_malloc(void);
--
-+candl_options_p candl_options_malloc(void);
-
- #if defined(__cplusplus)
- }
-diff --git a/include/candl/piplib-wrapper.h b/include/candl/piplib-wrapper.h
-index 27576f5..642e366 100644
---- a/include/candl/piplib-wrapper.h
-+++ b/include/candl/piplib-wrapper.h
-@@ -41,23 +41,27 @@
- #ifndef CANDL_PIPLIB_WRAPPER_H
- # define CANDL_PIPLIB_WRAPPER_H
-
--
--# include <stdio.h>
--# include <candl/matrix.h>
--
--
--
- # if defined(__cplusplus)
- extern "C"
- {
- # endif
--
-
--int
--pip_has_rational_point(PipMatrix* system,
-- PipMatrix* context,
-- int conservative);
--
-+struct osl_relation;
-+struct pipmatrix;
-+struct pipquast;
-+struct pipoptions;
-+struct piplist;
-+
-+struct pipmatrix* pip_relation2matrix(struct osl_relation*);
-+struct osl_relation* pip_matrix2relation(struct pipmatrix*);
-+int pip_has_rational_point(struct osl_relation*,
-+ struct osl_relation*, int);
-+struct pipquast* pip_solve_osl(struct osl_relation*, struct osl_relation*,
-+ int, struct pipoptions*);
-+int piplist_are_equal(struct piplist*, struct piplist*, int);
-+struct osl_relation* pip_quast_to_polyhedra(struct pipquast*, int, int);
-+struct osl_relation* pip_quast_no_solution_to_polyhedra(struct pipquast*,
-+ int, int);
-
- # if defined(__cplusplus)
- }
-diff --git a/include/candl/piplib.h.in b/include/candl/piplib.h.in
-new file mode 100644
-index 0000000..dfaf33a
---- /dev/null
-+++ b/include/candl/piplib.h.in
-@@ -0,0 +1,51 @@
-+
-+ /**------ ( ----------------------------------------------------------**
-+ ** )\ CAnDL **
-+ **----- / ) --------------------------------------------------------**
-+ ** ( * ( piplib.h **
-+ **---- \#/ --------------------------------------------------------**
-+ ** .-"#'-. First version: August 5th 2014 **
-+ **--- |"-.-"| -------------------------------------------------------**
-+ | |
-+ | |
-+ ******** | | *************************************************************
-+ * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-+ ******************************************************************************
-+ * *
-+ * Copyright (C) 2003-2008 Cedric Bastoul *
-+ * *
-+ * This is free software; you can redistribute it and/or modify it under the *
-+ * terms of the GNU Lesser General Public License as published by the Free *
-+ * Software Foundation; either version 3 of the License, or (at your option) *
-+ * any later version. *
-+ * *
-+ * This software is distributed in the hope that it will be useful, but *
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-+ * for more details. *
-+ * *
-+ * You should have received a copy of the GNU Lesser General Public License *
-+ * along with software; if not, write to the Free Software Foundation, Inc., *
-+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-+ * *
-+ * CAnDL, the Chunky Dependence Analyzer *
-+ * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-+ * *
-+ ******************************************************************************/
-+
-+
-+#ifndef CANDL_PIPLIB_H
-+# define CANDL_PIPLIB_H
-+
-+# if defined(__cplusplus)
-+extern "C"
-+ {
-+# endif
-+
-+# include <piplib/piplib at BITS@.h>
-+
-+# if defined(__cplusplus)
-+ }
-+# endif
-+#endif /* define CANDL_PIPLIB_H */
-+
-diff --git a/include/candl/program.h b/include/candl/program.h
-deleted file mode 100644
-index 073016a..0000000
---- a/include/candl/program.h
-+++ /dev/null
-@@ -1,113 +0,0 @@
--
-- /**------ ( ----------------------------------------------------------**
-- ** )\ CAnDL **
-- **----- / ) --------------------------------------------------------**
-- ** ( * ( program.h **
-- **---- \#/ --------------------------------------------------------**
-- ** .-"#'-. First version: september 9th 2003 **
-- **--- |"-.-"| -------------------------------------------------------**
-- | |
-- | |
-- ******** | | *************************************************************
-- * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-- ******************************************************************************
-- * *
-- * Copyright (C) 2003-2008 Cedric Bastoul *
-- * *
-- * This is free software; you can redistribute it and/or modify it under the *
-- * terms of the GNU General Public License as published by the Free Software *
-- * Foundation; either version 2 of the License, or (at your option) any later *
-- * version. *
-- * *
-- * This software is distributed in the hope that it will be useful, but *
-- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-- * for more details. *
-- * *
-- * You should have received a copy of the GNU General Public License along *
-- * with software; if not, write to the Free Software Foundation, Inc., *
-- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-- * *
-- * CAnDL, the Chunky Dependence Analyzer *
-- * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-- * *
-- ******************************************************************************/
--
--
--#ifndef CANDL_PROGRAM_H
--# define CANDL_PROGRAM_H
--
--# include <stdio.h>
--# include <stdlib.h>
--# include <candl/matrix.h>
--# include <candl/statement.h>
--
--# ifdef CANDL_SUPPORTS_SCOPLIB
--# include <scoplib/scop.h>
--# endif
--
--
--# if defined(__cplusplus)
--extern "C"
-- {
--# endif
--
--/**
-- * candl_program_t structure:
-- * this structure contains all the informations about a program.
-- */
--struct candl_program
--{
-- CandlMatrix * context; /**< The context of the program. */
-- int nb_statements; /**< The number of statements. */
-- CandlStatement ** statement; /**< Array of nb_statements pointers on
-- * the statements of the program.
-- */
-- CandlMatrix ** transformation; /**< Array of nb_statements pointers on
-- * the transformation candidate (one
-- * function per statement). If NULL:
-- * no tranformation candidate.
-- */
-- int* scalars_privatizable;
--};
--typedef struct candl_program CandlProgram;
--typedef struct candl_program candl_program_t;
--typedef struct candl_program * candl_program_p;
--
--
--/******************************************************************************
-- * Structure display function *
-- ******************************************************************************/
--void candl_program_print_structure(FILE *, candl_program_p, int);
--void candl_program_print(FILE *, candl_program_p);
--void candl_program_print_candl_file(FILE *, candl_program_p);
--
--/******************************************************************************
-- * Memory alloc/dealloc function *
-- ******************************************************************************/
--candl_program_p candl_program_malloc();
--void candl_program_free(candl_program_p);
--
--
--/******************************************************************************
-- * Reading function *
-- ******************************************************************************/
--candl_program_p candl_program_read(FILE *);
--/* This function is compiled if candl was configured with CLAN support. */
--# ifdef CANDL_SUPPORTS_SCOPLIB
--candl_program_p candl_program_read_scop(FILE *);
--# endif
--
--/******************************************************************************
-- * Processing functions *
-- ******************************************************************************/
--/* This function is compiled if candl was configured with CLAN support. */
--# ifdef CANDL_SUPPORTS_SCOPLIB
--candl_program_p candl_program_convert_scop(scoplib_scop_p, int**);
--# endif
--
--# if defined(__cplusplus)
-- }
--# endif
--#endif /* define CANDL_PROGRAM_H */
--
-diff --git a/include/candl/pruning.h b/include/candl/pruning.h
-deleted file mode 100644
-index ad75e38..0000000
---- a/include/candl/pruning.h
-+++ /dev/null
-@@ -1,65 +0,0 @@
--
-- /**------ ( ----------------------------------------------------------**
-- ** )\ CAnDL **
-- **----- / ) --------------------------------------------------------**
-- ** ( * ( pruning.h **
-- **---- \#/ --------------------------------------------------------**
-- ** .-"#'-. First version: July 17th 2011 **
-- **--- |"-.-"| -------------------------------------------------------**
-- | |
-- | |
-- ******** | | *************************************************************
-- * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-- ******************************************************************************
-- * *
-- * Copyright (C) 2003-2008 Cedric Bastoul *
-- * *
-- * This is free software; you can redistribute it and/or modify it under the *
-- * terms of the GNU General Public License as published by the Free Software *
-- * Foundation; either version 2 of the License, or (at your option) any later *
-- * version. *
-- * *
-- * This software is distributed in the hope that it will be useful, but *
-- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-- * for more details. *
-- * *
-- * You should have received a copy of the GNU General Public License along *
-- * with software; if not, write to the Free Software Foundation, Inc., *
-- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-- * *
-- * CAnDL, the Chunky Dependence Analyzer *
-- * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-- * *
-- ******************************************************************************/
--
--/**
-- * \file pruning.h
-- * \author Louis-Noel Pouchet
-- */
--
--#ifndef CANDL_PRUNING_H
--# define CANDL_PRUNING_H
--
--
--# include <stdio.h>
--# include <candl/statement.h>
--# include <candl/matrix.h>
--# include <candl/program.h>
--# include <candl/options.h>
--# include <candl/matrix.h>
--
--
--# if defined(__cplusplus)
--extern "C"
-- {
--# endif
--
--CandlDependence*
--candl_dependence_prune_transitively_covered (CandlDependence* deps);
--
--# if defined(__cplusplus)
-- }
--# endif
--#endif /* define CANDL_PRUNING_H */
--
-diff --git a/include/candl/scop.h b/include/candl/scop.h
-new file mode 100644
-index 0000000..ead43ed
---- /dev/null
-+++ b/include/candl/scop.h
-@@ -0,0 +1,66 @@
-+
-+ /**------ ( ----------------------------------------------------------**
-+ ** )\ CAnDL **
-+ **----- / ) --------------------------------------------------------**
-+ ** ( * ( scop.h **
-+ **---- \#/ --------------------------------------------------------**
-+ ** .-"#'-. First version: july 9th 2012 **
-+ **--- |"-.-"| -------------------------------------------------------**
-+ | |
-+ | |
-+ ******** | | *************************************************************
-+ * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-+ ******************************************************************************
-+ * *
-+ * Copyright (C) 2003-2008 Cedric Bastoul *
-+ * *
-+ * This is free software; you can redistribute it and/or modify it under the *
-+ * terms of the GNU General Public License as published by the Free Software *
-+ * Foundation; either version 2 of the License, or (at your option) any later *
-+ * version. *
-+ * *
-+ * This software is distributed in the hope that it will be useful, but *
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-+ * for more details. *
-+ * *
-+ * You should have received a copy of the GNU General Public License along *
-+ * with software; if not, write to the Free Software Foundation, Inc., *
-+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-+ * *
-+ * CAnDL, the Chunky Dependence Analyzer *
-+ * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-+ * *
-+ ******************************************************************************/
-+
-+/*
-+ * author Joel Poudroux
-+ */
-+
-+#ifndef CANDL_SCOP_H
-+# define CANDL_SCOP_H
-+
-+# if defined(__cplusplus)
-+extern "C"
-+ {
-+# endif
-+
-+struct osl_scop;
-+
-+struct candl_scop_usr {
-+ int size;
-+ int *scalars_privatizable;
-+ void *usr_backup; /**< If there is already a usr field, it will be saved */
-+};
-+
-+typedef struct candl_scop_usr candl_scop_usr_t;
-+typedef struct candl_scop_usr* candl_scop_usr_p;
-+
-+void candl_scop_usr_init(struct osl_scop*);
-+void candl_scop_usr_cleanup(struct osl_scop*);
-+
-+# if defined(__cplusplus)
-+ }
-+# endif
-+
-+#endif
-diff --git a/include/candl/statement.h b/include/candl/statement.h
-index 9e434a4..a26eff6 100644
---- a/include/candl/statement.h
-+++ b/include/candl/statement.h
-@@ -4,7 +4,7 @@
- **----- / ) --------------------------------------------------------**
- ** ( * ( statement.h **
- **---- \#/ --------------------------------------------------------**
-- ** .-"#'-. First version: september 8th 2003 **
-+ ** .-"#'-. First version: july 9th 2012 **
- **--- |"-.-"| -------------------------------------------------------**
- | |
- | |
-@@ -33,68 +33,38 @@
- * *
- ******************************************************************************/
-
-+/*
-+ * author Joel Poudroux
-+ */
-
- #ifndef CANDL_STATEMENT_H
--# define CANDL_STATEMENT_H
--
--# include <stdio.h>
--# include <candl/matrix.h>
-+#define CANDL_STATEMENT_H
-
- # if defined(__cplusplus)
- extern "C"
- {
- # endif
-
-+struct osl_scop;
-+struct osl_statement;
-
--/**
-- * CandlStatement structure:
-- * this structure contains all the informations about a program statement.
-- */
--struct candlstatement
--{ int label; /**< Statement number (it must be the array
-- * index of this statement in the "statement"
-- * field of the CandlProgram structure).
-- */
-- int type; /**< Statement type. */
-- int depth; /**< Nesting level (nb of surrounding loops).*/
-- int * index; /**< Iteration domain's iterator labels. */
-- CandlMatrix * domain; /**< Iteration domain. */
-- CandlMatrix * written; /**< Array of written data. */
-- CandlMatrix * read; /**< Array of read data. */
-- void* ref; /**< Reference to another structure
-- describing the same statement. */
-+struct candl_statement_usr {
-+ int label; /**< Statement label = 'n'th statement */
-+ int depth;
-+ int type;
-+ int *index; /**< Loops label name */
-+ void *usr_backup; /**< If there is already a usr field, it will be saved */
- };
--typedef struct candlstatement CandlStatement;
--
-
--/******************************************************************************
-- * Structure display function *
-- ******************************************************************************/
--void candl_statement_print_structure(FILE *, CandlStatement *, int);
--void candl_statement_print(FILE *, CandlStatement *);
--
--
--/******************************************************************************
-- * Memory deallocation function *
-- ******************************************************************************/
--void candl_statement_free(CandlStatement *);
--
--
--/******************************************************************************
-- * Reading functions *
-- ******************************************************************************/
--CandlStatement * candl_statement_read(FILE *, int, int);
--
--
--/******************************************************************************
-- * Processing functions *
-- ******************************************************************************/
--CandlStatement * candl_statement_malloc();
--int candl_statement_commute(CandlStatement *, CandlStatement *);
-+typedef struct candl_statement_usr candl_statement_usr_t;
-+typedef struct candl_statement_usr* candl_statement_usr_p;
-
-+void candl_statement_usr_init_all(struct osl_scop*);
-+void candl_statement_usr_cleanup(struct osl_statement*);
-
- # if defined(__cplusplus)
- }
- # endif
--#endif /* define CANDL_STATEMENT_H */
-
-+
-+#endif
-diff --git a/include/candl/util.h b/include/candl/util.h
-new file mode 100644
-index 0000000..c20f09b
---- /dev/null
-+++ b/include/candl/util.h
-@@ -0,0 +1,61 @@
-+
-+ /**------ ( ----------------------------------------------------------**
-+ ** )\ CAnDL **
-+ **----- / ) --------------------------------------------------------**
-+ ** ( * ( util.h **
-+ **---- \#/ --------------------------------------------------------**
-+ ** .-"#'-. First version: june 7th 2012 **
-+ **--- |"-.-"| -------------------------------------------------------**
-+ | |
-+ | |
-+ ******** | | *************************************************************
-+ * CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *
-+ ******************************************************************************
-+ * *
-+ * Copyright (C) 2003-2008 Cedric Bastoul *
-+ * *
-+ * This is free software; you can redistribute it and/or modify it under the *
-+ * terms of the GNU General Public License as published by the Free Software *
-+ * Foundation; either version 2 of the License, or (at your option) any later *
-+ * version. *
-+ * *
-+ * This software is distributed in the hope that it will be useful, but *
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
-+ * for more details. *
-+ * *
-+ * You should have received a copy of the GNU General Public License along *
-+ * with software; if not, write to the Free Software Foundation, Inc., *
-+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
-+ * *
-+ * CAnDL, the Chunky Dependence Analyzer *
-+ * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
-+ * *
-+ ******************************************************************************/
-+
-+/*
-+ * author Joel Poudroux
-+ */
-+
-+#ifndef CANDL_UTIL_H
-+#define CANDL_UTIL_H
-+
-+# if defined(__cplusplus)
-+extern "C"
-+ {
-+# endif
-+
-+struct osl_scop;
-+struct osl_relation;
-+struct osl_statement;
-+
-+int candl_util_relation_get_line(struct osl_relation*, int);
-+int candl_util_statement_commute(struct osl_statement*, struct osl_statement*);
-+int candl_util_check_scop(struct osl_scop*, struct osl_scop*);
-+int candl_util_check_scop_list(struct osl_scop*, struct osl_scop*);
-+
-+# if defined(__cplusplus)
-+ }
-+# endif
-+
-+#endif
-diff --git a/include/candl/violation.h b/include/candl/violation.h
-index da09565..f395b63 100644
---- a/include/candl/violation.h
-+++ b/include/candl/violation.h
-@@ -38,52 +38,92 @@
- # define CANDL_VIOLATION_H
-
- # include <stdio.h>
--# include <candl/dependence.h>
--# include <candl/matrix.h>
-+# include <candl/options.h>
-
- # if defined(__cplusplus)
- extern "C"
- {
- # endif
-
-+struct osl_scop;
-+struct osl_dependence;
-+struct osl_relation;
-
- /**
- * CandlViolation structure:
- * this structure contains all informations about a data dependence violation.
-- */
--struct candlviolation
--{ CandlDependence * dependence; /**< Pointer to violated dependence. */
-- int dimension; /**< Violation dimension. */
-- CandlMatrix * domain; /**< Violation polyhedron. */
-- struct candlviolation * next; /**< Pointer to next violation. */
-+ *
-+
-+ Violation domain structure
-+ ________________________________________________________________________________________________
-+ / source (output) | target (input) | local dims \
-+ __ |_______________________|_______________________|___________________________________________________|_____________
-+ / eq |output |output |output |output |output |output |ld dom |ld acc |ld scatt |ld dom |ld acc |ld scatt | | \
-+ | in |domain |access |scatt |domain |access |scatt |source |source |source |target |target |target |parameters | 1 |
-+ _____________________|____|_______|_______|_______|_______|_______|_______|_______|_______|_________|_______|_______|_________|___________|___|
-+ |Domain source | X | X : : | : : | X : : | : : | X | X |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ |Domain target | X | : : | X : : | : : | X : : | X | X |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ Dependence |Access source | X | X : X : | : : | : X : | : : | X | X |
-+ system |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ |Access target | X | : : | X : X : | : : | : X : | X | X |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ |Access equality | | : Id : | : -Id : | : : | : : | | |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___| | 0 : 0..depth-1
-+ |Precedence | X | Id : : | -Id : : | : : | : : | | X | <--| 0|-1 : depth
-+ ===============================================================================================================================================
-+ |Scattering | | : : | : : | : : | : : | | |
-+ |source | X | X : : X | : : | : : X | : : | X | X |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ |Scattering | | : : | : : | : : | : : | | |
-+ |target | X | : : | X : : X | : : | : : X | X | X |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ |Equality at | | : : | : : | : : | : : | | |
-+ |1 ... dim_1 | | : : Id | : : -Id | : : | : : | | |
-+ |________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___|
-+ at |Scat source > | | : : | : : | : : | : : | | |
-+ dim |Scat target | 1 | : : 1 | : : -1 | : : | : : | |-1 |
-+ \________________|____|_______:_______:_______|_______:_______:_______|_______:_______:_________|_______:_______:_________|___________|___/
-+
-+ (1) (2) (3) (4)
-+*/
-+
-+struct candl_violation {
-+ struct osl_dependence* dependence; /**< Pointer to violated dependence. */
-+ int dimension; /**< Violation dimension. */
-+ struct osl_relation* domain; /**< Violation polyhedron. */
-+ struct candl_violation* next; /**< Pointer to next violation. */
-+
-+ int source_nb_output_dims_scattering; // (1)
-+ int target_nb_output_dims_scattering; // (2)
-+ int source_nb_local_dims_scattering; // (3)
-+ int target_nb_local_dims_scattering; // (4)
- };
--typedef struct candlviolation CandlViolation;
--
-+typedef struct candl_violation candl_violation_t;
-+typedef struct candl_violation* candl_violation_p;
-
- /******************************************************************************
- * Structure display function *
- ******************************************************************************/
--void candl_violation_print_structure(FILE *, CandlViolation *, int);
--void candl_violation_print(FILE *, CandlViolation *);
--void candl_violation_pprint(FILE *, CandlViolation *);
--void candl_violation_view(CandlViolation *);
--
-+void candl_violation_idump(FILE*, candl_violation_p, int);
-+void candl_violation_dump(FILE*, candl_violation_p);
-+void candl_violation_pprint(FILE*, candl_violation_p);
-+void candl_violation_view(candl_violation_p);
-
- /******************************************************************************
- * Memory deallocation function *
- ******************************************************************************/
--void candl_violation_free(CandlViolation *);
--
-+void candl_violation_free(candl_violation_p);
-
- /******************************************************************************
- * Processing functions *
- ******************************************************************************/
--CandlViolation * candl_violation_malloc();
--void candl_violation_add(CandlViolation **, CandlViolation **,
-- CandlViolation *);
--CandlViolation * candl_violation(CandlProgram *, CandlDependence *,
-- CandlOptions *);
--
-+candl_violation_p candl_violation_malloc();
-+void candl_violation_add(candl_violation_p*, candl_violation_p*,
-+ candl_violation_p);
-+candl_violation_p candl_violation(struct osl_scop*, struct osl_dependence*,
-+ struct osl_scop*, candl_options_p);
-
- # if defined(__cplusplus)
- }
-diff --git a/m4/ax_cc_maxopt.m4 b/m4/ax_cc_maxopt.m4
-new file mode 100644
-index 0000000..da415be
---- /dev/null
-+++ b/m4/ax_cc_maxopt.m4
-@@ -0,0 +1,178 @@
-+# ===========================================================================
-+# http://www.nongnu.org/autoconf-archive/ax_cc_maxopt.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+# AX_CC_MAXOPT
-+#
-+# DESCRIPTION
-+#
-+# Try to turn on "good" C optimization flags for various compilers and
-+# architectures, for some definition of "good". (In our case, good for
-+# FFTW and hopefully for other scientific codes. Modify as needed.)
-+#
-+# The user can override the flags by setting the CFLAGS environment
-+# variable. The user can also specify --enable-portable-binary in order to
-+# disable any optimization flags that might result in a binary that only
-+# runs on the host architecture.
-+#
-+# Note also that the flags assume that ANSI C aliasing rules are followed
-+# by the code (e.g. for gcc's -fstrict-aliasing), and that floating-point
-+# computations can be re-ordered as needed.
-+#
-+# Requires macros: AX_CHECK_COMPILER_FLAGS, AX_COMPILER_VENDOR,
-+# AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID.
-+#
-+# LICENSE
-+#
-+# Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
-+# Copyright (c) 2008 Matteo Frigo
-+#
-+# This program is free software: you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation, either version 3 of the License, or (at your
-+# option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+# Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License along
-+# with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# As a special exception, the respective Autoconf Macro's copyright owner
-+# gives unlimited permission to copy, distribute and modify the configure
-+# scripts that are the output of Autoconf when processing the Macro. You
-+# need not follow the terms of the GNU General Public License when using
-+# or distributing such scripts, even though portions of the text of the
-+# Macro appear in them. The GNU General Public License (GPL) does govern
-+# all other use of the material that constitutes the Autoconf Macro.
-+#
-+# This special exception to the GPL applies to versions of the Autoconf
-+# Macro released by the Autoconf Archive. When you make and distribute a
-+# modified version of the Autoconf Macro, you may extend this special
-+# exception to the GPL to apply to your modified version as well.
-+
-+AC_DEFUN([AX_CC_MAXOPT],
-+[
-+AC_REQUIRE([AC_PROG_CC])
-+AC_REQUIRE([AX_COMPILER_VENDOR])
-+AC_REQUIRE([AC_CANONICAL_HOST])
-+
-+AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
-+ acx_maxopt_portable=$withval, acx_maxopt_portable=no)
-+
-+# Try to determine "good" native compiler flags if none specified via CFLAGS
-+if test "$ac_test_CFLAGS" != "set"; then
-+ CFLAGS=""
-+ case $ax_cv_c_compiler_vendor in
-+ dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
-+ if test "x$acx_maxopt_portable" = xno; then
-+ CFLAGS="$CFLAGS -arch host"
-+ fi;;
-+
-+ sun) CFLAGS="-native -fast -xO5 -dalign"
-+ if test "x$acx_maxopt_portable" = xyes; then
-+ CFLAGS="$CFLAGS -xarch=generic"
-+ fi;;
-+
-+ hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
-+ if test "x$acx_maxopt_portable" = xyes; then
-+ CFLAGS="$CFLAGS +DAportable"
-+ fi;;
-+
-+ ibm) if test "x$acx_maxopt_portable" = xno; then
-+ xlc_opt="-qarch=auto -qtune=auto"
-+ else
-+ xlc_opt="-qtune=auto"
-+ fi
-+ AX_CHECK_COMPILER_FLAGS($xlc_opt,
-+ CFLAGS="-O3 -qansialias -w $xlc_opt",
-+ [CFLAGS="-O3 -qansialias -w"
-+ echo "******************************************************"
-+ echo "* You seem to have the IBM C compiler. It is *"
-+ echo "* recommended for best performance that you use: *"
-+ echo "* *"
-+ echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
-+ echo "* ^^^ ^^^ *"
-+ echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
-+ echo "* CPU you have. (Set the CFLAGS environment var. *"
-+ echo "* and re-run configure.) For more info, man cc. *"
-+ echo "******************************************************"])
-+ ;;
-+
-+ intel) CFLAGS="-O3 -ansi_alias"
-+ if test "x$acx_maxopt_portable" = xno; then
-+ icc_archflag=unknown
-+ icc_flags=""
-+ case $host_cpu in
-+ i686*|x86_64*)
-+ # icc accepts gcc assembly syntax, so these should work:
-+ AX_GCC_X86_CPUID(0)
-+ AX_GCC_X86_CPUID(1)
-+ case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
-+ *:756e6547:*:*) # Intel
-+ case $ax_cv_gcc_x86_cpuid_1 in
-+ *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
-+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
-+ *f??:*:*:*) icc_flags="-xN -xW -xK";;
-+ esac ;;
-+ esac ;;
-+ esac
-+ if test "x$icc_flags" != x; then
-+ for flag in $icc_flags; do
-+ AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
-+ done
-+ fi
-+ AC_MSG_CHECKING([for icc architecture flag])
-+ AC_MSG_RESULT($icc_archflag)
-+ if test "x$icc_archflag" != xunknown; then
-+ CFLAGS="$CFLAGS $icc_archflag"
-+ fi
-+ fi
-+ ;;
-+
-+ gnu)
-+ # default optimization flags for gcc on all systems
-+ CFLAGS="-O3 -fomit-frame-pointer"
-+
-+ # -malign-double for x86 systems
-+ AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
-+
-+ # -fstrict-aliasing for gcc-2.95+
-+ AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
-+ CFLAGS="$CFLAGS -fstrict-aliasing")
-+
-+ # note that we enable "unsafe" fp optimization with other compilers, too
-+ AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
-+
-+ AX_GCC_ARCHFLAG($acx_maxopt_portable)
-+ ;;
-+ esac
-+
-+ if test -z "$CFLAGS"; then
-+ echo ""
-+ echo "********************************************************"
-+ echo "* WARNING: Don't know the best CFLAGS for this system *"
-+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
-+ echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
-+ echo "********************************************************"
-+ echo ""
-+ CFLAGS="-O3"
-+ fi
-+
-+ AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
-+ echo ""
-+ echo "********************************************************"
-+ echo "* WARNING: The guessed CFLAGS don't seem to work with *"
-+ echo "* your compiler. *"
-+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
-+ echo "********************************************************"
-+ echo ""
-+ CFLAGS=""
-+ ])
-+
-+fi
-+])
-diff --git a/m4/ax_cflags_warn_all.m4 b/m4/ax_cflags_warn_all.m4
-new file mode 100644
-index 0000000..026c6e9
---- /dev/null
-+++ b/m4/ax_cflags_warn_all.m4
-@@ -0,0 +1,149 @@
-+# ===========================================================================
-+# http://www.nongnu.org/autoconf-archive/ax_cflags_warn_all.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
-+#
-+# DESCRIPTION
-+#
-+# Try to find a compiler option that enables most reasonable warnings.
-+#
-+# For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
-+# result is added to the shellvar being CFLAGS by default.
-+#
-+# Currently this macro knows about GCC, Solaris C compiler, Digital Unix C
-+# compiler, C for AIX Compiler, HP-UX C compiler, IRIX C compiler, NEC
-+# SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos 10.0.0.8) C
-+# compiler.
-+#
-+# - $1 shell-variable-to-add-to : CFLAGS
-+# - $2 add-value-if-not-found : nothing
-+# - $3 action-if-found : add value to shellvariable
-+# - $4 action-if-not-found : nothing
-+#
-+# LICENSE
-+#
-+# Copyright (c) 2008 Guido U. Draheim <guidod at gmx.de>
-+#
-+# This program is free software; you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation; either version 2 of the License, or (at your
-+# option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+# Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License along
-+# with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# As a special exception, the respective Autoconf Macro's copyright owner
-+# gives unlimited permission to copy, distribute and modify the configure
-+# scripts that are the output of Autoconf when processing the Macro. You
-+# need not follow the terms of the GNU General Public License when using
-+# or distributing such scripts, even though portions of the text of the
-+# Macro appear in them. The GNU General Public License (GPL) does govern
-+# all other use of the material that constitutes the Autoconf Macro.
-+#
-+# This special exception to the GPL applies to versions of the Autoconf
-+# Macro released by the Autoconf Archive. When you make and distribute a
-+# modified version of the Autoconf Macro, you may extend this special
-+# exception to the GPL to apply to your modified version as well.
-+
-+AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
-+AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
-+AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
-+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-+VAR,[VAR="no, unknown"
-+ AC_LANG_SAVE
-+ AC_LANG_C
-+ ac_save_[]FLAGS="$[]FLAGS"
-+for ac_arg dnl
-+in "-pedantic % -Wall" dnl GCC
-+ "-xstrconst % -v" dnl Solaris C
-+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
-+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
-+ "-ansi -ansiE % -fullwarn" dnl IRIX
-+ "+ESlit % +w1" dnl HP-UX C
-+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
-+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
-+ #
-+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-+ AC_TRY_COMPILE([],[return 0;],
-+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-+done
-+ FLAGS="$ac_save_[]FLAGS"
-+ AC_LANG_RESTORE
-+])
-+case ".$VAR" in
-+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
-+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
-+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
-+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
-+ *) m4_ifvaln($3,$3,[
-+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
-+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
-+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
-+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
-+ fi ]) ;;
-+esac
-+AS_VAR_POPDEF([VAR])dnl
-+AS_VAR_POPDEF([FLAGS])dnl
-+])
-+
-+dnl the only difference - the LANG selection... and the default FLAGS
-+
-+AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
-+AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
-+AS_VAR_PUSHDEF([VAR],[ax_cv_cxxflags_warn_all])dnl
-+AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
-+VAR,[VAR="no, unknown"
-+ AC_LANG_SAVE
-+ AC_LANG_CPLUSPLUS
-+ ac_save_[]FLAGS="$[]FLAGS"
-+for ac_arg dnl
-+in "-pedantic % -Wall" dnl GCC
-+ "-xstrconst % -v" dnl Solaris C
-+ "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
-+ "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
-+ "-ansi -ansiE % -fullwarn" dnl IRIX
-+ "+ESlit % +w1" dnl HP-UX C
-+ "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
-+ "-h conform % -h msglevel 2" dnl Cray C (Unicos)
-+ #
-+do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
-+ AC_TRY_COMPILE([],[return 0;],
-+ [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
-+done
-+ FLAGS="$ac_save_[]FLAGS"
-+ AC_LANG_RESTORE
-+])
-+case ".$VAR" in
-+ .ok|.ok,*) m4_ifvaln($3,$3) ;;
-+ .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
-+ AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
-+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
-+ *) m4_ifvaln($3,$3,[
-+ if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
-+ then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
-+ else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
-+ m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
-+ fi ]) ;;
-+esac
-+AS_VAR_POPDEF([VAR])dnl
-+AS_VAR_POPDEF([FLAGS])dnl
-+])
-+
-+dnl implementation tactics:
-+dnl the for-argument contains a list of options. The first part of
-+dnl these does only exist to detect the compiler - usually it is
-+dnl a global option to enable -ansi or -extrawarnings. All other
-+dnl compilers will fail about it. That was needed since a lot of
-+dnl compilers will give false positives for some option-syntax
-+dnl like -Woption or -Xoption as they think of it is a pass-through
-+dnl to later compile stages or something. The "%" is used as a
-+dnl delimimiter. A non-option comment can be given after "%%" marks
-+dnl which will be shown but not added to the respective C/CXXFLAGS.
-diff --git a/m4/ax_check_compiler_flags.m4 b/m4/ax_check_compiler_flags.m4
-new file mode 100644
-index 0000000..7da8324
---- /dev/null
-+++ b/m4/ax_check_compiler_flags.m4
-@@ -0,0 +1,74 @@
-+# ===========================================================================
-+# http://www.nongnu.org/autoconf-archive/ax_check_compiler_flags.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
-+#
-+# DESCRIPTION
-+#
-+# Check whether the given compiler FLAGS work with the current language's
-+# compiler, or whether they give an error. (Warnings, however, are
-+# ignored.)
-+#
-+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
-+# success/failure.
-+#
-+# LICENSE
-+#
-+# Copyright (c) 2009 Steven G. Johnson <stevenj at alum.mit.edu>
-+# Copyright (c) 2009 Matteo Frigo
-+#
-+# This program is free software: you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation, either version 3 of the License, or (at your
-+# option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+# Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License along
-+# with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# As a special exception, the respective Autoconf Macro's copyright owner
-+# gives unlimited permission to copy, distribute and modify the configure
-+# scripts that are the output of Autoconf when processing the Macro. You
-+# need not follow the terms of the GNU General Public License when using
-+# or distributing such scripts, even though portions of the text of the
-+# Macro appear in them. The GNU General Public License (GPL) does govern
-+# all other use of the material that constitutes the Autoconf Macro.
-+#
-+# This special exception to the GPL applies to versions of the Autoconf
-+# Macro released by the Autoconf Archive. When you make and distribute a
-+# modified version of the Autoconf Macro, you may extend this special
-+# exception to the GPL to apply to your modified version as well.
-+
-+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
-+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
-+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
-+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
-+AS_LITERAL_IF([$1],
-+ [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
-+ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-+ _AC_LANG_PREFIX[]FLAGS="$1"
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
-+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
-+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
-+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
-+ [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-+ _AC_LANG_PREFIX[]FLAGS="$1"
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
-+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
-+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
-+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
-+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
-+AC_MSG_RESULT($ax_check_compiler_flags)
-+if test "x$ax_check_compiler_flags" = xyes; then
-+ m4_default([$2], :)
-+else
-+ m4_default([$3], :)
-+fi
-+])dnl AX_CHECK_COMPILER_FLAGS
-diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4
-new file mode 100644
-index 0000000..b074260
---- /dev/null
-+++ b/m4/ax_compiler_vendor.m4
-@@ -0,0 +1,61 @@
-+# ===========================================================================
-+# http://www.nongnu.org/autoconf-archive/ax_compiler_vendor.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+# AX_COMPILER_VENDOR
-+#
-+# DESCRIPTION
-+#
-+# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
-+# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
-+# watcom, etc. The vendor is returned in the cache variable
-+# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
-+#
-+# LICENSE
-+#
-+# Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
-+# Copyright (c) 2008 Matteo Frigo
-+#
-+# This program is free software: you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation, either version 3 of the License, or (at your
-+# option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+# Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License along
-+# with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# As a special exception, the respective Autoconf Macro's copyright owner
-+# gives unlimited permission to copy, distribute and modify the configure
-+# scripts that are the output of Autoconf when processing the Macro. You
-+# need not follow the terms of the GNU General Public License when using
-+# or distributing such scripts, even though portions of the text of the
-+# Macro appear in them. The GNU General Public License (GPL) does govern
-+# all other use of the material that constitutes the Autoconf Macro.
-+#
-+# This special exception to the GPL applies to versions of the Autoconf
-+# Macro released by the Autoconf Archive. When you make and distribute a
-+# modified version of the Autoconf Macro, you may extend this special
-+# exception to the GPL to apply to your modified version as well.
-+
-+AC_DEFUN([AX_COMPILER_VENDOR],
-+[
-+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
-+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
-+ # note: don't check for gcc first since some other compilers define __GNUC__
-+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
-+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
-+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-+#if !($vencpp)
-+ thisisanerror;
-+#endif
-+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
-+ done
-+ ])
-+])
-diff --git a/m4/ax_gcc_archflag.m4 b/m4/ax_gcc_archflag.m4
-new file mode 100644
-index 0000000..dedeef4
---- /dev/null
-+++ b/m4/ax_gcc_archflag.m4
-@@ -0,0 +1,213 @@
-+# ===========================================================================
-+# http://www.nongnu.org/autoconf-archive/ax_gcc_archflag.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+# AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
-+#
-+# DESCRIPTION
-+#
-+# This macro tries to guess the "native" arch corresponding to the target
-+# architecture for use with gcc's -march=arch or -mtune=arch flags. If
-+# found, the cache variable $ax_cv_gcc_archflag is set to this flag and
-+# ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is is set to
-+# "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is
-+# to add $ax_cv_gcc_archflag to the end of $CFLAGS.
-+#
-+# PORTABLE? should be either [yes] (default) or [no]. In the former case,
-+# the flag is set to -mtune (or equivalent) so that the architecture is
-+# only used for tuning, but the instruction set used is still portable. In
-+# the latter case, the flag is set to -march (or equivalent) so that
-+# architecture-specific instructions are enabled.
-+#
-+# The user can specify --with-gcc-arch=<arch> in order to override the
-+# macro's choice of architecture, or --without-gcc-arch to disable this.
-+#
-+# When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
-+# called unless the user specified --with-gcc-arch manually.
-+#
-+# Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID
-+#
-+# (The main emphasis here is on recent CPUs, on the principle that doing
-+# high-performance computing on old hardware is uncommon.)
-+#
-+# LICENSE
-+#
-+# Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
-+# Copyright (c) 2008 Matteo Frigo
-+#
-+# This program is free software: you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation, either version 3 of the License, or (at your
-+# option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+# Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License along
-+# with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# As a special exception, the respective Autoconf Macro's copyright owner
-+# gives unlimited permission to copy, distribute and modify the configure
-+# scripts that are the output of Autoconf when processing the Macro. You
-+# need not follow the terms of the GNU General Public License when using
-+# or distributing such scripts, even though portions of the text of the
-+# Macro appear in them. The GNU General Public License (GPL) does govern
-+# all other use of the material that constitutes the Autoconf Macro.
-+#
-+# This special exception to the GPL applies to versions of the Autoconf
-+# Macro released by the Autoconf Archive. When you make and distribute a
-+# modified version of the Autoconf Macro, you may extend this special
-+# exception to the GPL to apply to your modified version as well.
-+
-+AC_DEFUN([AX_GCC_ARCHFLAG],
-+[AC_REQUIRE([AC_PROG_CC])
-+AC_REQUIRE([AC_CANONICAL_HOST])
-+
-+AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
-+ ax_gcc_arch=$withval, ax_gcc_arch=yes)
-+
-+AC_MSG_CHECKING([for gcc architecture flag])
-+AC_MSG_RESULT([])
-+AC_CACHE_VAL(ax_cv_gcc_archflag,
-+[
-+ax_cv_gcc_archflag="unknown"
-+
-+if test "$GCC" = yes; then
-+
-+if test "x$ax_gcc_arch" = xyes; then
-+ax_gcc_arch=""
-+if test "$cross_compiling" = no; then
-+case $host_cpu in
-+ i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
-+ AX_GCC_X86_CPUID(0)
-+ AX_GCC_X86_CPUID(1)
-+ case $ax_cv_gcc_x86_cpuid_0 in
-+ *:756e6547:*:*) # Intel
-+ case $ax_cv_gcc_x86_cpuid_1 in
-+ *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
-+ *5??:*:*:*) ax_gcc_arch=pentium ;;
-+ *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
-+ *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
-+ *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
-+ *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
-+ *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
-+ *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
-+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
-+ case $host_cpu in
-+ x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
-+ *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
-+ esac ;;
-+ *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
-+ esac ;;
-+ *:68747541:*:*) # AMD
-+ case $ax_cv_gcc_x86_cpuid_1 in
-+ *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
-+ *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
-+ *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
-+ *60?:*:*:*) ax_gcc_arch=k7 ;;
-+ *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
-+ *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
-+ *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
-+ *6[[68a]]?:*:*:*)
-+ AX_GCC_X86_CPUID(0x80000006) # L2 cache size
-+ case $ax_cv_gcc_x86_cpuid_0x80000006 in
-+ *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
-+ ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
-+ *) ax_gcc_arch="athlon-4 athlon k7" ;;
-+ esac ;;
-+ *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
-+ *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
-+ *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
-+ *f??:*:*:*) ax_gcc_arch="k8" ;;
-+ esac ;;
-+ *:746e6543:*:*) # IDT
-+ case $ax_cv_gcc_x86_cpuid_1 in
-+ *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
-+ *58?:*:*:*) ax_gcc_arch=winchip2 ;;
-+ *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
-+ *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
-+ esac ;;
-+ esac
-+ if test x"$ax_gcc_arch" = x; then # fallback
-+ case $host_cpu in
-+ i586*) ax_gcc_arch=pentium ;;
-+ i686*) ax_gcc_arch=pentiumpro ;;
-+ esac
-+ fi
-+ ;;
-+
-+ sparc*)
-+ AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
-+ cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
-+ cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
-+ case $cputype in
-+ *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
-+ *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
-+ *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
-+ *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
-+ *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
-+ *cypress*) ax_gcc_arch=cypress ;;
-+ esac ;;
-+
-+ alphaev5) ax_gcc_arch=ev5 ;;
-+ alphaev56) ax_gcc_arch=ev56 ;;
-+ alphapca56) ax_gcc_arch="pca56 ev56" ;;
-+ alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
-+ alphaev6) ax_gcc_arch=ev6 ;;
-+ alphaev67) ax_gcc_arch=ev67 ;;
-+ alphaev68) ax_gcc_arch="ev68 ev67" ;;
-+ alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
-+ alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
-+ alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
-+
-+ powerpc*)
-+ cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
-+ cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
-+ case $cputype in
-+ *750*) ax_gcc_arch="750 G3" ;;
-+ *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
-+ *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
-+ *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
-+ *970*) ax_gcc_arch="970 G5 power4";;
-+ *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
-+ *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
-+ 603ev|8240) ax_gcc_arch="$cputype 603e 603";;
-+ *) ax_gcc_arch=$cputype ;;
-+ esac
-+ ax_gcc_arch="$ax_gcc_arch powerpc"
-+ ;;
-+esac
-+fi # not cross-compiling
-+fi # guess arch
-+
-+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
-+for arch in $ax_gcc_arch; do
-+ if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
-+ flags="-mtune=$arch"
-+ # -mcpu=$arch and m$arch generate nonportable code on every arch except
-+ # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
-+ case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
-+ else
-+ flags="-march=$arch -mcpu=$arch -m$arch"
-+ fi
-+ for flag in $flags; do
-+ AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
-+ done
-+ test "x$ax_cv_gcc_archflag" = xunknown || break
-+done
-+fi
-+
-+fi # $GCC=yes
-+])
-+AC_MSG_CHECKING([for gcc architecture flag])
-+AC_MSG_RESULT($ax_cv_gcc_archflag)
-+if test "x$ax_cv_gcc_archflag" = xunknown; then
-+ m4_default([$3],:)
-+else
-+ m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
-+fi
-+])
-diff --git a/m4/ax_gcc_x86_cpuid.m4 b/m4/ax_gcc_x86_cpuid.m4
-new file mode 100644
-index 0000000..5420b09
---- /dev/null
-+++ b/m4/ax_gcc_x86_cpuid.m4
-@@ -0,0 +1,77 @@
-+# ===========================================================================
-+# http://www.nongnu.org/autoconf-archive/ax_gcc_x86_cpuid.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+# AX_GCC_X86_CPUID(OP)
-+#
-+# DESCRIPTION
-+#
-+# On Pentium and later x86 processors, with gcc or a compiler that has a
-+# compatible syntax for inline assembly instructions, run a small program
-+# that executes the cpuid instruction with input OP. This can be used to
-+# detect the CPU type.
-+#
-+# On output, the values of the eax, ebx, ecx, and edx registers are stored
-+# as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
-+# ax_cv_gcc_x86_cpuid_OP.
-+#
-+# If the cpuid instruction fails (because you are running a
-+# cross-compiler, or because you are not using gcc, or because you are on
-+# a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
-+# is set to the string "unknown".
-+#
-+# This macro mainly exists to be used in AX_GCC_ARCHFLAG.
-+#
-+# LICENSE
-+#
-+# Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
-+# Copyright (c) 2008 Matteo Frigo
-+#
-+# This program is free software: you can redistribute it and/or modify it
-+# under the terms of the GNU General Public License as published by the
-+# Free Software Foundation, either version 3 of the License, or (at your
-+# option) any later version.
-+#
-+# This program is distributed in the hope that it will be useful, but
-+# WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+# Public License for more details.
-+#
-+# You should have received a copy of the GNU General Public License along
-+# with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+# As a special exception, the respective Autoconf Macro's copyright owner
-+# gives unlimited permission to copy, distribute and modify the configure
-+# scripts that are the output of Autoconf when processing the Macro. You
-+# need not follow the terms of the GNU General Public License when using
-+# or distributing such scripts, even though portions of the text of the
-+# Macro appear in them. The GNU General Public License (GPL) does govern
-+# all other use of the material that constitutes the Autoconf Macro.
-+#
-+# This special exception to the GPL applies to versions of the Autoconf
-+# Macro released by the Autoconf Archive. When you make and distribute a
-+# modified version of the Autoconf Macro, you may extend this special
-+# exception to the GPL to apply to your modified version as well.
-+
-+AC_DEFUN([AX_GCC_X86_CPUID],
-+[AC_REQUIRE([AC_PROG_CC])
-+AC_LANG_PUSH([C])
-+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
-+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
-+ int op = $1, eax, ebx, ecx, edx;
-+ FILE *f;
-+ __asm__("cpuid"
-+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
-+ : "a" (op));
-+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
-+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
-+ fclose(f);
-+ return 0;
-+])],
-+ [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
-+ [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
-+ [ax_cv_gcc_x86_cpuid_$1=unknown])])
-+AC_LANG_POP([C])
-+])
-diff --git a/m4/ax_submodule.m4 b/m4/ax_submodule.m4
-new file mode 100644
-index 0000000..57e3a56
---- /dev/null
-+++ b/m4/ax_submodule.m4
-@@ -0,0 +1,63 @@
-+AC_DEFUN([AX_SUBMODULE],
-+[
-+
-+AC_ARG_WITH($1,
-+ [AS_HELP_STRING([--with-$1=$2],
-+ [Which $1 to use])])
-+case "system" in
-+$2)
-+ AC_ARG_WITH($1_prefix,
-+ [AS_HELP_STRING([--with-$1-prefix=DIR],
-+ [Prefix of $1 installation])])
-+ AC_ARG_WITH($1_exec_prefix,
-+ [AS_HELP_STRING([--with-$1-exec-prefix=DIR],
-+ [Exec prefix of $1 installation])])
-+esac
-+case "build" in
-+$2)
-+ AC_ARG_WITH($1_builddir,
-+ [AS_HELP_STRING([--with-$1-builddir=DIR],
-+ [Location of $1 builddir])])
-+esac
-+if test "x$with_$1_prefix" != "x" -a "x$with_$1_exec_prefix" = "x"; then
-+ with_$1_exec_prefix=$with_$1_prefix
-+fi
-+if test "x$with_$1_prefix" != "x" -o "x$with_$1_exec_prefix" != "x"; then
-+ if test "x$with_$1" != "x" -a "x$with_$1" != "xsystem"; then
-+ AC_MSG_ERROR([Setting $with_$1_prefix implies use of system $1])
-+ fi
-+ with_$1="system"
-+fi
-+if test "x$with_$1_builddir" != "x"; then
-+ if test "x$with_$1" != "x" -a "x$with_$1" != "xbuild"; then
-+ AC_MSG_ERROR([Setting $with_$1_builddir implies use of build $1])
-+ fi
-+ with_$1="build"
-+ $1_srcdir=`echo @abs_srcdir@ | $with_$1_builddir/config.status --file=-`
-+ AC_MSG_NOTICE($1 sources in $$1_srcdir)
-+fi
-+case "$with_$1" in
-+$2)
-+ ;;
-+*)
-+ if test -d $srcdir/.git -a \
-+ -d $srcdir/$1 -a \
-+ ! -d $srcdir/$1/.git; then
-+ AC_MSG_WARN(
-+[git repo detected, but submodule $1 not initialized])
-+ AC_MSG_WARN([You may want to run])
-+ AC_MSG_WARN([ git submodule init])
-+ AC_MSG_WARN([ git submodule update])
-+ AC_MSG_WARN([ sh autogen.sh])
-+ fi
-+ if test -f $srcdir/$1/configure -a "$3" != "no"; then
-+ with_$1="bundled"
-+ else
-+ with_$1="$3"
-+ fi
-+ ;;
-+esac
-+AC_MSG_CHECKING([which $1 to use])
-+AC_MSG_RESULT($with_$1)
-+
-+])
-diff --git a/osl b/osl
-new file mode 160000
-index 0000000..46ef4ec
---- /dev/null
-+++ b/osl
-@@ -0,0 +1 @@
-+Subproject commit 46ef4ec9917713d5d51dd45331c0e74870c5375d
-diff --git a/piplib b/piplib
-new file mode 160000
-index 0000000..f2cfdd3
---- /dev/null
-+++ b/piplib
-@@ -0,0 +1 @@
-+Subproject commit f2cfdd3f7a7c4c0c4f7408437205fa27bfb041ba
-diff --git a/redo.sh b/redo.sh
-new file mode 100755
-index 0000000..a1cdb50
---- /dev/null
-+++ b/redo.sh
-@@ -0,0 +1,12 @@
-+#!/bin/sh
-+make maintainer-clean
-+#./get_submodules.sh
-+./autogen.sh
-+./configure \
-+ --prefix=$HOME/usr \
-+ --with-osl=system \
-+ --with-osl-prefix=$HOME/usr \
-+ --with-piplib=system \
-+ --with-piplib-prefix=$HOME/usr
-+
-+make
-diff --git a/source/Makefile.am b/source/Makefile.am
-deleted file mode 100644
-index 3909be1..0000000
---- a/source/Makefile.am
-+++ /dev/null
-@@ -1,70 +0,0 @@
--#
--# /**-------------------------------------------------------------------**
--# ** CAnDL **
--# **-------------------------------------------------------------------**
--# ** Makefile.am **
--# **-------------------------------------------------------------------**
--# ** First version: september 8th 2003 **
--# **-------------------------------------------------------------------**/
--#
--#/*****************************************************************************
--# * CAnDL : the Chunky Analyser for Dependences in Loops (experimental) *
--# *****************************************************************************
--# * *
--# * Copyright (C) 2003-2008 Cedric Bastoul *
--# * *
--# * This is free software; you can redistribute it and/or modify it under the *
--# * terms of the GNU General Public License as published by the Free Software *
--# * Foundation; either version 2 of the License, or (at your option) any *
--# * later version. *
--# * *
--# * This software is distributed in the hope that it will be useful, but *
--# * WITHOUT ANY WARRANTY; without even the implied warranty of *
--# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
--# * Public License for more details. *
--# * *
--# * You should have received a copy of the GNU General Public License along *
--# * with software; if not, write to the Free Software Foundation, Inc., *
--# * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
--# * *
--# * CAnDL, the Chunky Dependence Analyser *
--# * Written by Cedric Bastoul, Cedric.Bastoul at inria.fr *
--# * *
--# *****************************************************************************/
--
--
--#############################################################################
--SUBDIRS =
--
--#############################################################################
--MAINTAINERCLEANFILES = Makefile.in
--
--INCLUDES = -I$(top_builddir) -I$(top_srcdir) \
-- -I$(top_builddir)/include \
-- -I$(top_srcdir)/include
--
--#############################################################################
--
--lib_LTLIBRARIES = libcandl.la
--
--
--libcandl_la_SOURCES = \
-- dependence.c \
-- ddv.c \
-- isl-wrapper.c \
-- matrix.c \
-- options.c \
-- piplib-wrapper.c \
-- program.c \
-- pruning.c \
-- statement.c \
-- violation.c
--
--AM_CFLAGS = -Wall -fomit-frame-pointer -g
--
--
--bin_PROGRAMS = candl
--
--LDADD = libcandl.la
--
--candl_SOURCES = candl.c
-diff --git a/source/candl.c b/source/candl.c
-index 27e8ca4..df6bf18 100644
---- a/source/candl.c
-+++ b/source/candl.c
-@@ -6,8 +6,8 @@
<Skipped 10088 lines>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/candl.git/commitdiff/541c7eb2667b2ef13c4d826f68c5aaa48c339a24
More information about the pld-cvs-commit
mailing list